parent
5af12b67be
commit
760469fc5f
@ -1,27 +1,31 @@
|
|||||||
var gulp = require('gulp');
|
var gulp = require('gulp');
|
||||||
var print = require('gulp-print');
|
var print = require('gulp-print');
|
||||||
var cache = require('gulp-cached');
|
var cache = require('gulp-cached');
|
||||||
|
var livereload = require('gulp-livereload');
|
||||||
|
|
||||||
var paths = require('./paths.js');
|
var paths = require('./paths.js');
|
||||||
|
|
||||||
gulp.task('copyJs', function () {
|
gulp.task('copyJs', function () {
|
||||||
return gulp.src(
|
return gulp.src(
|
||||||
[
|
[
|
||||||
paths.src.root + "polyfills.js",
|
paths.src.root + 'polyfills.js',
|
||||||
paths.src.root + "JsLibraries/handlebars.runtime.js",
|
paths.src.root + 'JsLibraries/handlebars.runtime.js'
|
||||||
])
|
])
|
||||||
.pipe(cache('copyJs'))
|
.pipe(cache('copyJs'))
|
||||||
.pipe(print())
|
.pipe(print())
|
||||||
.pipe(gulp.dest(paths.dest.root));
|
.pipe(gulp.dest(paths.dest.root))
|
||||||
|
.pipe(livereload());
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('copyHtml', function () {
|
gulp.task('copyHtml', function () {
|
||||||
return gulp.src(paths.src.html)
|
return gulp.src(paths.src.html)
|
||||||
.pipe(cache('copyHtml'))
|
.pipe(cache('copyHtml'))
|
||||||
.pipe(gulp.dest(paths.dest.root));
|
.pipe(gulp.dest(paths.dest.root))
|
||||||
|
.pipe(livereload());
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('copyContent', function () {
|
gulp.task('copyContent', function () {
|
||||||
return gulp.src([paths.src.content + '**/*.*', '!**/*.less'])
|
return gulp.src([paths.src.content + '**/*.*', '!**/*.less'])
|
||||||
.pipe(gulp.dest(paths.dest.content));
|
.pipe(gulp.dest(paths.dest.content))
|
||||||
|
.pipe(livereload());
|
||||||
});
|
});
|
||||||
|
@ -1,20 +1,15 @@
|
|||||||
var gulp = require('gulp');
|
var gulp = require('gulp');
|
||||||
|
var gulpWebpack = require('webpack-stream');
|
||||||
|
var livereload = require('gulp-livereload');
|
||||||
|
|
||||||
var gulpWebpack = require('gulp-webpack');
|
|
||||||
var webpack = require('webpack');
|
|
||||||
var webpackConfig = require('../webpack.config');
|
var webpackConfig = require('../webpack.config');
|
||||||
|
|
||||||
webpackConfig.devtool = "#source-map";
|
webpackConfig.devtool = "#source-map";
|
||||||
|
|
||||||
gulp.task('webpack', function() {
|
gulp.task('webpack', function() {
|
||||||
return gulp.src('main.js')
|
return gulp.src('main.js').pipe(gulpWebpack(webpackConfig)).pipe(gulp.dest(''));
|
||||||
.pipe(gulpWebpack(webpackConfig, webpack))
|
|
||||||
.pipe(gulp.dest(''));
|
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('webpackWatch', function() {
|
gulp.task('webpackWatch', function() {
|
||||||
webpackConfig.watch = true;
|
webpackConfig.watch = true;
|
||||||
return gulp.src('main.js')
|
return gulp.src('main.js').pipe(gulpWebpack(webpackConfig)).pipe(gulp.dest('')).pipe(livereload());
|
||||||
.pipe(gulpWebpack(webpackConfig, webpack))
|
|
||||||
.pipe(gulp.dest(''));
|
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in new issue