diff options
Diffstat (limited to '')
-rw-r--r-- | gulpfile.js | 30 | ||||
-rw-r--r-- | package.json | 1 |
2 files changed, 13 insertions, 18 deletions
diff --git a/gulpfile.js b/gulpfile.js index 3e1a65a..c081b81 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -22,11 +22,13 @@ var webpackOptions = { ActivityIndicator: './src/Plugins/ActivityIndicator.js', Overlay: './src/Plugins/Overlay.js', CloseButton: './src/Plugins/CloseButton.js', + Captions: './src/Plugins/Captions.js', + Navigation: './src/Plugins/Navigation.js', Core: './src/LightBox.js' }, output: { - filename: "LightBox.[name].js", - library: ["LightBox", "[name]"], + filename: 'LightBox.[name].js', + library: ['LightBox','[name]'], libraryTarget: "var" }, module: { @@ -34,7 +36,8 @@ var webpackOptions = { { loader: 'babel', query: { - presets: ['es2015'] + presets: ['es2015'], + plugins: ['add-module-exports'] } } ] @@ -42,25 +45,16 @@ var webpackOptions = { }; gulp.task('pack', function() { - return gulp.src('').pipe(webpack(webpackOptions)).pipe(gulp.dest('./demo')); - - //return gulp.src(['./src/LightBox.js', './src/Plugins/*.js']) - // .pipe(webpack(webpackOptions)) - // //.pipe(gulp.dest('./dist')); - // .pipe(gulp.dest('./demo')); + return gulp.src('') + .pipe(webpack(webpackOptions)) + .pipe(gulp.dest('./demo')); }); gulp.task('default', ['pack']); gulp.task('watch', function () { - //gulp.watch('./src/LightBox.js', ['pack']) - webpackOptions.watch = true; - - gulp.src('').pipe(webpack(webpackOptions)).pipe(gulp.dest('./demo')); - - //return gulp.src(['./src/LightBox.js', './src/Plugins/*.js']) - // .pipe(webpack(webpackOptions)) - // //.pipe(gulp.dest('./dist')); - // .pipe(gulp.dest('./demo')); + gulp.src('') + .pipe(webpack(webpackOptions)) + .pipe(gulp.dest('./demo')); }); diff --git a/package.json b/package.json index dee91e5..960874a 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,7 @@ "devDependencies": { "babel-eslint": "^5.0.0-beta6", "babel-loader": "^6.2.1", + "babel-plugin-add-module-exports": "^0.1.3-alpha", "babel-preset-es2015": "^6.3.13", "gulp": "^3.9.0", "gulp-autoprefixer": "^3.1.0", |