欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  web前端

gulp browserify watchify sass_html/css_WEB-ITnose

程序员文章站 2022-05-24 13:37:19
...
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();}