ember-codemod-remove-ember-css-modules 0.1.2 → 0.1.4
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/README.md +6 -8
- package/package.json +12 -14
package/README.md
CHANGED
|
@@ -19,7 +19,7 @@ You can check [`ember-container-query`](https://github.com/ijlee2/ember-containe
|
|
|
19
19
|
Step 1. Quickly migrate to [`embroider-css-modules`](https://github.com/ijlee2/embroider-css-modules).<sup>1</sup>
|
|
20
20
|
|
|
21
21
|
```sh
|
|
22
|
-
cd <your/project
|
|
22
|
+
cd <path/to/your/project>
|
|
23
23
|
npx ember-codemod-remove-ember-css-modules <arguments>
|
|
24
24
|
```
|
|
25
25
|
|
|
@@ -29,9 +29,7 @@ Step 2. Review the project.
|
|
|
29
29
|
- [x] Remove the remaining instances of `local-class` attributes and `{{local-class}}` helpers from `ember-css-modules`.
|
|
30
30
|
- [x] Confirm that you can run all scripts in `package.json`.
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
<sup>1. Some prerequisites for running `ember-codemod-remove-ember-css-modules`: First, migrate to the Octane layout (flat or nested). You can leverage codemods for [classic](https://github.com/ember-codemods/ember-component-template-colocation-migrator) and [pod](https://github.com/ijlee2/ember-codemod-pod-to-octane) layouts. Second, [refactor code](#how-to-refactor-code) to help the codemod update templates correctly.</sup>
|
|
32
|
+
<sup>1. Some prerequisites for running the codemod: First, migrate to the Octane layout (flat or nested). You can leverage codemods for [classic](https://github.com/ember-codemods/ember-component-template-colocation-migrator) and [pod](https://github.com/ijlee2/ember-codemod-pod-to-octane) layouts. Second, [refactor code](#how-to-refactor-code) to help the codemod update templates correctly.</sup>
|
|
35
33
|
|
|
36
34
|
<sup>2. Files such as `.eslintrc.js`, `.prettierrc.js`, `.stylelintrc.js`, `.template-lintrc.js`, `ember-cli-build.js`, `package.json`, `postcss.config.js`, `tsconfig.json`, etc.</sup>
|
|
37
35
|
|
|
@@ -55,7 +53,7 @@ npx ember-codemod-remove-ember-css-modules --component-structure="nested"
|
|
|
55
53
|
Pass `--root` to run the codemod on a project somewhere else (i.e. not in the current directory).
|
|
56
54
|
|
|
57
55
|
```sh
|
|
58
|
-
npx ember-codemod-remove-ember-css-modules --root=<your/project
|
|
56
|
+
npx ember-codemod-remove-ember-css-modules --root=<path/to/your/project>
|
|
59
57
|
```
|
|
60
58
|
|
|
61
59
|
</details>
|
|
@@ -68,8 +66,8 @@ The codemod is designed to cover typical uses of `ember-css-modules`. It is not
|
|
|
68
66
|
To better meet your needs, consider cloning the repo and running the codemod locally.
|
|
69
67
|
|
|
70
68
|
```sh
|
|
71
|
-
cd <
|
|
72
|
-
./bin/ember-codemod-remove-ember-css-modules.js --root=<your/project
|
|
69
|
+
cd <path/to/cloned/repo>
|
|
70
|
+
./bin/ember-codemod-remove-ember-css-modules.js --root=<path/to/your/project>
|
|
73
71
|
```
|
|
74
72
|
|
|
75
73
|
|
|
@@ -181,7 +179,7 @@ In `ember-css-modules`, a string can represent multiple local class names via co
|
|
|
181
179
|
|
|
182
180
|
</details>
|
|
183
181
|
|
|
184
|
-
The codemod
|
|
182
|
+
The codemod may fail to update complex expressions. Refactor templates to provide hints. For example, remove nested conditionals (apply them outside the HTML element) and use the `{{concat}}` helper to group substrings.
|
|
185
183
|
|
|
186
184
|
<details>
|
|
187
185
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ember-codemod-remove-ember-css-modules",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Codemod to replace ember-css-modules with embroider-css-modules",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"codemod",
|
|
@@ -27,33 +27,31 @@
|
|
|
27
27
|
"test": "tests"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@babel/parser": "^7.
|
|
30
|
+
"@babel/parser": "^7.22.4",
|
|
31
31
|
"@codemod-utils/blueprints": "^0.1.1",
|
|
32
32
|
"@codemod-utils/files": "^0.1.0",
|
|
33
33
|
"@codemod-utils/json": "^0.1.1",
|
|
34
34
|
"ember-template-recast": "^6.1.4",
|
|
35
|
-
"recast": "^0.23.
|
|
35
|
+
"recast": "^0.23.2",
|
|
36
36
|
"yargs": "^17.7.2"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@babel/core": "^7.21.5",
|
|
40
|
-
"@babel/eslint-parser": "^7.21.3",
|
|
41
39
|
"@codemod-utils/tests": "^0.1.0",
|
|
42
40
|
"@sondr3/minitest": "^0.1.1",
|
|
43
|
-
"
|
|
44
|
-
"eslint
|
|
45
|
-
"
|
|
46
|
-
"eslint-
|
|
47
|
-
"
|
|
48
|
-
"eslint-plugin-simple-import-sort": "^10.0.0",
|
|
49
|
-
"prettier": "^2.8.8"
|
|
41
|
+
"concurrently": "^8.1.0",
|
|
42
|
+
"eslint": "^8.42.0",
|
|
43
|
+
"prettier": "^2.8.8",
|
|
44
|
+
"@shared-configs/eslint-config": "0.0.0",
|
|
45
|
+
"@shared-configs/prettier": "0.0.0"
|
|
50
46
|
},
|
|
51
47
|
"engines": {
|
|
52
48
|
"node": "16.* || >= 18"
|
|
53
49
|
},
|
|
54
50
|
"scripts": {
|
|
55
|
-
"lint": "
|
|
56
|
-
"lint:fix": "
|
|
51
|
+
"lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\"",
|
|
52
|
+
"lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"",
|
|
53
|
+
"lint:js": "eslint . --cache",
|
|
54
|
+
"lint:js:fix": "eslint . --fix",
|
|
57
55
|
"test": "mt tests --quiet"
|
|
58
56
|
}
|
|
59
57
|
}
|