create-squire-workspace 0.0.11 → 0.0.12
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/create-workspace.d.ts +1 -5
- package/create-workspace.js +6 -22
- package/create-workspace.js.map +1 -1
- package/package.json +1 -1
package/create-workspace.d.ts
CHANGED
package/create-workspace.js
CHANGED
|
@@ -1,30 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env tsx
|
|
2
|
-
import {
|
|
2
|
+
import { SqFolderUtils, SqPathUtils } from "@code-squire/utils";
|
|
3
3
|
const packagesToInstall = [
|
|
4
4
|
"@code-squire/ioc",
|
|
5
5
|
"@code-squire/feature-modules",
|
|
6
6
|
"@code-squire/squire",
|
|
7
7
|
"@code-squire/workspace"
|
|
8
8
|
];
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
throw new Error('Squire - Please pass a name for your squire space');
|
|
15
|
-
await this.processManager.execute(`npm install -g tsx`);
|
|
16
|
-
const workspacePath = SqPathUtils.normalize(`${process.cwd()}/${name}`);
|
|
17
|
-
SqFolderUtils.create(workspacePath);
|
|
18
|
-
process.chdir(workspacePath);
|
|
19
|
-
await this.processManager.execute(`npm install -D ${packagesToInstall.join(' ')}`);
|
|
20
|
-
SqFileUtils.save(`${workspacePath}/workspace.json`, '{}');
|
|
21
|
-
}
|
|
22
|
-
async setup() {
|
|
23
|
-
// instance(FeatureModuleRegistry).broadcastSpecific({ module: SquireModule, parameters: [] });
|
|
24
|
-
// await this.processManager.execute(`npx squire help`);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
const space = new CreateSquireSpace();
|
|
28
|
-
await space.create();
|
|
29
|
-
await space.setup();
|
|
9
|
+
const [name] = process.argv.slice(2);
|
|
10
|
+
if (!name)
|
|
11
|
+
throw new Error('Squire - Please pass a name for your squire space');
|
|
12
|
+
const workspacePath = SqPathUtils.normalize(`${process.cwd()}/${name}`);
|
|
13
|
+
SqFolderUtils.create(workspacePath);
|
|
30
14
|
//# sourceMappingURL=create-workspace.js.map
|
package/create-workspace.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-workspace.js","sourceRoot":"","sources":["../../../../squire/create-workspace/src/create-workspace.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"create-workspace.js","sourceRoot":"","sources":["../../../../squire/create-workspace/src/create-workspace.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEhE,MAAM,iBAAiB,GAAa;IAClC,kBAAkB;IAClB,8BAA8B;IAC9B,qBAAqB;IACrB,wBAAwB;CACzB,CAAC;AAEF,MAAM,CAAE,IAAI,CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACvC,IAAI,CAAC,IAAI;IAAE,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;AAGhF,MAAM,aAAa,GAAG,WAAW,CAAC,SAAS,CAAC,GAAI,OAAO,CAAC,GAAG,EAAG,IAAK,IAAK,EAAE,CAAC,CAAC;AAC5E,aAAa,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC"}
|