[TASK] Add cache breaker as variable and scss
This commit is contained in:
parent
7d7fc1ac5a
commit
3c5044f137
@ -5,3 +5,5 @@ rules:
|
|||||||
no-vendor-prefixes: 0
|
no-vendor-prefixes: 0
|
||||||
# Needed for old 'display: -vendor-prefix-property' for higher browser-support
|
# Needed for old 'display: -vendor-prefix-property' for higher browser-support
|
||||||
no-duplicate-properties: 0
|
no-duplicate-properties: 0
|
||||||
|
# Needed for unique-id()
|
||||||
|
empty-args: 0
|
||||||
|
@ -262,6 +262,12 @@ Example for `supportedLocale`:
|
|||||||
"de"
|
"de"
|
||||||
]
|
]
|
||||||
|
|
||||||
|
## cacheBreaker (string)
|
||||||
|
|
||||||
|
Will be replaced in every build to avoid missing or outdated language strings, because language.json isn't up to date.
|
||||||
|
|
||||||
|
_Fixed value (y0z)._
|
||||||
|
|
||||||
## Sponsoring / Supporting
|
## Sponsoring / Supporting
|
||||||
- [BrowserStack](https://www.browserstack.com/) for providing a awesome testing service for hundreds of browsers
|
- [BrowserStack](https://www.browserstack.com/) for providing a awesome testing service for hundreds of browsers
|
||||||
- [Travis CI](https://travis-ci.org/) for testing every push and pull request
|
- [Travis CI](https://travis-ci.org/) for testing every push and pull request
|
||||||
|
@ -1,13 +1,15 @@
|
|||||||
// Needed for standalone scss
|
// Needed for standalone scss
|
||||||
// @import 'icon-mixin';
|
// @import 'icon-mixin';
|
||||||
|
|
||||||
|
$cache-breaker: unique-id();
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'ionicons';
|
font-family: 'ionicons';
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
src: url('fonts/icon.woff2') format('woff2'),
|
src: url('fonts/icon.woff2?rel=#{$cache-breaker}') format('woff2'),
|
||||||
url('fonts/icon.woff') format('woff'),
|
url('fonts/icon.woff?rel=#{$cache-breaker}') format('woff'),
|
||||||
url('fonts/icon.ttf') format('truetype');
|
url('fonts/icon.ttf?rel=#{$cache-breaker}') format('truetype');
|
||||||
}
|
}
|
||||||
|
|
||||||
[class^='ion-'], [class*=' ion-'] {
|
[class^='ion-'], [class*=' ion-'] {
|
||||||
|
@ -114,5 +114,6 @@
|
|||||||
"supportedLocale": [
|
"supportedLocale": [
|
||||||
"en",
|
"en",
|
||||||
"de"
|
"de"
|
||||||
]
|
],
|
||||||
|
"cacheBreaker": "y0z"
|
||||||
}
|
}
|
||||||
|
@ -178,7 +178,7 @@ define(['polyglot', 'moment', 'router', 'leaflet', 'gui', 'helper'],
|
|||||||
});
|
});
|
||||||
|
|
||||||
window._ = new Polyglot({locale: locale, allowMissing: true});
|
window._ = new Polyglot({locale: locale, allowMissing: true});
|
||||||
helper.getJSON('locale/' + _.locale() + '.json').then(setTranslation);
|
helper.getJSON('locale/' + _.locale() + '.json?' + config.cacheBreaker).then(setTranslation);
|
||||||
|
|
||||||
var router = new Router();
|
var router = new Router();
|
||||||
|
|
||||||
|
@ -149,13 +149,22 @@ module.exports = function exports(grunt) {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
cachebreaker: {
|
cachebreaker: {
|
||||||
default: {
|
js: {
|
||||||
options: {
|
options: {
|
||||||
match: ['app.js']
|
match: ['app.js']
|
||||||
},
|
},
|
||||||
files: {
|
files: {
|
||||||
src: ['build/index.html']
|
src: ['build/index.html']
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
variable: {
|
||||||
|
options: {
|
||||||
|
match: ['y*z'],
|
||||||
|
position: 'overwrite'
|
||||||
|
},
|
||||||
|
files: {
|
||||||
|
src: ['build/config.json']
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user