Skip to content

Instantly share code, notes, and snippets.

View yanni4night's full-sized avatar

Yong Yin yanni4night

  • sogou.com/baidu.com/kuaishou.com
  • Beijing,China
View GitHub Profile
panto.rest().copy()
gulp.watch(‘*.js’, funtion() {
gulp.src(‘*.js’)
});
const concatStream = new Panto.Stream(new ConcatTransformer());
panto.$(‘*.less’).connect(concatStream);
panto.$(‘*.sass’).connect(concatStream);
panto.$([‘server/*.js’, ‘common/*.js’]).babel(es2015)
panto.$([‘client/*.js’, ‘common/*.js’]).babel(es5)
gulp.src([‘server/*.js’, ‘common/*.js’]).pipe(babel(es2015))
gulp.src([‘client/*.js’, ‘common/*.js’]).pipe(babel(es5))
panto.$(‘entry.js’).babel().uglify().write();
gulp.src(‘entry.js’).pipe(babel()).pipe(uglify()).pipe(gulp.write());
@yanni4night
yanni4night / gulp.js
Created August 22, 2016 06:42
Webpack with Gulp
var gulp = require(‘gulp’);
var webpack = require(‘gulp-webpack’);
gulp.task(‘default’, function() {
return gulp.src(‘src/entry.js’)
.pipe(webpack())
.pipe(gulp.dest(‘dist/’));
});
if (this.slashes || (!protocol || slashedProtocol[protocol]) && host !== false) {
host = '//' + (host || '');
if (pathname && pathname.charCodeAt(0) !== 47/*/*/)
pathname = '/' + pathname;
} else if (!host) {
host = '';
}