diff --git a/gulpfile.js b/gulpfile.js index 58c418a..c8a9592 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,5 +1,7 @@ -var webpackGulp = require('webpack-stream'); +var fs = require('fs'); +var gulp = require('gulp'); var webpack = require('webpack'); +var webpackGulp = require('webpack-stream'); /** * Bundle all module using webpack @@ -18,6 +20,7 @@ gulp.task('build', ['ship-deps'], function(done) { if (!fs.existsSync('./styles')) { fs.mkdirSync('./styles'); } + var runSequence = require('run-sequence'); runSequence('bundle', done); }); @@ -29,3 +32,17 @@ gulp.task('ship-deps', function(done) { done(); }); }); +/** + * Load the samples + */ +gulp.task('serve', ['build'], function (done) { + var browserSync = require('browser-sync'); + var bs = browserSync.create('Essential JS 2'); + var options = { + server: { + baseDir: './' + }, + ui: false + }; + bs.init(options, done); +}); \ No newline at end of file diff --git a/package.json b/package.json index 87d875d..497ab91 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,13 @@ "license": "SEE LICENSE IN license", "dependencies": { "@syncfusion/ej2": "*", + "browser-sync": "^2.24.7", "crossroads": "^0.12.2", - "hasher": "^1.2.0" - } + "gulp": "^3.9.1", + "hasher": "^1.2.0", + "webpack-stream": "^5.1.1" + }, + "devDependencies": { + "run-sequence": "^2.2.1" + } } diff --git a/webpack.config.js b/webpack.config.js index 1d2314c..b43245e 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -9,15 +9,6 @@ module.exports = { libraryTarget: 'this' }, plugins: [ - new webpack.optimize.UglifyJsPlugin({ - beautify: false, - output: { - comments: false - }, - compress: { - warnings: false, - unused: true - } - }) + ] } \ No newline at end of file