@next2d/view-generator 1.3.2 → 1.4.0
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/index.js +12 -8
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -75,11 +75,13 @@ const createFile = function ()
|
|
|
75
75
|
console.log(`Create a new View Class ${viewFile}.`);
|
|
76
76
|
console.log();
|
|
77
77
|
|
|
78
|
-
fs.writeFileSync(viewFile,
|
|
78
|
+
fs.writeFileSync(viewFile, `import { View } from "@next2d/framework";
|
|
79
|
+
|
|
80
|
+
/**
|
|
79
81
|
* @class
|
|
80
|
-
* @extends {
|
|
82
|
+
* @extends {View}
|
|
81
83
|
*/
|
|
82
|
-
export class ${name}View extends
|
|
84
|
+
export class ${name}View extends View
|
|
83
85
|
{
|
|
84
86
|
/**
|
|
85
87
|
* @constructor
|
|
@@ -99,14 +101,16 @@ export class ${name}View extends next2d.fw.View
|
|
|
99
101
|
console.log(`Create a new ViewModel Class ${viewModelFile}.`);
|
|
100
102
|
console.log();
|
|
101
103
|
|
|
102
|
-
fs.writeFileSync(viewModelFile,
|
|
104
|
+
fs.writeFileSync(viewModelFile, `import { ViewModel } from "@next2d/framework";
|
|
105
|
+
|
|
106
|
+
/**
|
|
103
107
|
* @class
|
|
104
|
-
* @extends {
|
|
108
|
+
* @extends {ViewModel}
|
|
105
109
|
*/
|
|
106
|
-
export class ${name}ViewModel extends
|
|
110
|
+
export class ${name}ViewModel extends ViewModel
|
|
107
111
|
{
|
|
108
112
|
/**
|
|
109
|
-
* @param {
|
|
113
|
+
* @param {View} view
|
|
110
114
|
* @return {void}
|
|
111
115
|
* @method
|
|
112
116
|
* @public
|
|
@@ -117,7 +121,7 @@ export class ${name}ViewModel extends next2d.fw.ViewModel
|
|
|
117
121
|
}
|
|
118
122
|
|
|
119
123
|
/**
|
|
120
|
-
* @param {
|
|
124
|
+
* @param {View} view
|
|
121
125
|
* @return {Promise}
|
|
122
126
|
* @method
|
|
123
127
|
* @public
|