create-alepha 0.15.1 → 0.15.3
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 +14 -0
- package/dist/index.js +16 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/CreateAlephaCoreCommands.ts +1 -1
- package/src/index.ts +15 -0
package/README.md
CHANGED
|
@@ -10,3 +10,17 @@ This package is part of the Alepha framework and can be installed via the all-in
|
|
|
10
10
|
npm install alepha
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
+
## Module
|
|
14
|
+
|
|
15
|
+
| type | quality | stability |
|
|
16
|
+
|------|---------|-----------|
|
|
17
|
+
| tooling | rare | stable |
|
|
18
|
+
|
|
19
|
+
Quick project setup tool.
|
|
20
|
+
|
|
21
|
+
**Features:**
|
|
22
|
+
- `npx create-alepha` to bootstrap projects
|
|
23
|
+
- Template selection
|
|
24
|
+
- Environment configuration
|
|
25
|
+
- Package manager detection
|
|
26
|
+
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { $inject, Alepha, run, t } from "alepha";
|
|
3
3
|
import { $command, CliProvider } from "alepha/command";
|
|
4
|
-
import { FileSystemProvider } from "alepha/file";
|
|
5
4
|
import { $logger } from "alepha/logger";
|
|
5
|
+
import { FileSystemProvider } from "alepha/system";
|
|
6
6
|
import { readFileSync } from "node:fs";
|
|
7
7
|
|
|
8
8
|
//#region src/CreateAlephaCoreCommands.ts
|
|
@@ -35,6 +35,21 @@ const version = packageJson.version;
|
|
|
35
35
|
|
|
36
36
|
//#endregion
|
|
37
37
|
//#region src/index.ts
|
|
38
|
+
/**
|
|
39
|
+
* | type | quality | stability |
|
|
40
|
+
* |------|---------|-----------|
|
|
41
|
+
* | tooling | rare | stable |
|
|
42
|
+
*
|
|
43
|
+
* Quick project setup tool.
|
|
44
|
+
*
|
|
45
|
+
* **Features:**
|
|
46
|
+
* - `npx create-alepha` to bootstrap projects
|
|
47
|
+
* - Template selection
|
|
48
|
+
* - Environment configuration
|
|
49
|
+
* - Package manager detection
|
|
50
|
+
*
|
|
51
|
+
* @module create-alepha
|
|
52
|
+
*/
|
|
38
53
|
const alepha = Alepha.create({ env: {
|
|
39
54
|
LOG_LEVEL: "alepha.core:warn,info",
|
|
40
55
|
LOG_FORMAT: "raw",
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../src/CreateAlephaCoreCommands.ts","../src/version.ts","../src/index.ts"],"sourcesContent":["import { $inject, t } from \"alepha\";\nimport { $command, CliProvider } from \"alepha/command\";\nimport {
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/CreateAlephaCoreCommands.ts","../src/version.ts","../src/index.ts"],"sourcesContent":["import { $inject, t } from \"alepha\";\nimport { $command, CliProvider } from \"alepha/command\";\nimport { $logger } from \"alepha/logger\";\nimport { FileSystemProvider } from \"alepha/system\";\n\nexport class CreateAlephaCoreCommands {\n protected readonly log = $logger();\n protected readonly cli = $inject(CliProvider);\n protected readonly fs = $inject(FileSystemProvider);\n\n /**\n * Called when no command is provided - delegates to alepha init\n */\n public readonly root = $command({\n root: true,\n description: \"Create a new Alepha project\",\n args: t.text({\n title: \"name\",\n }),\n handler: async ({ run, args }) => {\n const name = args;\n\n // create directory\n await this.fs.mkdir(name);\n\n // Delegate to alepha init command\n await run(`cd ${name} && npx alepha@latest init ${name}`, {\n alias: \"creating project\",\n });\n\n await run(`cd ${name} && npx alepha lint`, {\n alias: \"alepha lint\",\n });\n\n await run(`cd ${name} && npx alepha typecheck`, {\n alias: \"alepha typecheck\",\n });\n\n await run(`cd ${name} && npx alepha build`, {\n alias: \"alepha build\",\n });\n },\n });\n}\n","import { readFileSync } from \"node:fs\";\n\nconst packageJson = JSON.parse(\n readFileSync(new URL(\"../package.json\", import.meta.url), \"utf-8\"),\n);\n\nexport const version = packageJson.version;\n","#!/usr/bin/env node\n/**\n * | type | quality | stability |\n * |------|---------|-----------|\n * | tooling | rare | stable |\n *\n * Quick project setup tool.\n *\n * **Features:**\n * - `npx create-alepha` to bootstrap projects\n * - Template selection\n * - Environment configuration\n * - Package manager detection\n *\n * @module create-alepha\n */\nimport { Alepha, run } from \"alepha\";\nimport { CreateAlephaCoreCommands } from \"./CreateAlephaCoreCommands.ts\";\nimport { version } from \"./version.ts\";\n\nconst alepha = Alepha.create({\n env: {\n LOG_LEVEL: \"alepha.core:warn,info\",\n LOG_FORMAT: \"raw\",\n CLI_NAME: \"create-alepha\",\n CLI_DESCRIPTION: `Create Alepha v${version} - Create a new Alepha project.`,\n },\n});\n\nalepha.with(CreateAlephaCoreCommands);\n\nrun(alepha);\n"],"mappings":";;;;;;;;AAKA,IAAa,2BAAb,MAAsC;CACpC,AAAmB,MAAM,SAAS;CAClC,AAAmB,MAAM,QAAQ,YAAY;CAC7C,AAAmB,KAAK,QAAQ,mBAAmB;;;;CAKnD,AAAgB,OAAO,SAAS;EAC9B,MAAM;EACN,aAAa;EACb,MAAM,EAAE,KAAK,EACX,OAAO,QACR,CAAC;EACF,SAAS,OAAO,EAAE,KAAK,WAAW;GAChC,MAAM,OAAO;AAGb,SAAM,KAAK,GAAG,MAAM,KAAK;AAGzB,SAAM,IAAI,MAAM,KAAK,6BAA6B,QAAQ,EACxD,OAAO,oBACR,CAAC;AAEF,SAAM,IAAI,MAAM,KAAK,sBAAsB,EACzC,OAAO,eACR,CAAC;AAEF,SAAM,IAAI,MAAM,KAAK,2BAA2B,EAC9C,OAAO,oBACR,CAAC;AAEF,SAAM,IAAI,MAAM,KAAK,uBAAuB,EAC1C,OAAO,gBACR,CAAC;;EAEL,CAAC;;;;;ACxCJ,MAAM,cAAc,KAAK,MACvB,aAAa,IAAI,IAAI,mBAAmB,OAAO,KAAK,IAAI,EAAE,QAAQ,CACnE;AAED,MAAa,UAAU,YAAY;;;;;;;;;;;;;;;;;;;ACcnC,MAAM,SAAS,OAAO,OAAO,EAC3B,KAAK;CACH,WAAW;CACX,YAAY;CACZ,UAAU;CACV,iBAAiB,kBAAkB,QAAQ;CAC5C,EACF,CAAC;AAEF,OAAO,KAAK,yBAAyB;AAErC,IAAI,OAAO"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "create-alepha",
|
|
3
3
|
"description": "Create a new Alepha project with a single command.",
|
|
4
4
|
"author": "Nicolas Foures",
|
|
5
|
-
"version": "0.15.
|
|
5
|
+
"version": "0.15.3",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"engines": {
|
|
8
8
|
"node": ">=22.0.0"
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"src"
|
|
15
15
|
],
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"alepha": "0.15.
|
|
17
|
+
"alepha": "0.15.3"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"tsdown": "^0.20.1",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { $inject, t } from "alepha";
|
|
2
2
|
import { $command, CliProvider } from "alepha/command";
|
|
3
|
-
import { FileSystemProvider } from "alepha/file";
|
|
4
3
|
import { $logger } from "alepha/logger";
|
|
4
|
+
import { FileSystemProvider } from "alepha/system";
|
|
5
5
|
|
|
6
6
|
export class CreateAlephaCoreCommands {
|
|
7
7
|
protected readonly log = $logger();
|
package/src/index.ts
CHANGED
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* | type | quality | stability |
|
|
4
|
+
* |------|---------|-----------|
|
|
5
|
+
* | tooling | rare | stable |
|
|
6
|
+
*
|
|
7
|
+
* Quick project setup tool.
|
|
8
|
+
*
|
|
9
|
+
* **Features:**
|
|
10
|
+
* - `npx create-alepha` to bootstrap projects
|
|
11
|
+
* - Template selection
|
|
12
|
+
* - Environment configuration
|
|
13
|
+
* - Package manager detection
|
|
14
|
+
*
|
|
15
|
+
* @module create-alepha
|
|
16
|
+
*/
|
|
2
17
|
import { Alepha, run } from "alepha";
|
|
3
18
|
import { CreateAlephaCoreCommands } from "./CreateAlephaCoreCommands.ts";
|
|
4
19
|
import { version } from "./version.ts";
|