Files: 49c6e5459b68f2a30bcecf7727b8c9a99cfe4e79 / lib / app.js
514 bytesRaw
1 | const combine = require('depject') |
2 | const bulk = require('bulk-require') |
3 | |
4 | const mapModules = require('./mapModules') |
5 | const tranformModule = require('./transformModule') |
6 | |
7 | const types = require('../types') |
8 | const coreModules = require('../modules') |
9 | |
10 | module.exports = setupApp |
11 | |
12 | function setupApp ({ dirname } = {}) { |
13 | const appExports = bulk(dirname || process.cwd(), ['**/*.js'], { process }) |
14 | const appModules = mapModules(appExports, tranformModule(types)) |
15 | |
16 | return combine( |
17 | appModules, |
18 | coreModules |
19 | ) |
20 | } |
21 |
Built with git-ssb-web