ember-codemod-remove-ember-css-modules 2.0.5 → 2.0.6
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/dist/src/blueprints/ember-cli/component/javascript.js +1 -1
- package/dist/src/blueprints/ember-cli/component/typescript.ts +4 -4
- package/dist/src/blueprints/ember-cli/controller/javascript.js +1 -1
- package/dist/src/blueprints/ember-cli/controller/typescript.ts +1 -1
- package/dist/src/utils/steps/import-styles/create-class.js +2 -2
- package/package.json +5 -5
|
@@ -2,6 +2,6 @@ import Component from '@glimmer/component';
|
|
|
2
2
|
|
|
3
3
|
<% if (options.componentStructure === 'nested') { %>import styles from './index.css';<% } else { %>import styles from './<%= entity.fileName %>.css';<% } %>
|
|
4
4
|
|
|
5
|
-
export default class <%= entity.
|
|
5
|
+
export default class <%= entity.pascalizedName %>Component extends Component {
|
|
6
6
|
styles = styles;
|
|
7
7
|
}
|
|
@@ -2,7 +2,7 @@ import Component from '@glimmer/component';
|
|
|
2
2
|
|
|
3
3
|
<% if (options.componentStructure === 'nested') { %>import styles from './index.css';<% } else { %>import styles from './<%= entity.fileName %>.css';<% } %>
|
|
4
4
|
|
|
5
|
-
interface <%= entity.
|
|
5
|
+
interface <%= entity.pascalizedName %>Signature {
|
|
6
6
|
// The arguments accepted by the component
|
|
7
7
|
Args: {};
|
|
8
8
|
// Any blocks yielded by the component
|
|
@@ -13,14 +13,14 @@ interface <%= entity.classifiedName %>Signature {
|
|
|
13
13
|
Element: null;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
export default class <%= entity.
|
|
16
|
+
export default class <%= entity.pascalizedName %>Component extends Component<<%= entity.pascalizedName %>Signature> {
|
|
17
17
|
styles = styles;
|
|
18
18
|
}
|
|
19
19
|
<% if (options.project.hasGlint) { %>
|
|
20
20
|
declare module '@glint/environment-ember-loose/registry' {
|
|
21
21
|
export default interface Registry {
|
|
22
|
-
'<%= entity.doubleColonizedName %>': typeof <%= entity.
|
|
23
|
-
'<%= entity.name %>': typeof <%= entity.
|
|
22
|
+
'<%= entity.doubleColonizedName %>': typeof <%= entity.pascalizedName %>Component;
|
|
23
|
+
'<%= entity.name %>': typeof <%= entity.pascalizedName %>Component;
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
<% } %>
|
|
@@ -2,6 +2,6 @@ import Controller from '@ember/controller';
|
|
|
2
2
|
|
|
3
3
|
import styles from './<%= entity.fileName %>.css';
|
|
4
4
|
|
|
5
|
-
export default class <%= entity.
|
|
5
|
+
export default class <%= entity.pascalizedName %>Controller extends Controller {
|
|
6
6
|
styles = styles;
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@ import Controller from '@ember/controller';
|
|
|
2
2
|
|
|
3
3
|
import styles from './<%= entity.fileName %>.css';
|
|
4
4
|
|
|
5
|
-
export default class <%= entity.
|
|
5
|
+
export default class <%= entity.pascalizedName %>Controller extends Controller {
|
|
6
6
|
styles = styles;
|
|
7
7
|
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { readFileSync } from 'node:fs';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
3
|
import { processTemplate } from '@codemod-utils/blueprints';
|
|
4
|
-
import {
|
|
4
|
+
import { doubleColonize, pascalize } from '@codemod-utils/ember';
|
|
5
5
|
import { createFiles, parseFilePath } from '@codemod-utils/files';
|
|
6
6
|
import { blueprintsRoot } from '../../blueprints.js';
|
|
7
7
|
export function createClass(entityName, { customizations, options }) {
|
|
8
8
|
const { blueprintFilePaths, getFilePath } = customizations;
|
|
9
9
|
const entity = {
|
|
10
|
-
classifiedName: classify(entityName),
|
|
11
10
|
doubleColonizedName: doubleColonize(entityName),
|
|
12
11
|
fileName: parseFilePath(entityName).name,
|
|
13
12
|
name: entityName,
|
|
13
|
+
pascalizedName: pascalize(entityName),
|
|
14
14
|
};
|
|
15
15
|
const filePath = getFilePath(entityName);
|
|
16
16
|
const fileMap = new Map(blueprintFilePaths.map((blueprintFilePath) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ember-codemod-remove-ember-css-modules",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.6",
|
|
4
4
|
"description": "Codemod to replace ember-css-modules with embroider-css-modules",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"codemod",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@codemod-utils/ast-javascript": "^1.2.8",
|
|
30
30
|
"@codemod-utils/ast-template": "^1.1.4",
|
|
31
31
|
"@codemod-utils/blueprints": "^1.1.5",
|
|
32
|
-
"@codemod-utils/ember
|
|
32
|
+
"@codemod-utils/ember": "^2.0.0",
|
|
33
33
|
"@codemod-utils/files": "^2.0.4",
|
|
34
34
|
"@codemod-utils/json": "^1.1.9",
|
|
35
35
|
"yargs": "^17.7.2"
|
|
@@ -37,15 +37,15 @@
|
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@codemod-utils/tests": "^1.1.7",
|
|
39
39
|
"@sondr3/minitest": "^0.1.2",
|
|
40
|
-
"@types/node": "^18.19.
|
|
40
|
+
"@types/node": "^18.19.47",
|
|
41
41
|
"@types/yargs": "^17.0.33",
|
|
42
42
|
"concurrently": "^8.2.2",
|
|
43
43
|
"eslint": "^8.57.0",
|
|
44
44
|
"prettier": "^3.3.3",
|
|
45
45
|
"typescript": "^5.5.4",
|
|
46
46
|
"@shared-configs/eslint-config-node": "0.0.0",
|
|
47
|
-
"@shared-configs/
|
|
48
|
-
"@shared-configs/
|
|
47
|
+
"@shared-configs/prettier": "0.0.0",
|
|
48
|
+
"@shared-configs/typescript": "0.0.0"
|
|
49
49
|
},
|
|
50
50
|
"engines": {
|
|
51
51
|
"node": "18.* || >= 20"
|