0
여러 번들을 작성하기 위해 gulp를 사용하여 어떤 예제도 찾아 볼 수 없습니다.탐색 및 꿀꺽 꿀꺽 마심을 사용하는 여러 번들
나는 단지 덤프로 that을하고 싶다.
이 내용을 찾았습니다. repo하지만 어떻게 gulpfile에 사용합니까?
여러 번들을 작성하기 위해 gulp를 사용하여 어떤 예제도 찾아 볼 수 없습니다.탐색 및 꿀꺽 꿀꺽 마심을 사용하는 여러 번들
나는 단지 덤프로 that을하고 싶다.
이 내용을 찾았습니다. repo하지만 어떻게 gulpfile에 사용합니까?
나는 browserify이 browerify로 철자가 있기 때문에이 질문은 많은 관심을하지 않았다 생각합니다. 당신은 여전히 관심이 있다면
, 여기 예제는 물론 example in node-browserify docs
var gulp = require('gulp');
var browserify = require('browserify');
var source = require('vinyl-source-stream');
gulp.task('default', ['build-common', 'build-beep', 'build-boop']);
gulp.task('build-common', function() {
var b = browserify()
.require('./robot'); // same as -r option
var stream = b.bundle()
.pipe(source('common.js')) // the output filename
.pipe(gulp.dest('./static/')); // the output directory
return stream;
});
gulp.task('build-beep', function() {
var b = browserify('./beep.js')
.external('./robot.js'); // same as -e option
var stream = b.bundle()
.pipe(source('beep.js')) // the output filename
.pipe(gulp.dest('./static/')); // the output directory
return stream;
});
gulp.task('build-boop', function() {
var b = browserify('./boop.js')
.external('./robot.js'); // same as -e option
var stream = b.bundle()
.pipe(source('boop.js')) // the output filename
.pipe(gulp.dest('./static/')); // the output directory
return stream;
});
, 이것은 조금 장황로 동일 할 조리법을 gulpfile.js하지만 난이가 당신을 도울 수 있기를 바랍니다 시작하다.
유용 할 수도있는 몇 가지 browserify 관련 꿀필 레시피를 작성했습니다 : https://github.com/sogko/gulp-recipes