maker versioning non paralell

This commit is contained in:
Felix Schulze 2019-11-08 12:58:28 +01:00
parent 94542d869f
commit 2286ab913f

View File

@ -35,7 +35,7 @@ var paths = {
output: 'dist/svg/' output: 'dist/svg/'
}, },
copy: { copy: {
input: 'src/copy/**/*', input: ['src/**/*', '!src/js/**', '!src/css/**'],
output: 'dist/' output: 'dist/'
}, },
reload: './dist/' reload: './dist/'
@ -240,11 +240,18 @@ var copyFiles = function (done) {
// updates version in all assets // updates version in all assets
var updateAssetVersion = function (done) { var updateAssetVersion = function (done) {
return src('src/**/*.{php,html,css}') return src('src/**/*.{php,html}')
.pipe(hashsrc({build_dir:paths.input,src_path:"/",hash_len:"6",query_name:"v"})) .pipe(hashsrc({build_dir:paths.output,src_path:"src",hash_len:"6",query_name:"v"}))
.pipe(hashsrc({build_dir:paths.input,src_path:"/",hash_len:"6",query_name:"v",exts:[".json"]})) .pipe(hashsrc({build_dir:paths.output,src_path:"src",hash_len:"6",query_name:"v",exts:[".json"]}))
.pipe(dest(paths.output)); .pipe(dest(paths.output));
}; };
// updates version in all assets
var updateCssVersion = function (done) {
return src(paths.styles.input)
.pipe(hashsrc({build_dir:paths.output,src_path:'src',hash_len:"6",query_name:"v"}))
.pipe(dest(paths.styles.output));
};
// Watch for changes to the src directory // Watch for changes to the src directory
var startServer = function (done) { var startServer = function (done) {
@ -286,13 +293,14 @@ var watchSource = function (done) {
exports.default = series( exports.default = series(
cleanDist, cleanDist,
parallel( parallel(
copyFiles,
buildScripts, buildScripts,
lintScripts, lintScripts,
buildStyles, buildStyles,
buildSVGs, buildSVGs
copyFiles, ),
updateAssetVersion updateAssetVersion,
) updateCssVersion,
); );
// Watch and reload // Watch and reload