Control order of source files

后端 未结 2 621

I\'m using Gulp and the main-bower-files to bundle my bower dependencies.

I need to ensure that jQuery is included before AngularJS, but since the Angular bower pack

相关标签:
2条回答
  • 2021-01-08 00:11

    I haven't used main-bower-files but one trick I can think of is to just include the jquery file directly and don't load it in the main bower files array, e.g.

    var glob = ['/path/to/jquery.js'].concat(mainBowerFiles(['**/*.js', '!/path/to/jquery.js']));
    var sources = gulp.src(glob);
    
    0 讨论(0)
  • 2021-01-08 00:26

    You can override angulars dependencies in your project bower.json:

    https://github.com/ck86/main-bower-files#overrides-options

    {
        ...
    
        "overrides": {
            "angular": {
                "dependencies": {
                    "jquery": "~1.8"
                }
            }
        }
    }
    
    0 讨论(0)
提交回复
热议问题