git ssb

16+

Dominic / patchbay



Tree: e7d5a35db1a7f8894ba72038b284d13234c5d9c5

Files: e7d5a35db1a7f8894ba72038b284d13234c5d9c5 / scripts / dir.js

363 bytesRaw
1var fs = require('fs')
2var path = require('path')
3
4console.log(
5 'module.exports = {\n'
6 +
7 fs.readdirSync(path.join(process.cwd(), process.argv[2]))
8 .filter(function (file) {
9 return file !== 'index.js' && /\.js$/.test(file)
10 })
11 .map(function (file) {
12 return ' '+JSON.stringify(file) + ": require('./"+file+"')"
13 }).join(',\n')
14 +
15 '\n}'
16)
17
18
19

Built with git-ssb-web