mirror of https://github.com/keeweb/keeweb
cache manifest generation
parent
958c9ae124
commit
c338cf097d
16
Gruntfile.js
16
Gruntfile.js
|
@ -3,7 +3,7 @@
|
|||
var fs = require('fs'),
|
||||
path = require('path');
|
||||
|
||||
var StringReplacePlugin = require("string-replace-webpack-plugin");
|
||||
var StringReplacePlugin = require('string-replace-webpack-plugin');
|
||||
|
||||
module.exports = function(grunt) {
|
||||
require('time-grunt')(grunt);
|
||||
|
@ -108,6 +108,17 @@ module.exports = function(grunt) {
|
|||
}
|
||||
}
|
||||
},
|
||||
'string-replace': {
|
||||
manifest: {
|
||||
options: {
|
||||
replacements: [{
|
||||
pattern: '# YYYY-MM-DD:v0.0.0',
|
||||
replacement: '# ' + new Date().toISOString().replace(/T.*/, '') + ':v' + require('./package').version
|
||||
}]
|
||||
},
|
||||
files: { 'dist/manifest.appcache': 'app/manifest.appcache' }
|
||||
}
|
||||
},
|
||||
webpack: {
|
||||
js: {
|
||||
entry: {
|
||||
|
@ -217,6 +228,7 @@ module.exports = function(grunt) {
|
|||
'sass',
|
||||
'postcss',
|
||||
'inline',
|
||||
'htmlmin'
|
||||
'htmlmin',
|
||||
'string-replace'
|
||||
]);
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<html manifest="manifest.appcache">
|
||||
<head lang="en">
|
||||
<meta charset="UTF-8">
|
||||
<title>KeeWeb</title>
|
||||
|
@ -15,4 +15,4 @@
|
|||
<p>This app is written entirely in JavaScript. Please, enable JavaScript to run it.</p>
|
||||
</noscript>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
CACHE MANIFEST
|
||||
|
||||
# YYYY-MM-DD:v0.0.0
|
||||
|
||||
CACHE:
|
||||
index.html
|
|
@ -21,6 +21,7 @@
|
|||
"grunt-inline-alt": "^0.3.10",
|
||||
"grunt-postcss": "^0.6.0",
|
||||
"grunt-sass": "^1.0.0",
|
||||
"grunt-string-replace": "^1.2.0",
|
||||
"grunt-webpack": "^1.0.11",
|
||||
"load-grunt-tasks": "^3.2.0",
|
||||
"string-replace-webpack-plugin": "0.0.2",
|
||||
|
|
Loading…
Reference in New Issue