keen-project-create 1.0.13 → 1.0.14
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/index.mjs
CHANGED
|
@@ -39,7 +39,8 @@ const projectType = (typeFromFlag || positionalType || '').toLowerCase();
|
|
|
39
39
|
const TEMPLATE_DEFAULT = path.resolve(__dirname, '../templates/default');
|
|
40
40
|
const TEMPLATE_VSCODE = path.resolve(__dirname, '../templates/vscode');
|
|
41
41
|
|
|
42
|
-
const TEMPLATE_DIR = projectType === 'vscode' ? TEMPLATE_VSCODE : TEMPLATE_DEFAULT;
|
|
42
|
+
//const TEMPLATE_DIR = projectType === 'vscode' ? TEMPLATE_VSCODE : TEMPLATE_DEFAULT;
|
|
43
|
+
const TEMPLATE_DIR = TEMPLATE_VSCODE;
|
|
43
44
|
|
|
44
45
|
const targetDir = path.resolve(process.cwd(), projectNameArg);
|
|
45
46
|
|
|
@@ -108,6 +109,18 @@ function runInstall(cwd, pm = 'npm') {
|
|
|
108
109
|
__APP_NAME__: projectNameArg
|
|
109
110
|
});
|
|
110
111
|
|
|
112
|
+
// Apply props inside the "templates/vscode/launch.json" file
|
|
113
|
+
const launchFile = path.join(targetDir, '.vscode', 'launch.json');
|
|
114
|
+
await replaceInFile(launchFile, {
|
|
115
|
+
__PROJECT_NAME_REPLACE__ : projectNameArg
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
// Apply props inside the "templates/keen.json" file
|
|
119
|
+
const keenJsonFile = path.join(targetDir, 'keen.json');
|
|
120
|
+
await replaceInFile(keenJsonFile, {
|
|
121
|
+
__PROJECT_NAME_REPLACE__ : projectNameArg
|
|
122
|
+
});
|
|
123
|
+
|
|
111
124
|
// Install deps
|
|
112
125
|
const pm = detectPackageManager();
|
|
113
126
|
console.log(`> Installing dependencies with ${pm}…`);
|
package/package.json
CHANGED