ember-codemod-v1-to-v2 0.1.0 → 0.1.2
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/package.json
CHANGED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# See https://help.github.com/ignore-files/ for more about ignoring files.
|
|
2
|
+
|
|
3
|
+
# compiled output
|
|
4
|
+
/dist/
|
|
5
|
+
/tmp/
|
|
6
|
+
|
|
7
|
+
# dependencies
|
|
8
|
+
/bower_components/
|
|
9
|
+
/node_modules/
|
|
10
|
+
|
|
11
|
+
# misc
|
|
12
|
+
/.env*
|
|
13
|
+
/.pnp*
|
|
14
|
+
/.sass-cache
|
|
15
|
+
/.eslintcache
|
|
16
|
+
/connect.lock
|
|
17
|
+
/coverage/
|
|
18
|
+
/libpeerconnection.log
|
|
19
|
+
/npm-debug.log*
|
|
20
|
+
/testem.log
|
|
21
|
+
/yarn-error.log
|
|
22
|
+
|
|
23
|
+
# ember-try
|
|
24
|
+
/.node_modules.ember-try/
|
|
25
|
+
/bower.json.ember-try
|
|
26
|
+
/npm-shrinkwrap.json.ember-try
|
|
27
|
+
/package.json.ember-try
|
|
28
|
+
/package-lock.json.ember-try
|
|
29
|
+
/yarn.lock.ember-try
|
|
30
|
+
|
|
31
|
+
# broccoli-debug
|
|
32
|
+
/DEBUG/
|
|
@@ -1,16 +1,27 @@
|
|
|
1
1
|
import { readFileSync } from 'node:fs';
|
|
2
|
-
import { join } from 'node:path';
|
|
2
|
+
import { dirname, join } from 'node:path';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
3
4
|
|
|
4
5
|
import glob from 'glob';
|
|
5
6
|
|
|
6
7
|
import { createFiles } from '../../../utils/files.js';
|
|
7
8
|
import { processTemplate } from '../../../utils/process-template.js';
|
|
8
9
|
|
|
10
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
11
|
+
const __dirname = dirname(__filename);
|
|
12
|
+
|
|
13
|
+
function getBlueprintRoot() {
|
|
14
|
+
const codemodRoot = join(__dirname, '../../../..');
|
|
15
|
+
|
|
16
|
+
return join(codemodRoot, 'src/blueprints/ember-addon');
|
|
17
|
+
}
|
|
18
|
+
|
|
9
19
|
function getFilePath(blueprintFilePath, options) {
|
|
10
20
|
const { locations } = options;
|
|
11
21
|
|
|
12
22
|
return blueprintFilePath
|
|
13
23
|
.replace('__addonLocation__', locations.addon)
|
|
24
|
+
.replace('__gitignore__', '.gitignore')
|
|
14
25
|
.replace('__testAppLocation__', locations.testApp);
|
|
15
26
|
}
|
|
16
27
|
|
|
@@ -35,7 +46,7 @@ function getFilesToSkip(options) {
|
|
|
35
46
|
}
|
|
36
47
|
|
|
37
48
|
export function createFilesFromBlueprint(context, options) {
|
|
38
|
-
const blueprintRoot =
|
|
49
|
+
const blueprintRoot = getBlueprintRoot();
|
|
39
50
|
|
|
40
51
|
const filesToSkip = getFilesToSkip(options);
|
|
41
52
|
|