create-atelier-ui-workspace 0.0.2

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 ADDED
@@ -0,0 +1,11 @@
1
+ # create-atelier-ui-workspace
2
+
3
+ This library was generated with [Nx](https://nx.dev).
4
+
5
+ ## Building
6
+
7
+ Run `nx build create-atelier-ui-workspace` to build the library.
8
+
9
+ ## Running unit tests
10
+
11
+ Run `nx test create-atelier-ui-workspace` to execute the unit tests via [Jest](https://jestjs.io).
package/bin/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
package/bin/index.js ADDED
@@ -0,0 +1,52 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ const tslib_1 = require("tslib");
5
+ const create_nx_workspace_1 = require("create-nx-workspace");
6
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
7
+ const enquirer = require('enquirer');
8
+ function main() {
9
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
10
+ let name = process.argv[2];
11
+ if (!name) {
12
+ const res = yield enquirer.prompt({
13
+ type: 'input',
14
+ name: 'name',
15
+ message: 'Workspace name:',
16
+ initial: 'my-workshop',
17
+ });
18
+ name = res.name;
19
+ }
20
+ if (!name) {
21
+ throw new Error('Please provide a name for the workspace');
22
+ }
23
+ const { frameworks } = yield enquirer.prompt({
24
+ type: 'multiselect',
25
+ name: 'frameworks',
26
+ message: 'Which framework(s) do you want to use?',
27
+ choices: [
28
+ { name: 'angular', message: 'Angular' },
29
+ { name: 'react', message: 'React' },
30
+ { name: 'vue', message: 'Vue' },
31
+ ],
32
+ validate: (value) => value.length > 0 || 'Select at least one framework',
33
+ });
34
+ console.log(`\nScaffolding Atelier UI workshop: ${name} (${frameworks.join(', ')})\n`);
35
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
36
+ const presetVersion = require('../package.json').version;
37
+ const { directory } = yield (0, create_nx_workspace_1.createWorkspace)(`@atelier-ui/create-workspace@${presetVersion}`, {
38
+ name,
39
+ nxCloud: 'skip',
40
+ packageManager: 'npm',
41
+ frameworks: frameworks.join(','),
42
+ });
43
+ const appNames = frameworks.map((f) => `workshop-${f}`).join(', ');
44
+ console.log(`\n✓ Workspace created at: ${directory}`);
45
+ console.log(`\nGet started:\n`);
46
+ console.log(` cd ${directory}`);
47
+ console.log(` npx nx serve ${frameworks[0] === 'angular' ? 'workshop-angular' : `workshop-${frameworks[0]}`}`);
48
+ console.log(`\nApps scaffolded: ${appNames}\n`);
49
+ });
50
+ }
51
+ main();
52
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/create-atelier-ui-workspace/bin/index.ts"],"names":[],"mappings":";;;;AAEA,6DAAsD;AAEtD,8DAA8D;AAC9D,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAErC,SAAe,IAAI;;QACjB,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAE3B,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,MAAM,GAAG,GAAG,MAAM,QAAQ,CAAC,MAAM,CAAC;gBAChC,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,MAAM;gBACZ,OAAO,EAAE,iBAAiB;gBAC1B,OAAO,EAAE,aAAa;aACvB,CAAC,CAAC;YACH,IAAI,GAAI,GAAwB,CAAC,IAAI,CAAC;QACxC,CAAC;QAED,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;QAC7D,CAAC;QAED,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,QAAQ,CAAC,MAAM,CAAC;YAC3C,IAAI,EAAE,aAAa;YACnB,IAAI,EAAE,YAAY;YAClB,OAAO,EAAE,wCAAwC;YACjD,OAAO,EAAE;gBACP,EAAE,IAAI,EAAE,S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AC,CAAC;IAClD,CAAC;CAAA;AAED,IAAI,EAAE,CAAC"}
package/package.json ADDED
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "create-atelier-ui-workspace",
3
+ "version": "0.0.2",
4
+ "description": "Create an Atelier UI Angular workshop workspace in one command",
5
+ "keywords": [
6
+ "nx",
7
+ "angular",
8
+ "atelier-ui",
9
+ "workshop",
10
+ "create"
11
+ ],
12
+ "author": "Atelier UI",
13
+ "license": "MIT",
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "https://github.com/DominikPieper/atelier-ui.git",
17
+ "directory": "libs/create-atelier-ui-workspace"
18
+ },
19
+ "type": "commonjs",
20
+ "main": "./bin/index.js",
21
+ "dependencies": {
22
+ "create-nx-workspace": "22.6.0",
23
+ "enquirer": "^2.3.6",
24
+ "tslib": "^2.3.0"
25
+ },
26
+ "bin": {
27
+ "create-atelier-ui-workspace": "./bin/index.js"
28
+ },
29
+ "types": "./bin/index.d.ts"
30
+ }