Files: bde94ec16b8af91da0d44e2d4bd6ce54d9c23e65 / build.js
543 bytesRaw
1 | var fs = require('fs') |
2 | var path = require('path') |
3 | |
4 | fs.writeFileSync( |
5 | path.join(__dirname, 'style.css.json'), |
6 | JSON.stringify(fs.readFileSync(path.join(__dirname, 'style.css'), 'utf8')) |
7 | ) |
8 | |
9 | |
10 | fs.writeFileSync(path.join(__dirname, 'modules', '_index.js'), |
11 | 'module.exports = {\n' |
12 | + |
13 | fs.readdirSync(path.join(__dirname, 'modules')) |
14 | .filter(function (file) { |
15 | return file !== '_index.js' && /\.js$/.test(file) |
16 | }) |
17 | .map(function (file) { |
18 | return ' '+JSON.stringify(file) + ": require('./"+file+"')" |
19 | }).join(',\n') |
20 | + |
21 | '\n}' |
22 | ) |
23 |
Built with git-ssb-web