gulp.task('dist', [
'html:dist',
'js:dist',
'sprite:dist',
'style:dist',
'fonts:dist',
'image:dist'
]);
gulp.task('webserver', ['dist'], function () {
browserSync(config);
});
gulp.task('watch', ['webserver'], function(){
watch(path.watch.html, function(event, cb) {
gulp.start('html:dist');
});
watch(path.watch.style, function(event, cb) {
gulp.start('style:dist');
});
watch(path.watch.js, function(event, cb) {
gulp.start('js:dist');
});
watch([path.ignoreFile.img, path.watch.img], function(event, cb) {
gulp.start('image:dist');
});
watch(path.watch.sprite, function(event, cb) {
gulp.start('sprite:dist');
});
watch(path.watch.fonts, function(event, cb) {
gulp.start('fonts:dist');
});
});
gulp.task('build', ['dist', 'webserver', 'watch']);
gulp.task('default', ['build']);
gulp.task('gulp-sequence', gulpSequence('dist', 'webserver', 'watch'));
gulp.task('default', ['gulp-sequence']);
'use strict';
var gulp = require('gulp'),
series = require("gulp-series"),
watch = require('gulp-watch'),
plumber = require('gulp-plumber'),
prefixer = require('gulp-autoprefixer'),
uglify = require('gulp-uglify'),
sass = require('gulp-sass'),
sourcemaps = require('gulp-sourcemaps'),
fileinclude = require('gulp-file-include'),
cssmin = require('gulp-minify-css'),
imagemin = require('gulp-imagemin'),
pngquant = require('imagemin-pngquant'),
rimraf = require('rimraf'),
browserSync = require("browser-sync"),
rename = require('gulp-rename'),
spritesmith = require('gulp.spritesmith'),
reload = browserSync.stream;
gulps.registerSeries('default', ['dist', 'webserver', 'watch']);
{
"name": "toy",
"version": "1.0.0",
"description": "",
"main": "gulpfile.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Devinora",
"license": "ISC",
"devDependencies": {
"browser-sync": "^2.18.12",
"gulp": "^3.9.1",
"gulp-autoprefixer": "^4.0.0",
"gulp-file-include": "^1.1.0",
"gulp-imagemin": "^3.2.0",
"gulp-minify-css": "^1.2.4",
"gulp-plumber": "^1.1.0",
"gulp-rename": "^1.2.2",
"gulp-sass": "^3.1.0",
"gulp-sourcemaps": "^2.6.0",
"gulp-uglify": "^3.0.0",
"gulp-watch": "^4.3.11",
"gulp.spritesmith": "^6.5.0",
"imagemin-pngquant": "^5.0.0",
"rimraf": "^2.6.1"
}
}
На счет переименования, то подскажите что именно надо изменить?