@next2d/view-generator 0.0.4 → 0.0.5
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 +5 -3
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -33,6 +33,7 @@ const createFile = function ()
|
|
|
33
33
|
const routingPath = path.join(cwd, "config/routing.json");
|
|
34
34
|
if (!fs.existsSync(routingPath)) {
|
|
35
35
|
console.log(`${chalk.red("Could not find routing.json.")}`);
|
|
36
|
+
console.log();
|
|
36
37
|
return ;
|
|
37
38
|
}
|
|
38
39
|
|
|
@@ -45,6 +46,10 @@ const createFile = function ()
|
|
|
45
46
|
|
|
46
47
|
const viewDir = path.join(cwd, `view/${names[0]}`);
|
|
47
48
|
if (!fs.existsSync(viewDir)) {
|
|
49
|
+
|
|
50
|
+
console.log(`${chalk.green(`Create a new Directory ${viewDir}.`)}`);
|
|
51
|
+
console.log();
|
|
52
|
+
|
|
48
53
|
fs.ensureDirSync(viewDir);
|
|
49
54
|
}
|
|
50
55
|
|
|
@@ -63,7 +68,6 @@ const createFile = function ()
|
|
|
63
68
|
const viewFile = path.join(viewDir, `${name}View.js`);
|
|
64
69
|
if (!fs.existsSync(viewFile)) {
|
|
65
70
|
|
|
66
|
-
console.log();
|
|
67
71
|
console.log(`Create a new View Class ${viewFile}.`);
|
|
68
72
|
console.log();
|
|
69
73
|
|
|
@@ -88,7 +92,6 @@ export class ${name}View extends next2d.fw.View
|
|
|
88
92
|
const viewModelFile = path.join(viewDir, `${name}ViewModel.js`);
|
|
89
93
|
if (!fs.existsSync(viewModelFile)) {
|
|
90
94
|
|
|
91
|
-
console.log();
|
|
92
95
|
console.log(`Create a new ViewModel Class ${viewModelFile}.`);
|
|
93
96
|
console.log();
|
|
94
97
|
|
|
@@ -121,7 +124,6 @@ export class ${name}ViewModel extends next2d.fw.ViewModel
|
|
|
121
124
|
}
|
|
122
125
|
}
|
|
123
126
|
|
|
124
|
-
console.log();
|
|
125
127
|
console.log(`${chalk.green("Finished.")}`);
|
|
126
128
|
console.log();
|
|
127
129
|
};
|