create-angular-lynx 0.0.0-stage → 22.2.0

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.
Files changed (3) hide show
  1. package/package.json +28 -4
  2. package/src/index.js +37 -0
  3. package/README.md +0 -3
package/package.json CHANGED
@@ -1,6 +1,30 @@
1
1
  {
2
2
  "name": "create-angular-lynx",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "22.2.0",
4
+ "description": "Create a new AngularLynx project",
5
+ "homepage": "https://github.com/Blotch-Smart-Frames/AngularLynx#readme",
6
+ "bugs": {
7
+ "url": "https://github.com/Blotch-Smart-Frames/AngularLynx/issues"
8
+ },
9
+ "license": "MIT",
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "git+https://github.com/Blotch-Smart-Frames/AngularLynx.git",
13
+ "directory": "packages/create-angular-lynx"
14
+ },
15
+ "bin": {
16
+ "create-angular-lynx": "./src/index.js"
17
+ },
18
+ "files": [
19
+ "src"
20
+ ],
21
+ "type": "module",
22
+ "scripts": {
23
+ "lint": "oxlint .",
24
+ "lint:fix": "oxlint --fix .",
25
+ "format": "oxfmt --write .",
26
+ "format:check": "oxfmt --check .",
27
+ "cspell": "cspell .",
28
+ "publish:local": "yalc publish --push"
29
+ }
30
+ }
package/src/index.js ADDED
@@ -0,0 +1,37 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { execSync } from 'node:child_process';
4
+ import { existsSync } from 'node:fs';
5
+ import path from 'node:path';
6
+
7
+ const name = process.argv[2];
8
+
9
+ if (!name) {
10
+ console.error('Usage: npm create angular-lynx <project-name>');
11
+ process.exit(1);
12
+ }
13
+
14
+ const dest = path.resolve(name);
15
+
16
+ if (existsSync(dest)) {
17
+ console.error(`Directory "${name}" already exists.`);
18
+ process.exit(1);
19
+ }
20
+
21
+ const run = (cmd) => {
22
+ console.log(`\n> ${cmd}\n`);
23
+ execSync(cmd, { stdio: 'inherit' });
24
+ };
25
+
26
+ run(
27
+ `npx -y @angular/cli@latest new ${name} --skip-install --skip-git --style css --ssr false`,
28
+ );
29
+ run(`npx -y -w ${dest} ng add @blotch/angular-lynx --skip-confirmation`);
30
+ run(`npm install --prefix ${dest}`);
31
+
32
+ console.log(`
33
+ Done! To get started:
34
+
35
+ cd ${name}
36
+ npm start
37
+ `);
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.