Skip to content

Commit

Permalink
gulp: touch generated files to update timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
cebe committed Apr 4, 2018
1 parent 6d71845 commit 9163896
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
2 changes: 2 additions & 0 deletions gulpfile.js
Expand Up @@ -42,6 +42,7 @@ function styles() {
.pipe($.if(PRODUCTION, $.cssnano()))
.pipe($.if(!PRODUCTION, $.sourcemaps.write('.', { sourceRoot: '../../assets/src/scss/' })))
.pipe(gulp.dest(config.PATHS.dist + '/css'))
.pipe($.touch())
.pipe($.if(!PRODUCTION, browsersync.stream()))
.pipe($.notify({ message: 'Styles task complete' }));
};
Expand All @@ -55,6 +56,7 @@ function scripts() {
.pipe($.if(PRODUCTION, $.uglify()))
.pipe($.if(!PRODUCTION, $.sourcemaps.write('.', { sourceRoot: '../../assets/src/js/' })))
.pipe(gulp.dest(config.PATHS.dist + '/js'))
.pipe($.touch())
.pipe($.notify({ message: 'Scripts task complete' }));
};

Expand Down
5 changes: 3 additions & 2 deletions package.json
Expand Up @@ -15,6 +15,7 @@
"author": "Qiang Xue",
"homepage": "http://www.yiiframework.com",
"devDependencies": {
"browser-sync": "^2.18.13",
"es6-promise": "*",
"gulp": "gulpjs/gulp#4.0",
"gulp-autoprefixer": "^3.1.0",
Expand All @@ -28,11 +29,11 @@
"gulp-rename": "^1.2.2",
"gulp-sass": "^2.1.0",
"gulp-sourcemaps": "^1.6.0",
"gulp-touch": "^1.0.1",
"gulp-uglify": "^1.2.0",
"gulp.spritesmith": "^6.2.1",
"js-yaml": "^3.4.6",
"rimraf": "^2.4.3",
"yargs": "^3.8.0",
"browser-sync": "^2.18.13"
"yargs": "^3.8.0"
}
}
11 changes: 11 additions & 0 deletions yarn.lock
Expand Up @@ -1943,6 +1943,13 @@ gulp-sourcemaps@^1.6.0:
through2 "2.X"
vinyl "1.X"

gulp-touch@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/gulp-touch/-/gulp-touch-1.0.1.tgz#07e5d7d29e5e01f0baa4fa7664d83fcea8a6e958"
dependencies:
graceful-fs "^4.1.2"
map-stream "0.0.6"

gulp-uglify@^1.2.0:
version "1.5.4"
resolved "https://registry.yarnpkg.com/gulp-uglify/-/gulp-uglify-1.5.4.tgz#524788d87666d09f9d0c21fb2177f90039a658c9"
Expand Down Expand Up @@ -2958,6 +2965,10 @@ map-obj@^1.0.0, map-obj@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d"

map-stream@0.0.6:
version "0.0.6"
resolved "https://registry.yarnpkg.com/map-stream/-/map-stream-0.0.6.tgz#d2ef4eb811a28644c7a8989985c69c2fdd496827"

map-visit@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f"
Expand Down

0 comments on commit 9163896

Please sign in to comment.