make correct modification date for generated css files

This commit is contained in:
lilumi 2019-09-29 13:16:42 +03:00
parent 16144fd330
commit a31199a7a1
2 changed files with 13 additions and 6 deletions

View File

@ -5,6 +5,7 @@ var sass = require('gulp-sass');
var babel = require('gulp-babel');
var postcss = require('gulp-postcss');
var watch = require('gulp-watch');
var touch = require('gulp-touch-fd');
var rename = require('gulp-rename');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
@ -41,7 +42,8 @@ gulp.task('sass', function () {
.pipe(sass({ errLogToConsole: true }))
.pipe(postcss([autoprefixer()]))
.pipe(sourcemaps.write(undefined, { sourceRoot: null }))
.pipe(gulp.dest(paths.css));
.pipe(gulp.dest(paths.css))
.pipe(touch());
return stream;
});
@ -103,7 +105,8 @@ gulp.task('cssnano', function () {
.pipe(rename({ suffix: '.min' }))
.pipe(cssnano({ discardComments: { removeAll: true } }))
.pipe(sourcemaps.write('./'))
.pipe(gulp.dest(paths.css));
.pipe(gulp.dest(paths.css))
.pipe(touch());
});
gulp.task('minifycss', function () {
@ -129,7 +132,8 @@ gulp.task('minifycss', function () {
)
.pipe(rename({ suffix: '.min' }))
.pipe(sourcemaps.write('./'))
.pipe(gulp.dest(paths.css));
.pipe(gulp.dest(paths.css))
.pipe(touch());
});
gulp.task('cleancss', function () {
@ -313,7 +317,8 @@ gulp.task(
{ skipBinary: true }
)
)
.pipe(gulp.dest(paths.dist));
.pipe(gulp.dest(paths.dist))
.pipe(touch());
})
);
@ -341,7 +346,8 @@ gulp.task(
`!${paths.distprod}/**`,
'*'
])
.pipe(gulp.dest(paths.distprod));
.pipe(gulp.dest(paths.distprod))
.pipe(touch());
})
);

View File

@ -29,7 +29,7 @@
"dependencies": {
"@babel/preset-env": "^7.4.5",
"bootstrap": "^4.3.1",
"browser-sync": "^2.26.3",
"browser-sync": "^2.26.7",
"del": "^4.1.0",
"font-awesome": "^4.7.0",
"gulp": "^4.0.0",
@ -45,6 +45,7 @@
"gulp-sass": "^4.0.2",
"gulp-sequence": "^1.0.0",
"gulp-sourcemaps": "^2.6.5",
"gulp-touch-fd": "^2.0.0",
"gulp-uglify": "^3.0.2",
"gulp-watch": "^5.0.1",
"run-sequence": "^2.2.1",