build SW, fix order

This commit is contained in:
Felix Schulze 2019-11-11 09:40:20 +01:00
parent d0d248a482
commit 35f313b2fc
3 changed files with 9 additions and 8 deletions

View File

@ -244,12 +244,13 @@ var updateAssetVersion = function (done) {
.pipe(dest(paths.output)); .pipe(dest(paths.output));
}; };
// updates version in SW // updates version in SW
var updateSWVersion = function (done) { var buildSW = function (done) {
return src('src/sw.js') return src('src/sw.js')
.pipe(hashsrc({build_dir:paths.output,src_path:"src",hash_len:"6",query_name:"v",exts:[".json",".webp",".jpg",".css",".png",".ico",".js"], .pipe(hashsrc({build_dir:paths.output,src_path:"src",hash_len:"6",query_name:"v",exts:[".json",".webp",".jpg",".css",".png",".ico",".js"],
regex:/\s*(?:(")([^"]*)|(')([^']*))/ig, regex:/\s*(?:(")([^"]*)|(')([^']*))/ig,
analyze: function analyze(match){return {prefix: "'",link:match[4],suffix: ''};} analyze: function analyze(match){return {prefix: "'",link:match[4],suffix: ''};}
})) }))
.pipe(jsTasks())
.pipe(dest(paths.output)); .pipe(dest(paths.output));
}; };
// Watch for changes to the src directory // Watch for changes to the src directory
@ -298,9 +299,9 @@ exports.default = series(
buildSVGs buildSVGs
), ),
buildStyles, buildStyles,
updateAssetVersion,
buildScripts, buildScripts,
updateSWVersion, updateAssetVersion,
buildSW,
); );
// Watch and reload // Watch and reload

View File

@ -2,9 +2,9 @@
<browserconfig> <browserconfig>
<msapplication> <msapplication>
<tile> <tile>
<square70x70logo src="assets/img/favicon/mstile-70x70.png"/> <square70x70logo src="/img/favicon/mstile-70x70.png"/>
<square150x150logo src="assets/img/favicon/mstile-150x150.png"/> <square150x150logo src="/img/favicon/mstile-150x150.png"/>
<square310x310logo src="assets/img/favicon/mstile-310x310.png"/> <square310x310logo src="/img/favicon/mstile-310x310.png"/>
<TileColor>#2b5797</TileColor> <TileColor>#2b5797</TileColor>
</tile> </tile>
</msapplication> </msapplication>

View File

@ -45,8 +45,8 @@ echo '
<meta name="apple-mobile-web-app-title" content="Meritv&auml;rde"> <meta name="apple-mobile-web-app-title" content="Meritv&auml;rde">
<meta name="application-name" content="Meritv&auml;rde"> <meta name="application-name" content="Meritv&auml;rde">
<meta name="msapplication-TileColor" content="#2b5797"> <meta name="msapplication-TileColor" content="#2b5797">
<meta name="msapplication-TileImage" content="img/favicon/mstile-144x144.png"> <meta name="msapplication-TileImage" content="/img/favicon/mstile-144x144.png">
<meta name="msapplication-config" content="img/favicon/browserconfig.xml"> <meta name="msapplication-config" content="/img/favicon/browserconfig.xml">
<meta name="theme-color" content="#27233a"> <meta name="theme-color" content="#27233a">