Modules and maintenance
- Update to modules - Added ESLint configuration - Tried to fix SASS but still no automatic reload - Gulp not working anymore
This commit is contained in:
parent
6b217b6ebb
commit
534115ff28
7 changed files with 749 additions and 1033 deletions
17
gulpfile.js
17
gulpfile.js
|
|
@ -28,7 +28,7 @@ const cleanCss = require('gulp-clean-css');
|
|||
const pump = require('pump');
|
||||
const cached = require('gulp-cached');
|
||||
// const remember = require('gulp-remember');
|
||||
const concat = require('gulp-concat');
|
||||
// const concat = require('gulp-concat');
|
||||
const uglify = require('gulp-uglify');
|
||||
const jshint = require('gulp-jshint');
|
||||
const gulpIf = require('gulp-if');
|
||||
|
|
@ -61,7 +61,7 @@ const input = {
|
|||
sprites: config.src + 'art/sprites/**/*.png',
|
||||
images: config.src + 'art/images/**/*.+(png|gif|jpg|svg|webp)'
|
||||
},
|
||||
vendor: 'vendor/**/*',
|
||||
vendor: 'vendor/**/*'
|
||||
};
|
||||
|
||||
const output = {
|
||||
|
|
@ -132,7 +132,8 @@ function nunjucks() {
|
|||
function style() {
|
||||
return src(input.style)
|
||||
.pipe(plumber())
|
||||
.pipe(sass.sync({
|
||||
// .pipe(sass.sync({
|
||||
.pipe(sass({
|
||||
includePaths: [input.vendor + '/**/*.s+(a|c)ss']
|
||||
}).on('error', sass.logError))
|
||||
.pipe(autoprefixer(['>= 4%', 'last 2 version']))
|
||||
|
|
@ -184,7 +185,7 @@ function code(cb) {
|
|||
rename({
|
||||
suffix: '.min'
|
||||
}),
|
||||
dest(output.code, { sourcemaps: '.' }),
|
||||
dest(output.code, { sourcemaps: '.' })
|
||||
], cb);
|
||||
}
|
||||
|
||||
|
|
@ -204,7 +205,7 @@ function codeLint() {
|
|||
function fonts() {
|
||||
return src(input.fonts)
|
||||
.pipe(plumber())
|
||||
.pipe(dest(output.fonts))
|
||||
.pipe(dest(output.fonts));
|
||||
}
|
||||
|
||||
// Add art
|
||||
|
|
@ -213,7 +214,7 @@ function art() {
|
|||
let favicons = src(input.art.favicons)
|
||||
.pipe(plumber())
|
||||
.pipe(changed(output.art))
|
||||
.pipe(dest(config.dev))
|
||||
.pipe(dest(config.dev));
|
||||
|
||||
// Move images to the root folder
|
||||
let images = src(input.art.images)
|
||||
|
|
@ -221,7 +222,7 @@ function art() {
|
|||
.pipe(changed(output.art))
|
||||
.pipe(dest(output.art));
|
||||
|
||||
return merge(favicons, images)
|
||||
return merge(favicons, images);
|
||||
}
|
||||
// function art() {
|
||||
// // Move favicons and images to the root folder
|
||||
|
|
@ -262,7 +263,7 @@ function sprites() {
|
|||
function vendor() {
|
||||
return src(input.vendor)
|
||||
.pipe(plumber())
|
||||
.pipe(dest(output.vendor))
|
||||
.pipe(dest(output.vendor));
|
||||
}
|
||||
|
||||
// TODO for distribution
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue