当前位置:Gxlcms > html代码 > gulpbrowserifywatchifysass_html/css_WEB-ITnose

gulpbrowserifywatchifysass_html/css_WEB-ITnose

时间:2021-07-01 10:21:17 帮助过:6人阅读

gulp.task(, () {  rubysass(scssPath, {    style: ,    loadPath: [      scssPath    ]  })    .pipe(gulp.dest(cssDestPath));});gulp.task(, () {  jscompile();});gulp.task(, () {  jscompile();});jscompile(is_watch) {  customOpts = {    entries: [jsSrcPath + ],    basedir: __dirname,    debug: !production,    cache: {},    packageCache: {},    fullPaths: watch  };  opts = lodash.assign({}, watchify.args, customOpts);  bundler;  (is_watch) {    bundler = watchify(browserify(opts));  } {    bundler = browserify(opts);  }  rebundle() {    bundler      .bundle()      .pipe(source())      .pipe(buffer())      .pipe(sourcemaps.init({loadMaps: }))      .on(, gutil.log)      .pipe(sourcemaps.write())      .pipe(gulp.dest(jsDestPath));  }  bundler.on(, () {    rebundle();  });  bundler.on(, (message) {    console.log(message);  });  rebundle();}

人气教程排行