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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "keen-project-create",
3
3
  "description": "Project scaffolder for Keen projects",
4
- "version": "1.0.13",
4
+ "version": "1.0.14",
5
5
  "type": "module",
6
6
  "main": "index.js",
7
7
  "bin": {
@@ -11,7 +11,7 @@
11
11
  "skipFiles": ["<node_internals>/**"],
12
12
  "sourceMaps": true,
13
13
  "localRoot": "${workspaceFolder}/src",
14
- "remoteRoot": "/app/projects/sketch"
14
+ "remoteRoot": "/app/projects/__PROJECT_NAME_REPLACE__"
15
15
  }
16
16
  ]
17
17
  }
@@ -0,0 +1,3 @@
1
+ [
2
+
3
+ ]
@@ -1,6 +1,6 @@
1
1
  {
2
- "project_name": "sketch",
3
- "agent_name": "SketchAgent",
2
+ "project_name": "__PROJECT_NAME_REPLACE__",
3
+ "agent": "Agent-__PROJECT_NAME_REPLACE__",
4
4
  "keen_server": "<__REPLACE__WITH__URL__>",
5
5
  "start_agent": "Project-Start",
6
6
  "entry": "src",
@@ -1,5 +1,5 @@
1
1
  {
2
- "name": "keen__sketch__project",
2
+ "name": "__APP_NAME__",
3
3
  "version": "1.0.0",
4
4
  "main": "index.js",
5
5
  "type": "module",