@dolphjs/cli 1.1.8 โ 1.1.9
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 +2 -2
- package/dist/generators/generate_controller.js +23 -21
- package/dist/generators/spring/generate_spring_model.js +42 -0
- package/dist/generators/spring/generate_spring_service.js +42 -0
- package/dist/generators/templates/spring_controller_template.js +1 -1
- package/dist/generators/templates/spring_model_template.js +40 -0
- package/dist/generators/templates/spring_service_template.js +86 -0
- package/dist/registers/register_component.js +64 -0
- package/dist/utils/package_generator.js +31 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ to install all packages .
|
|
|
27
27
|
- models
|
|
28
28
|
- routes
|
|
29
29
|
|
|
30
|
-
It is recommended to make use of the `generate` command when one
|
|
30
|
+
It is recommended to make use of the `generate` command when one wants to create these files because it generates code the dolphjs way. In a scenario when you want to create files for all of the above, let's say you want to write code for user logic and functionalities, use the `-a` flag, as in:
|
|
31
31
|
|
|
32
32
|
```bash
|
|
33
33
|
dolph-cli g -a user
|
|
@@ -61,4 +61,4 @@ the command above creates a service, controller, model and routes file for `user
|
|
|
61
61
|
|
|
62
62
|
## Credit
|
|
63
63
|
|
|
64
|
-
dolphjs-cli is inspired by methane-cli [https://github.com/adedoyin/methane-cli]
|
|
64
|
+
dolphjs-cli is inspired by methane-cli [https://github.com/adedoyin-Emmanuel/methane-cli]
|
|
@@ -38,27 +38,29 @@ export const generateController = async (name) => {
|
|
|
38
38
|
if (readConfig().routing === "spring") {
|
|
39
39
|
generateSpringController(name);
|
|
40
40
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
const controllerDirName = path.join(controllerDir, name);
|
|
49
|
-
const controllerFilePath = path.join(controllerDirName + `/${name}.controller.${readConfig().language}`);
|
|
50
|
-
try {
|
|
51
|
-
// Create the generate controller path
|
|
52
|
-
if (readConfig().generateFolder === "true" || true) {
|
|
53
|
-
mkdirSync(controllerDirName);
|
|
41
|
+
else {
|
|
42
|
+
if (!name)
|
|
43
|
+
chalk.bold(chalk.red("Controller extension or name is required! ๐คจ"));
|
|
44
|
+
let controllerDir = findControllerDirectory();
|
|
45
|
+
if (!controllerDir) {
|
|
46
|
+
createControllerDirectory();
|
|
47
|
+
controllerDir = findControllerDirectory();
|
|
54
48
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
49
|
+
const controllerDirName = path.join(controllerDir, name);
|
|
50
|
+
const controllerFilePath = path.join(controllerDirName + `/${name}.controller.${readConfig().language}`);
|
|
51
|
+
try {
|
|
52
|
+
// Create the generate controller path
|
|
53
|
+
if (readConfig().generateFolder === "true" || true) {
|
|
54
|
+
mkdirSync(controllerDirName);
|
|
55
|
+
}
|
|
56
|
+
//TODO: if no index.ts file, create one too
|
|
57
|
+
generateControllerFile(name, path.join(controllerFilePath), readConfig
|
|
58
|
+
// controllerDirName,
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
catch (e) {
|
|
62
|
+
console.log(chalk.bold(chalk.red(e)));
|
|
63
|
+
}
|
|
64
|
+
console.log(`${chalk.bold(chalk.green(`${name}.controller.${readConfig().language} generated successfully! ๐`))}`);
|
|
62
65
|
}
|
|
63
|
-
console.log(`${chalk.bold(chalk.green(`${name}.controller.${readConfig().language} generated successfully! ๐`))}`);
|
|
64
66
|
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { existsSync, mkdirSync, writeFile } from "fs";
|
|
2
|
+
import path from "path";
|
|
3
|
+
import chalk from "chalk";
|
|
4
|
+
import { generateSpringModel } from "../../generators/templates/spring_model_template.js";
|
|
5
|
+
import { dolphMsg } from "../../helpers/messages.js";
|
|
6
|
+
const createModelDirectory = (componentName) => {
|
|
7
|
+
const projectRoot = path.join(process.cwd());
|
|
8
|
+
const userModelPath = path.join(projectRoot, `/src/${componentName}`);
|
|
9
|
+
if (!existsSync(userModelPath)) {
|
|
10
|
+
mkdirSync(userModelPath);
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
const findModelDirectory = (componentName) => {
|
|
14
|
+
const rootDir = process.cwd();
|
|
15
|
+
const possibleDirs = [`src/${componentName}`];
|
|
16
|
+
const modelDir = possibleDirs.find((dir) => existsSync(path.join(rootDir, dir)));
|
|
17
|
+
return modelDir ? path.join(rootDir, modelDir) : null;
|
|
18
|
+
};
|
|
19
|
+
export const generateSpringModelFile = async (componentName, modelDir, isMongo, isMySql) => {
|
|
20
|
+
await writeFile(modelDir, generateSpringModel(componentName, isMongo, isMySql), (error) => {
|
|
21
|
+
if (error) {
|
|
22
|
+
dolphMsg.errorRed(error.toString());
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
export const generateModel = async (name, isMongo, isMySql) => {
|
|
27
|
+
if (!name)
|
|
28
|
+
dolphMsg.errorRed("model extension or name is required! ๐คจ");
|
|
29
|
+
let modelDir = findModelDirectory(name);
|
|
30
|
+
if (!modelDir) {
|
|
31
|
+
createModelDirectory(name);
|
|
32
|
+
modelDir = findModelDirectory(name);
|
|
33
|
+
}
|
|
34
|
+
const modelFilePath = path.join(modelDir + `/${name}.model.ts`);
|
|
35
|
+
try {
|
|
36
|
+
generateSpringModelFile(name, path.join(modelFilePath), isMongo, isMySql);
|
|
37
|
+
}
|
|
38
|
+
catch (e) {
|
|
39
|
+
dolphMsg.errorRed(e);
|
|
40
|
+
}
|
|
41
|
+
dolphMsg.info(`${chalk.blue(`${name}.model.ts`)} generated successfully for ${chalk.blue(`${name}`)} component.`);
|
|
42
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { existsSync, mkdirSync, writeFile } from "fs";
|
|
2
|
+
import path from "path";
|
|
3
|
+
import chalk from "chalk";
|
|
4
|
+
import { generateSpringService } from "../../generators/templates/spring_service_template.js";
|
|
5
|
+
import { dolphMsg } from "../../helpers/messages.js";
|
|
6
|
+
const createServiceDirectory = (componentName) => {
|
|
7
|
+
const projectRoot = path.join(process.cwd());
|
|
8
|
+
const userServicePath = path.join(projectRoot, `/src/${componentName}`);
|
|
9
|
+
if (!existsSync(userServicePath)) {
|
|
10
|
+
mkdirSync(userServicePath);
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
const findServiceDirectory = (componentName) => {
|
|
14
|
+
const rootDir = process.cwd();
|
|
15
|
+
const possibleDirs = [`src/${componentName}`];
|
|
16
|
+
const serviceDir = possibleDirs.find((dir) => existsSync(path.join(rootDir, dir)));
|
|
17
|
+
return serviceDir ? path.join(rootDir, serviceDir) : null;
|
|
18
|
+
};
|
|
19
|
+
export const generateSpringServiceFile = async (componentName, serviceDir, isMongo, isMySql) => {
|
|
20
|
+
await writeFile(serviceDir, generateSpringService(componentName, isMongo, isMySql), (error) => {
|
|
21
|
+
if (error) {
|
|
22
|
+
dolphMsg.errorRed(error.toString());
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
export const generateService = async (name, isMongo, isMySql) => {
|
|
27
|
+
if (!name)
|
|
28
|
+
dolphMsg.errorRed("service extension or name is required! ๐คจ");
|
|
29
|
+
let serviceDir = findServiceDirectory(name);
|
|
30
|
+
if (!serviceDir) {
|
|
31
|
+
createServiceDirectory(name);
|
|
32
|
+
serviceDir = findServiceDirectory(name);
|
|
33
|
+
}
|
|
34
|
+
const serviceFilePath = path.join(serviceDir + `/${name}.service.ts`);
|
|
35
|
+
try {
|
|
36
|
+
generateSpringServiceFile(name, path.join(serviceFilePath), isMongo, isMySql);
|
|
37
|
+
}
|
|
38
|
+
catch (e) {
|
|
39
|
+
dolphMsg.errorRed(e);
|
|
40
|
+
}
|
|
41
|
+
dolphMsg.info(`${chalk.blue(`${name}.service.ts`)} generated successfully for ${chalk.blue(`${name}`)} component.`);
|
|
42
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export const generateSpringModel = (componentName, isMongo, isMysql) => {
|
|
2
|
+
let template;
|
|
3
|
+
const capitalizeFirstLetter = (str) => {
|
|
4
|
+
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
5
|
+
};
|
|
6
|
+
if (isMongo) {
|
|
7
|
+
template = `import { Schema, Document, model } from "mongoose";
|
|
8
|
+
|
|
9
|
+
export interface I${capitalizeFirstLetter(componentName)} extends Document {
|
|
10
|
+
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const ${capitalizeFirstLetter(componentName)}Schema = new Schema(
|
|
14
|
+
{
|
|
15
|
+
|
|
16
|
+
}
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
export const ${capitalizeFirstLetter(componentName)}Model = model<I${capitalizeFirstLetter(componentName)}>("${componentName.charAt(0) !== "s" ? `${componentName}s` : componentName}", ${capitalizeFirstLetter(componentName)}Schema);
|
|
20
|
+
`;
|
|
21
|
+
}
|
|
22
|
+
if (isMysql) {
|
|
23
|
+
template = `import { sequelizeInstance } from "@/shared/configs/db.configs";
|
|
24
|
+
import { DataTypes } from "sequelize";
|
|
25
|
+
|
|
26
|
+
export const ${capitalizeFirstLetter(componentName)} = sequelizeInstance.define("${componentName}", {
|
|
27
|
+
id: {
|
|
28
|
+
type: DataTypes.INTEGER,
|
|
29
|
+
allowNull: false,
|
|
30
|
+
primaryKey: true,
|
|
31
|
+
autoIncrement: true,
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
`;
|
|
35
|
+
}
|
|
36
|
+
if (!isMongo && !isMysql) {
|
|
37
|
+
template = ``;
|
|
38
|
+
}
|
|
39
|
+
return template;
|
|
40
|
+
};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
export const generateSpringService = (componentName, isMongo, isMySql) => {
|
|
2
|
+
let template;
|
|
3
|
+
const capitalizeFirstLetter = (str) => {
|
|
4
|
+
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
5
|
+
};
|
|
6
|
+
const className = capitalizeFirstLetter(componentName) + "Service";
|
|
7
|
+
if (isMongo && isMySql) {
|
|
8
|
+
template = `
|
|
9
|
+
import { DolphServiceHandler } from "@dolphjs/dolph/classes";
|
|
10
|
+
import { Dolph } from "@dolphjs/dolph/common";
|
|
11
|
+
import { InjectMongo, InjectMySQL } from "@dolphjs/dolph/decorators";
|
|
12
|
+
import { Model } from "mongoose";
|
|
13
|
+
import { ModelStatic, Model as SqlModel } from "sequelize";
|
|
14
|
+
import { ${capitalizeFirstLetter(componentName)}Model, I${capitalizeFirstLetter(componentName)} } from "./${componentName}.model";
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@InjectMongo("${componentName}Model", ${capitalizeFirstLetter(componentName)}Model)
|
|
18
|
+
@InjectMySQL("${componentName}SqlModel", )
|
|
19
|
+
export class ${className} extends DolphServiceHandler<Dolph> {
|
|
20
|
+
${componentName}Model!: Model<${capitalizeFirstLetter(componentName)}>;
|
|
21
|
+
${componentName}SqlModel!: ModelStatic<SqlModel<any, any>>;
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
constructor() {
|
|
25
|
+
super("${className.toLowerCase()}");
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
`;
|
|
30
|
+
}
|
|
31
|
+
if (isMongo) {
|
|
32
|
+
template = `
|
|
33
|
+
import { DolphServiceHandler } from "@dolphjs/dolph/classes";
|
|
34
|
+
import { Dolph } from "@dolphjs/dolph/common";
|
|
35
|
+
import { InjectMongo} from "@dolphjs/dolph/decorators";
|
|
36
|
+
import { Model } from "mongoose";
|
|
37
|
+
import { ${capitalizeFirstLetter(componentName)}Model, I${capitalizeFirstLetter(componentName)} } from "./${componentName}.model";
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
@InjectMongo("${componentName}Model", ${capitalizeFirstLetter(componentName)}Model)
|
|
41
|
+
export class ${className} extends DolphServiceHandler<Dolph> {
|
|
42
|
+
${componentName}Model!: Model<>;
|
|
43
|
+
|
|
44
|
+
constructor() {
|
|
45
|
+
super("${className.toLowerCase()}");
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
`;
|
|
50
|
+
}
|
|
51
|
+
if (isMySql) {
|
|
52
|
+
template = `
|
|
53
|
+
import { DolphServiceHandler } from "@dolphjs/dolph/classes";
|
|
54
|
+
import { Dolph } from "@dolphjs/dolph/common";
|
|
55
|
+
import { InjectMySQL } from "@dolphjs/dolph/decorators";
|
|
56
|
+
import { ModelStatic, Model } from "sequelize";
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
@InjectMySQL("${componentName}Model", )
|
|
60
|
+
export class ${className} extends DolphServiceHandler<Dolph> {
|
|
61
|
+
${componentName}Model!: ModelStatic<Model<any, any>>;
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
constructor() {
|
|
65
|
+
super("${className.toLowerCase()}");
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
`;
|
|
70
|
+
}
|
|
71
|
+
if (!isMongo && !isMySql) {
|
|
72
|
+
template = `
|
|
73
|
+
import { DolphServiceHandler } from "@dolphjs/dolph/classes";
|
|
74
|
+
import { Dolph } from "@dolphjs/dolph/common";
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
export class ${className} extends DolphServiceHandler<Dolph> {
|
|
78
|
+
|
|
79
|
+
constructor() {
|
|
80
|
+
super("${className.toLowerCase()}");
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
`;
|
|
84
|
+
}
|
|
85
|
+
return template;
|
|
86
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
|
|
2
|
+
import { dolphMsg } from "../helpers/messages.js";
|
|
3
|
+
import path from "path";
|
|
4
|
+
const createSrcDirectory = () => {
|
|
5
|
+
const projectRoot = path.join(process.cwd());
|
|
6
|
+
const userComponentPath = path.join(projectRoot, `/src`);
|
|
7
|
+
if (!existsSync(userComponentPath)) {
|
|
8
|
+
mkdirSync(userComponentPath);
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
const findSrcDirectory = () => {
|
|
12
|
+
const rootDir = process.cwd();
|
|
13
|
+
const possibleDirs = [`src`];
|
|
14
|
+
const srcDir = possibleDirs.find((dir) => existsSync(path.join(rootDir, dir)));
|
|
15
|
+
return srcDir ? path.join(rootDir, srcDir) : null;
|
|
16
|
+
};
|
|
17
|
+
export const addComponentToServerFile = (componentName) => {
|
|
18
|
+
if (!componentName) {
|
|
19
|
+
dolphMsg.errorRed("component extension or name is required! ๐คจ");
|
|
20
|
+
}
|
|
21
|
+
const serverDir = findSrcDirectory();
|
|
22
|
+
if (!serverDir) {
|
|
23
|
+
dolphMsg.errorRed("something went wrong, please make sure to use the `new` command when creating a dolph project.");
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
const serverPath = path.join(serverDir, "server.ts");
|
|
27
|
+
const capitalizedString = componentName.charAt(0).toUpperCase() + componentName.slice(1);
|
|
28
|
+
const importStatement = `import { ${capitalizedString}Component } from "./${componentName}/${componentName}.component.ts";`;
|
|
29
|
+
try {
|
|
30
|
+
if (!existsSync(serverPath)) {
|
|
31
|
+
const fileContent = `import { DolphFactory } from "@dolphjs/dolph";
|
|
32
|
+
${importStatement}
|
|
33
|
+
const dolph = new DolphFactory([${capitalizedString}Component]);
|
|
34
|
+
dolph.start();
|
|
35
|
+
`;
|
|
36
|
+
writeFileSync(serverPath, fileContent);
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
const fileContent = readFileSync(serverPath, "utf8");
|
|
40
|
+
const newComponentInstance = `${capitalizedString}Component`;
|
|
41
|
+
if (!fileContent.includes(importStatement)) {
|
|
42
|
+
const updatedContent = `
|
|
43
|
+
${importStatement}\n${fileContent}}`;
|
|
44
|
+
writeFileSync(serverPath, updatedContent);
|
|
45
|
+
}
|
|
46
|
+
if (fileContent.includes(`const dolph`)) {
|
|
47
|
+
// add new controller class to the existing array
|
|
48
|
+
const routesArrayMatch = fileContent.match(/const dolph = new DolphFactory\[([\s\S]]+?)\];/);
|
|
49
|
+
if (routesArrayMatch) {
|
|
50
|
+
const existingCode = routesArrayMatch[1].trim();
|
|
51
|
+
let fileContents;
|
|
52
|
+
fileContents = fileContent.replace(existingCode, `${existingCode.length > 0 ? existingCode + ", " : ""}${newComponentInstance}`);
|
|
53
|
+
const updatedContents = `${importStatement}\n${fileContents}`;
|
|
54
|
+
writeFileSync(serverPath, updatedContents);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
dolphMsg.info(`added ${capitalizedString}Component to components array in server.ts file.`);
|
|
59
|
+
process.exit(0);
|
|
60
|
+
}
|
|
61
|
+
catch (e) {
|
|
62
|
+
dolphMsg.errorRed(e.toString());
|
|
63
|
+
}
|
|
64
|
+
};
|
|
@@ -10,6 +10,9 @@ import { addRoutesIndexFile } from "../registers/register_routes.js";
|
|
|
10
10
|
import { addServerFile } from "../registers/server_file_routes.js";
|
|
11
11
|
import { dolphMsg } from "../helpers/messages.js";
|
|
12
12
|
import { generateComponent } from "../generators/spring/generate_spring_component.js";
|
|
13
|
+
import { generateService } from "../generators/spring/generate_spring_service.js";
|
|
14
|
+
import { generateModel } from "../generators/spring/generate_spring_model.js";
|
|
15
|
+
import { addComponentToServerFile } from "../registers/register_component.js";
|
|
13
16
|
export const packageGenerator = () => {
|
|
14
17
|
program
|
|
15
18
|
.command("generate")
|
|
@@ -28,7 +31,12 @@ export const packageGenerator = () => {
|
|
|
28
31
|
}
|
|
29
32
|
// generates service files for the paramter name
|
|
30
33
|
if (key && key.toLowerCase().includes("service") && value) {
|
|
31
|
-
|
|
34
|
+
if (readConfig().routing === "express") {
|
|
35
|
+
serviceGen.generateService(value.toString());
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
generateService(value.toString(), readConfig().database === "mongo" ? true : false, readConfig().database === "mysql" ? true : false);
|
|
39
|
+
}
|
|
32
40
|
}
|
|
33
41
|
// generatess routes files for the paramter name
|
|
34
42
|
if (key && key.toLowerCase().includes("route") && value) {
|
|
@@ -42,9 +50,14 @@ export const packageGenerator = () => {
|
|
|
42
50
|
}
|
|
43
51
|
// generatess model fles for the paramter name
|
|
44
52
|
if (key && key.toLowerCase().includes("model") && value) {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
53
|
+
if (readConfig().routing === "express") {
|
|
54
|
+
modelGen.generateModel(value.toString());
|
|
55
|
+
if (readConfig().database === "mysql") {
|
|
56
|
+
mysqlGen.generateConfig(value.toString());
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
generateModel(value.toString(), readConfig().database === "mongo" ? true : false, readConfig().database === "mysql" ? true : false);
|
|
48
61
|
}
|
|
49
62
|
}
|
|
50
63
|
if (key && key.toLowerCase().includes("component") && value) {
|
|
@@ -52,12 +65,22 @@ export const packageGenerator = () => {
|
|
|
52
65
|
}
|
|
53
66
|
// generates files for all the above options
|
|
54
67
|
if (key && key.toLowerCase().includes("all") && value) {
|
|
55
|
-
|
|
68
|
+
if (readConfig().routing === "express") {
|
|
69
|
+
modelGen.generateModel(value.toString());
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
generateModel(value.toString(), readConfig().database === "mongo" ? true : false, readConfig().database === "mysql" ? true : false);
|
|
73
|
+
}
|
|
56
74
|
if (readConfig().database === "mysql") {
|
|
57
75
|
mysqlGen.generateConfig(value.toString());
|
|
58
76
|
}
|
|
59
|
-
|
|
60
|
-
|
|
77
|
+
if (readConfig().routing === "express") {
|
|
78
|
+
serviceGen.generateService(value.toString());
|
|
79
|
+
controllerGen.generateController(value.toString());
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
generateService(value.toString(), readConfig().database === "mongo" ? true : false, readConfig().database === "mysql" ? true : false);
|
|
83
|
+
}
|
|
61
84
|
if (readConfig().routing === "express") {
|
|
62
85
|
routesGen.generateRouter(value.toString());
|
|
63
86
|
addRoutesIndexFile(value.toString(), readConfig);
|
|
@@ -65,6 +88,7 @@ export const packageGenerator = () => {
|
|
|
65
88
|
}
|
|
66
89
|
else {
|
|
67
90
|
generateComponent(value.toString());
|
|
91
|
+
addComponentToServerFile(value.toString());
|
|
68
92
|
}
|
|
69
93
|
}
|
|
70
94
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dolphjs/cli",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.9",
|
|
4
4
|
"description": "The dolphjs-cli is a tool for efficient intialization and management of a dolphjs project",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"repository": "https://github.com/dolphjs/dolph-cli.git",
|