@silicajs/create 0.1.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.
- package/README.md +7 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +24 -0
- package/dist/index.js.map +1 -0
- package/package.json +31 -0
package/README.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# @silicajs/create
|
|
2
|
+
|
|
3
|
+
Internal create package for Silica.
|
|
4
|
+
|
|
5
|
+
Exports `runCreateSilica()`, which delegates to `@silicajs/cli`'s `silica create` command to scaffold a new vault project with content, config, env template, Dockerfile, and GitHub Actions workflow.
|
|
6
|
+
|
|
7
|
+
The user-facing npm package is `create-silica`.
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// src/index.ts
|
|
4
|
+
import { fileURLToPath } from "url";
|
|
5
|
+
import { createCommand } from "@silicajs/cli";
|
|
6
|
+
async function runCreateSilica(argv = process.argv) {
|
|
7
|
+
const [, , directory] = argv;
|
|
8
|
+
if (!directory) {
|
|
9
|
+
console.error("Usage: create-silica <directory>");
|
|
10
|
+
process.exitCode = 1;
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
await createCommand(directory);
|
|
14
|
+
}
|
|
15
|
+
if (process.argv[1] && fileURLToPath(import.meta.url) === process.argv[1]) {
|
|
16
|
+
runCreateSilica().catch((error) => {
|
|
17
|
+
console.error(error instanceof Error ? error.message : error);
|
|
18
|
+
process.exitCode = 1;
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
runCreateSilica
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { fileURLToPath } from \"node:url\";\nimport { createCommand } from \"@silicajs/cli\";\n\nexport async function runCreateSilica(argv = process.argv): Promise<void> {\n const [, , directory] = argv;\n\n if (!directory) {\n console.error(\"Usage: create-silica <directory>\");\n process.exitCode = 1;\n return;\n }\n\n await createCommand(directory);\n}\n\nif (process.argv[1] && fileURLToPath(import.meta.url) === process.argv[1]) {\n runCreateSilica().catch((error: unknown) => {\n console.error(error instanceof Error ? error.message : error);\n process.exitCode = 1;\n });\n}\n"],"mappings":";;;AAAA,SAAS,qBAAqB;AAC9B,SAAS,qBAAqB;AAE9B,eAAsB,gBAAgB,OAAO,QAAQ,MAAqB;AACxE,QAAM,CAAC,EAAE,EAAE,SAAS,IAAI;AAExB,MAAI,CAAC,WAAW;AACd,YAAQ,MAAM,kCAAkC;AAChD,YAAQ,WAAW;AACnB;AAAA,EACF;AAEA,QAAM,cAAc,SAAS;AAC/B;AAEA,IAAI,QAAQ,KAAK,CAAC,KAAK,cAAc,YAAY,GAAG,MAAM,QAAQ,KAAK,CAAC,GAAG;AACzE,kBAAgB,EAAE,MAAM,CAAC,UAAmB;AAC1C,YAAQ,MAAM,iBAAiB,QAAQ,MAAM,UAAU,KAAK;AAC5D,YAAQ,WAAW;AAAA,EACrB,CAAC;AACH;","names":[]}
|
package/package.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@silicajs/create",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Scaffold a new Silica vault.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"publishConfig": {
|
|
8
|
+
"access": "public"
|
|
9
|
+
},
|
|
10
|
+
"bin": {
|
|
11
|
+
"silicajs-create": "./dist/index.js"
|
|
12
|
+
},
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"import": "./dist/index.js"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"dist"
|
|
21
|
+
],
|
|
22
|
+
"scripts": {
|
|
23
|
+
"build": "tsup",
|
|
24
|
+
"test": "vitest run --passWithNoTests",
|
|
25
|
+
"typecheck": "tsc --noEmit",
|
|
26
|
+
"lint": "tsc --noEmit"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"@silicajs/cli": "^0.1.0"
|
|
30
|
+
}
|
|
31
|
+
}
|