client: let browser use cache for assets (reset cache when version changes)
This commit is contained in:
parent
680e3174b0
commit
d26fff07ee
2 changed files with 15 additions and 8 deletions
|
|
@ -7,6 +7,7 @@ var cpr = require('cpr'),
|
|||
['../LICENSE', '../app/LICENSE'],
|
||||
['../src/python/', '../app/server/python/'],
|
||||
['../resources/fonts/', '../app/assets/fonts/'],
|
||||
['../src/html/launcher.html', '../app/launcher/index.html'],
|
||||
]
|
||||
|
||||
for (var i in files) {
|
||||
|
|
@ -46,3 +47,9 @@ appJson.optionalDependencies = {
|
|||
}
|
||||
|
||||
fs.writeFileSync(path.resolve(__dirname + '/../app/package.json'), JSON.stringify(appJson, null, ' '))
|
||||
|
||||
var clientHtml = fs.readFileSync(path.resolve(__dirname + '/../src/html/client.html'))
|
||||
.toString()
|
||||
.replace(/\$\{version\}/g, appJson.version)
|
||||
|
||||
fs.writeFileSync(path.resolve(__dirname + '/../app/client/index.html'), clientHtml)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue