@next2d/view-generator 1.1.1 → 1.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 +7 -2
- package/index.js +7 -3
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
|
+
# view-generator
|
|
2
|
+
|
|
1
3
|
[](https://github.com/Next2D/view-generator/actions/workflows/codeql-analysis.yml)
|
|
4
|
+
[](https://github.com/Next2D/view-generator/actions/workflows/lint.yml)
|
|
2
5
|
[](https://github.com/Next2D/view-generator/releases)
|
|
3
6
|
[](https://github.com/Next2D/view-generator/blob/main/LICENSE)
|
|
4
7
|
|
|
5
|
-
# view-generator
|
|
6
8
|
Generate the View class required for routing.
|
|
7
9
|
|
|
8
10
|
## Commands
|
|
9
11
|
|
|
10
12
|
```sh
|
|
11
13
|
npx @next2d/view-generator
|
|
12
|
-
```
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## License
|
|
17
|
+
This project is licensed under the [MIT License](https://opensource.org/licenses/MIT) - see the [LICENSE](LICENSE) file for details.
|
package/index.js
CHANGED
|
@@ -44,6 +44,10 @@ const createFile = function ()
|
|
|
44
44
|
|
|
45
45
|
const names = keys[idx].split(/[-_/]/);
|
|
46
46
|
|
|
47
|
+
if (names[0].charAt(0) === "@") {
|
|
48
|
+
continue;
|
|
49
|
+
}
|
|
50
|
+
|
|
47
51
|
const viewDir = path.join(cwd, `view/${names[0]}`);
|
|
48
52
|
if (!fs.existsSync(viewDir)) {
|
|
49
53
|
|
|
@@ -113,12 +117,12 @@ export class ${name}ViewModel extends next2d.fw.ViewModel
|
|
|
113
117
|
|
|
114
118
|
/**
|
|
115
119
|
* @param {next2d.fw.View} view
|
|
116
|
-
* @return {void}
|
|
117
|
-
* @
|
|
120
|
+
* @return {Promise|void}
|
|
121
|
+
* @public
|
|
118
122
|
*/
|
|
119
123
|
bind (view)
|
|
120
124
|
{
|
|
121
|
-
|
|
125
|
+
return this.factory();
|
|
122
126
|
}
|
|
123
127
|
}`);
|
|
124
128
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@next2d/view-generator",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.4",
|
|
4
4
|
"description": "Generate the View class required for routing.",
|
|
5
5
|
"author": "Toshiyuki Ienaga<ienaga@tvon.jp>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
"bin": {
|
|
21
21
|
"@next2d/view-generator": "index.js"
|
|
22
22
|
},
|
|
23
|
-
"dependencies": {
|
|
24
|
-
"chalk": "4.1.0",
|
|
25
|
-
"commander": "4.1.1",
|
|
26
|
-
"fs-extra": "9.0.1"
|
|
27
|
-
},
|
|
28
23
|
"devDependencies": {
|
|
29
|
-
"eslint": "^8.
|
|
24
|
+
"eslint": "^8.22.0"
|
|
25
|
+
},
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"chalk": "^5.0.1",
|
|
28
|
+
"commander": "^9.4.0",
|
|
29
|
+
"fs-extra": "^10.1.0"
|
|
30
30
|
}
|
|
31
31
|
}
|