Concat scripts in order with Gulp

后端 未结 17 1522
后悔当初
后悔当初 2020-11-28 01:51

Say, for example, you are building a project on Backbone or whatever and you need to load scripts in a certain order, e.g. underscore.js needs to be loaded befo

17条回答
  •  夕颜
    夕颜 (楼主)
    2020-11-28 02:39

    In my gulp setup, I'm specifying the vendor files first and then specifying the (more general) everything, second. And it successfully puts the vendor js before the other custom stuff.

    gulp.src([
      // vendor folder first
      path.join(folder, '/vendor/**/*.js'),
      // custom js after vendor
      path.join(folder, '/**/*.js')
    ])    
    

提交回复
热议问题