create-atom.io 0.0.0 → 0.0.1
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/dist/create-atom.x.js +19 -30
- package/dist/create-atom.x.js.map +1 -1
- package/package.json +55 -55
- package/src/create-atom.x.ts +9 -19
- package/templates/base/node_modules/.bin/browserslist +0 -0
- package/templates/base/node_modules/.bin/eslint +0 -0
- package/templates/base/node_modules/.bin/jiti +0 -0
- package/templates/base/node_modules/.bin/sass +0 -0
- package/templates/base/node_modules/.bin/terser +0 -0
- package/templates/base/node_modules/.bin/tsc +0 -0
- package/templates/base/node_modules/.bin/tsserver +0 -0
- package/templates/base/node_modules/.bin/vite +0 -0
- package/templates/base/node_modules/.bin/yaml +0 -0
package/dist/create-atom.x.js
CHANGED
|
@@ -1,38 +1,27 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { t as createAtom } from "./create-atom-BV6WVRvY.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { type } from "arktype";
|
|
4
|
+
import { cli, optional, options, parseBooleanOption } from "comline";
|
|
5
5
|
|
|
6
6
|
//#region src/create-atom.x.ts
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
required: false,
|
|
24
|
-
description: `The package manager to use.`,
|
|
25
|
-
example: `--packageManager="npm"`
|
|
26
|
-
},
|
|
27
|
-
skipHints: {
|
|
28
|
-
flag: `k`,
|
|
29
|
-
required: false,
|
|
30
|
-
description: `Silences the 'Getting Started' info, mainly for use in other initializers that may wrap this one but provide their own scripts/instructions.`,
|
|
31
|
-
example: `--skipHints`,
|
|
32
|
-
parse: parseBooleanOption
|
|
33
|
-
}
|
|
7
|
+
const CREATE_ATOM_OPTS = options(`Create a new project with atom.io.`, type({
|
|
8
|
+
"packageManager?": `"bun" | "npm" | "pnpm" | "yarn"`,
|
|
9
|
+
"skipHints?": `boolean`
|
|
10
|
+
}), {
|
|
11
|
+
packageManager: {
|
|
12
|
+
flag: `m`,
|
|
13
|
+
required: false,
|
|
14
|
+
description: `The package manager to use.`,
|
|
15
|
+
example: `--packageManager="npm"`
|
|
16
|
+
},
|
|
17
|
+
skipHints: {
|
|
18
|
+
flag: `k`,
|
|
19
|
+
required: false,
|
|
20
|
+
description: `Silences the 'Getting Started' info, mainly for use in other initializers that may wrap this one but provide their own scripts/instructions.`,
|
|
21
|
+
example: `--skipHints`,
|
|
22
|
+
parse: parseBooleanOption
|
|
34
23
|
}
|
|
35
|
-
};
|
|
24
|
+
});
|
|
36
25
|
const { inputs } = cli({
|
|
37
26
|
cliName: `create-atom`,
|
|
38
27
|
routes: optional({ $projectName: null }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-atom.x.js","names":[],"sources":["../src/create-atom.x.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport
|
|
1
|
+
{"version":3,"file":"create-atom.x.js","names":[],"sources":["../src/create-atom.x.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { type } from \"arktype\"\nimport type { OptionsGroup } from \"comline\"\nimport { cli, optional, options, parseBooleanOption } from \"comline\"\n\nimport type { CreateAtomOptionsPreloaded } from \"./create-atom.ts\"\nimport { createAtom } from \"./create-atom.ts\"\n\nconst CREATE_ATOM_OPTS = options(\n\t`Create a new project with atom.io.`,\n\ttype({\n\t\t\"packageManager?\": `\"bun\" | \"npm\" | \"pnpm\" | \"yarn\"`,\n\t\t\"skipHints?\": `boolean`,\n\t}),\n\t{\n\t\tpackageManager: {\n\t\t\tflag: `m`,\n\t\t\trequired: false,\n\t\t\tdescription: `The package manager to use.`,\n\t\t\texample: `--packageManager=\"npm\"`,\n\t\t},\n\t\tskipHints: {\n\t\t\tflag: `k`,\n\t\t\trequired: false,\n\t\t\tdescription: `Silences the 'Getting Started' info, mainly for use in other initializers that may wrap this one but provide their own scripts/instructions.`,\n\t\t\texample: `--skipHints`,\n\t\t\tparse: parseBooleanOption,\n\t\t},\n\t},\n) satisfies OptionsGroup<CreateAtomOptionsPreloaded>\n\nconst parse = cli(\n\t{\n\t\tcliName: `create-atom`,\n\t\troutes: optional({ $projectName: null }),\n\t\trouteOptions: {\n\t\t\t\"\": CREATE_ATOM_OPTS,\n\t\t\t$projectName: CREATE_ATOM_OPTS,\n\t\t},\n\t},\n\t{\n\t\terror: console.error.bind(console),\n\t\tinfo: () => {},\n\t},\n)\nconst { inputs } = parse(process.argv)\n\nawait createAtom(inputs.path[0], inputs.opts)\n"],"mappings":";;;;;;AASA,MAAM,mBAAmB,QACxB,sCACA,KAAK;CACJ,mBAAmB;CACnB,cAAc;CACd,CAAC,EACF;CACC,gBAAgB;EACf,MAAM;EACN,UAAU;EACV,aAAa;EACb,SAAS;EACT;CACD,WAAW;EACV,MAAM;EACN,UAAU;EACV,aAAa;EACb,SAAS;EACT,OAAO;EACP;CACD,CACD;AAgBD,MAAM,EAAE,WAdM,IACb;CACC,SAAS;CACT,QAAQ,SAAS,EAAE,cAAc,MAAM,CAAC;CACxC,cAAc;EACb,IAAI;EACJ,cAAc;EACd;CACD,EACD;CACC,OAAO,QAAQ,MAAM,KAAK,QAAQ;CAClC,YAAY;CACZ,CACD,CACwB,QAAQ,KAAK;AAEtC,MAAM,WAAW,OAAO,KAAK,IAAI,OAAO,KAAK"}
|
package/package.json
CHANGED
|
@@ -1,56 +1,56 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
2
|
+
"name": "create-atom.io",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Jeremy Banka",
|
|
7
|
+
"email": "hello@jeremybanka.com"
|
|
8
|
+
},
|
|
9
|
+
"publishConfig": {
|
|
10
|
+
"access": "public"
|
|
11
|
+
},
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "git+https://github.com/jeremybanka/wayforge.git",
|
|
15
|
+
"directory": "packages/create-atom"
|
|
16
|
+
},
|
|
17
|
+
"type": "module",
|
|
18
|
+
"files": [
|
|
19
|
+
"bin",
|
|
20
|
+
"dist",
|
|
21
|
+
"src",
|
|
22
|
+
"templates"
|
|
23
|
+
],
|
|
24
|
+
"main": "dist/create-atom.js",
|
|
25
|
+
"types": "dist/create-atom.d.ts",
|
|
26
|
+
"bin": "./bin/create-atom.bin.js",
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"@clack/prompts": "0.11.0",
|
|
29
|
+
"arktype": "2.1.25",
|
|
30
|
+
"picocolors": "1.1.1",
|
|
31
|
+
"tinyexec": "1.0.1",
|
|
32
|
+
"comline": "0.4.2"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"@types/node": "24.9.1",
|
|
36
|
+
"@types/bun": "npm:bun-types@1.3.1",
|
|
37
|
+
"@types/tmp": "0.2.6",
|
|
38
|
+
"@typescript/native-preview": "7.0.0-dev.20251025.1",
|
|
39
|
+
"concurrently": "9.2.1",
|
|
40
|
+
"eslint": "9.38.0",
|
|
41
|
+
"rimraf": "6.0.1",
|
|
42
|
+
"tmp": "0.2.5",
|
|
43
|
+
"tsdown": "0.15.9"
|
|
44
|
+
},
|
|
45
|
+
"scripts": {
|
|
46
|
+
"build": "tsdown && rm -f dist/*.x.d.ts",
|
|
47
|
+
"lint:biome": "biome check -- .",
|
|
48
|
+
"lint:eslint": "eslint -- .",
|
|
49
|
+
"lint:types": "tsgo --noEmit",
|
|
50
|
+
"watch:types": "tsgo --watch --noEmit",
|
|
51
|
+
"lint": "concurrently \"bun:lint:*\"",
|
|
52
|
+
"test": "bun test --watch -- **/*.test.ts",
|
|
53
|
+
"test:once": "bun test -- **/*.test.ts",
|
|
54
|
+
"postversion": "biome format --write package.json"
|
|
55
|
+
}
|
|
56
|
+
}
|
package/src/create-atom.x.ts
CHANGED
|
@@ -1,29 +1,19 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
+
import { type } from "arktype"
|
|
3
4
|
import type { OptionsGroup } from "comline"
|
|
4
|
-
import { cli,
|
|
5
|
-
import { z } from "zod/v4"
|
|
5
|
+
import { cli, optional, options, parseBooleanOption } from "comline"
|
|
6
6
|
|
|
7
7
|
import type { CreateAtomOptionsPreloaded } from "./create-atom.ts"
|
|
8
8
|
import { createAtom } from "./create-atom.ts"
|
|
9
9
|
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
packageManager: z
|
|
16
|
-
.union([
|
|
17
|
-
z.literal(`bun`),
|
|
18
|
-
z.literal(`npm`),
|
|
19
|
-
z.literal(`pnpm`),
|
|
20
|
-
z.literal(`yarn`),
|
|
21
|
-
])
|
|
22
|
-
.optional(),
|
|
23
|
-
skipHints: z.boolean().optional(),
|
|
10
|
+
const CREATE_ATOM_OPTS = options(
|
|
11
|
+
`Create a new project with atom.io.`,
|
|
12
|
+
type({
|
|
13
|
+
"packageManager?": `"bun" | "npm" | "pnpm" | "yarn"`,
|
|
14
|
+
"skipHints?": `boolean`,
|
|
24
15
|
}),
|
|
25
|
-
|
|
26
|
-
...helper.options,
|
|
16
|
+
{
|
|
27
17
|
packageManager: {
|
|
28
18
|
flag: `m`,
|
|
29
19
|
required: false,
|
|
@@ -38,7 +28,7 @@ const CREATE_ATOM_OPTS = {
|
|
|
38
28
|
parse: parseBooleanOption,
|
|
39
29
|
},
|
|
40
30
|
},
|
|
41
|
-
|
|
31
|
+
) satisfies OptionsGroup<CreateAtomOptionsPreloaded>
|
|
42
32
|
|
|
43
33
|
const parse = cli(
|
|
44
34
|
{
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|