refactored Dockerfile

This commit is contained in:
Luiz Felipe F M Costa 2019-09-06 20:00:00 -07:00 committed by Danny Coates
parent 8f4a53db64
commit 90f6a07d4a
No known key found for this signature in database
GPG key ID: 4C442633C62E00CB
8 changed files with 68 additions and 33 deletions

View file

@ -1,29 +0,0 @@
/*
This code is included by both the server and frontend via
common/assets.js
When included from the server the export will be the function.
When included from the frontend (via webpack) the export will
be an object mapping file names to hashed file names. Example:
"send_logo.svg": "send_logo.5fcfdf0e.svg"
*/
const fs = require('fs');
const path = require('path');
function kv(f) {
return `"${f}": require('../assets/${f}')`;
}
module.exports = function() {
const files = fs.readdirSync(path.join(__dirname, '..', 'assets'));
const code = `module.exports = {
${files.map(kv).join(',\n')}
};`;
return {
code,
dependencies: files.map(f => require.resolve('../assets/' + f)),
cacheable: true
};
};

View file

@ -1,8 +1,8 @@
# Custom Loaders
## Generate Asset Map
## Android Index Plugin
This loader enumerates all the files in `assets/` so that `common/assets.js` can provide mappings from the source filename to the hashed filename used on the site.
Generates the `index.html` page for the native android client
## Version Plugin