Add command to touch the generated css files to set changed date to now.
This commit is contained in:
parent
83ce4e0cc2
commit
fe42ebcd4a
4 changed files with 402 additions and 537 deletions
13
gulpfile.js
13
gulpfile.js
|
|
@ -1,7 +1,6 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var importOnce = require('node-sass-import-once'),
|
var importOnce = require('node-sass-import-once');
|
||||||
path = require('path');
|
|
||||||
|
|
||||||
var options = {};
|
var options = {};
|
||||||
|
|
||||||
|
|
@ -32,7 +31,6 @@ options.sass = {
|
||||||
includePaths: [
|
includePaths: [
|
||||||
options.theme.sass,
|
options.theme.sass,
|
||||||
options.rootPath.project + 'node_modules/breakpoint-sass/stylesheets',
|
options.rootPath.project + 'node_modules/breakpoint-sass/stylesheets',
|
||||||
options.rootPath.project + 'node_modules/chroma-sass/sass',
|
|
||||||
options.rootPath.project + 'node_modules/typey/stylesheets'
|
options.rootPath.project + 'node_modules/typey/stylesheets'
|
||||||
],
|
],
|
||||||
outputStyle: 'expanded'
|
outputStyle: 'expanded'
|
||||||
|
|
@ -58,7 +56,8 @@ var gulp = require('gulp'),
|
||||||
del = require('del'),
|
del = require('del'),
|
||||||
// gulp-load-plugins will report "undefined" error unless you load gulp-sass manually.
|
// gulp-load-plugins will report "undefined" error unless you load gulp-sass manually.
|
||||||
sass = require('gulp-sass'),
|
sass = require('gulp-sass'),
|
||||||
cleanCSS = require('gulp-clean-css');
|
cleanCSS = require('gulp-clean-css'),
|
||||||
|
touch = require('gulp-touch-cmd');
|
||||||
|
|
||||||
// The sass files to process.
|
// The sass files to process.
|
||||||
var sassFiles = [
|
var sassFiles = [
|
||||||
|
|
@ -118,7 +117,8 @@ gulp.task('styles', gulp.series('clean:css', function css () {
|
||||||
.pipe(sass(options.sass).on('error', sass.logError))
|
.pipe(sass(options.sass).on('error', sass.logError))
|
||||||
.pipe($.size({showFiles: true}))
|
.pipe($.size({showFiles: true}))
|
||||||
.pipe($.sourcemaps.write('./'))
|
.pipe($.sourcemaps.write('./'))
|
||||||
.pipe(gulp.dest(options.theme.css));
|
.pipe(gulp.dest(options.theme.css))
|
||||||
|
.pipe(touch());
|
||||||
}));
|
}));
|
||||||
|
|
||||||
gulp.task('styles:production', gulp.series('clean:css', function css () {
|
gulp.task('styles:production', gulp.series('clean:css', function css () {
|
||||||
|
|
@ -126,7 +126,8 @@ gulp.task('styles:production', gulp.series('clean:css', function css () {
|
||||||
.pipe(sass(options.sass).on('error', sass.logError))
|
.pipe(sass(options.sass).on('error', sass.logError))
|
||||||
.pipe($.size({showFiles: true}))
|
.pipe($.size({showFiles: true}))
|
||||||
.pipe(cleanCSS())
|
.pipe(cleanCSS())
|
||||||
.pipe(gulp.dest(options.theme.css));
|
.pipe(gulp.dest(options.theme.css))
|
||||||
|
.pipe(touch());
|
||||||
}));
|
}));
|
||||||
|
|
||||||
// Watch for changes and rebuild.
|
// Watch for changes and rebuild.
|
||||||
|
|
|
||||||
924
package-lock.json
generated
924
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -24,6 +24,7 @@
|
||||||
"gulp-size": "^3.0.0",
|
"gulp-size": "^3.0.0",
|
||||||
"gulp-sourcemaps": "^2.6.4",
|
"gulp-sourcemaps": "^2.6.4",
|
||||||
"node-sass-import-once": "^1.2.0",
|
"node-sass-import-once": "^1.2.0",
|
||||||
|
"gulp-touch-cmd": "0.0.1",
|
||||||
"typey": "^1.1.2"
|
"typey": "^1.1.2"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|
|
||||||
|
|
@ -158,4 +158,3 @@ $zen-gutters: 20px;
|
||||||
$indent-amount: 2 * $base-font-size;
|
$indent-amount: 2 * $base-font-size;
|
||||||
|
|
||||||
$include-rtl: false;
|
$include-rtl: false;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue