db-migrate 0.11.7 → 0.11.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/generateLoader.js DELETED
@@ -1,37 +0,0 @@
1
- 'use strict';
2
-
3
- const path = require('path');
4
- const recursive = require('final-fs').readdirRecursive;
5
- const start = path.join(__dirname, 'lib/commands');
6
- const Promise = require('bluebird');
7
- const fs = require('fs');
8
-
9
- (async () => {
10
- const files = await recursive(start, true);
11
- const template = `
12
- 'use strict';
13
-
14
- const path = require('path');
15
-
16
- const files = {
17
- ${files
18
- .map(x => ` "${x.substring(0, x.indexOf('.js'))}": require('./${x}')`)
19
- .join(',\n')}
20
- }
21
-
22
- function register (module) {
23
- return files[module];
24
- }
25
-
26
- module.exports = register;
27
- `;
28
-
29
- fs.writeFile(
30
- path.join(__dirname, 'lib/commands/generated.js'),
31
- template,
32
- 'utf8',
33
- err => {
34
- if (err) throw err;
35
- }
36
- );
37
- })();