create-atom.io 0.0.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/bin/create-atom.bin.js +2 -0
- package/dist/create-atom-BV6WVRvY.js +102 -0
- package/dist/create-atom-BV6WVRvY.js.map +1 -0
- package/dist/create-atom.d.ts +14 -0
- package/dist/create-atom.d.ts.map +1 -0
- package/dist/create-atom.js +3 -0
- package/dist/create-atom.x.js +51 -0
- package/dist/create-atom.x.js.map +1 -0
- package/package.json +56 -0
- package/src/create-atom.ts +191 -0
- package/src/create-atom.x.ts +59 -0
- package/templates/base/_gitignore +24 -0
- package/templates/base/eslint.config.ts +178 -0
- package/templates/base/eslint.d.ts +31 -0
- package/templates/base/index.html +14 -0
- package/templates/base/node_modules/.bin/browserslist +21 -0
- package/templates/base/node_modules/.bin/eslint +21 -0
- package/templates/base/node_modules/.bin/jiti +21 -0
- package/templates/base/node_modules/.bin/sass +21 -0
- package/templates/base/node_modules/.bin/terser +21 -0
- package/templates/base/node_modules/.bin/tsc +21 -0
- package/templates/base/node_modules/.bin/tsserver +21 -0
- package/templates/base/node_modules/.bin/vite +21 -0
- package/templates/base/node_modules/.bin/yaml +21 -0
- package/templates/base/node_modules/.vite/deps/_metadata.json +82 -0
- package/templates/base/node_modules/.vite/deps/atom__io.js +72 -0
- package/templates/base/node_modules/.vite/deps/atom__io.js.map +7 -0
- package/templates/base/node_modules/.vite/deps/atom__io_react.js +170 -0
- package/templates/base/node_modules/.vite/deps/atom__io_react.js.map +7 -0
- package/templates/base/node_modules/.vite/deps/chunk-2PJG54YB.js +364 -0
- package/templates/base/node_modules/.vite/deps/chunk-2PJG54YB.js.map +7 -0
- package/templates/base/node_modules/.vite/deps/chunk-6VZTUEOV.js +3777 -0
- package/templates/base/node_modules/.vite/deps/chunk-6VZTUEOV.js.map +7 -0
- package/templates/base/node_modules/.vite/deps/chunk-IHAFLL3M.js +204 -0
- package/templates/base/node_modules/.vite/deps/chunk-IHAFLL3M.js.map +7 -0
- package/templates/base/node_modules/.vite/deps/chunk-LZJKCPXG.js +84 -0
- package/templates/base/node_modules/.vite/deps/chunk-LZJKCPXG.js.map +7 -0
- package/templates/base/node_modules/.vite/deps/chunk-PJQAIOAR.js +311 -0
- package/templates/base/node_modules/.vite/deps/chunk-PJQAIOAR.js.map +7 -0
- package/templates/base/node_modules/.vite/deps/chunk-XRJUZPUF.js +17 -0
- package/templates/base/node_modules/.vite/deps/chunk-XRJUZPUF.js.map +7 -0
- package/templates/base/node_modules/.vite/deps/package.json +3 -0
- package/templates/base/node_modules/.vite/deps/preact.js +27 -0
- package/templates/base/node_modules/.vite/deps/preact.js.map +7 -0
- package/templates/base/node_modules/.vite/deps/preact_compat.js +100 -0
- package/templates/base/node_modules/.vite/deps/preact_compat.js.map +7 -0
- package/templates/base/node_modules/.vite/deps/preact_debug.js +240 -0
- package/templates/base/node_modules/.vite/deps/preact_debug.js.map +7 -0
- package/templates/base/node_modules/.vite/deps/preact_devtools.js +7 -0
- package/templates/base/node_modules/.vite/deps/preact_devtools.js.map +7 -0
- package/templates/base/node_modules/.vite/deps/preact_hooks.js +29 -0
- package/templates/base/node_modules/.vite/deps/preact_hooks.js.map +7 -0
- package/templates/base/node_modules/.vite/deps/preact_jsx-dev-runtime.js +18 -0
- package/templates/base/node_modules/.vite/deps/preact_jsx-dev-runtime.js.map +7 -0
- package/templates/base/node_modules/.vite/deps/preact_jsx-runtime.js +18 -0
- package/templates/base/node_modules/.vite/deps/preact_jsx-runtime.js.map +7 -0
- package/templates/base/package.json +24 -0
- package/templates/base/public/preact.svg +6 -0
- package/templates/base/src/BezierPlayground.tsx +448 -0
- package/templates/base/src/index.tsx +48 -0
- package/templates/base/src/msg.md +105 -0
- package/templates/base/src/style.css +126 -0
- package/templates/base/tsconfig.json +21 -0
- package/templates/base/vite.config.ts +9 -0
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { existsSync, promises } from "node:fs";
|
|
2
|
+
import { dirname, resolve } from "node:path";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
import * as prompts from "@clack/prompts";
|
|
5
|
+
import picocolors from "picocolors";
|
|
6
|
+
import { x } from "tinyexec";
|
|
7
|
+
|
|
8
|
+
//#region src/create-atom.ts
|
|
9
|
+
const pico = picocolors.createColors(true);
|
|
10
|
+
const s = prompts.spinner();
|
|
11
|
+
async function createAtom(argDir, options) {
|
|
12
|
+
const skipHint = options.skipHints ?? false;
|
|
13
|
+
const packageManager = options.packageManager ?? getPkgManager();
|
|
14
|
+
prompts.intro(pico.greenBright(`atom.io - Data Components for TypeScript`));
|
|
15
|
+
const { dir } = await prompts.group({ dir: () => argDir ? Promise.resolve(argDir) : prompts.text({
|
|
16
|
+
message: `Project directory:`,
|
|
17
|
+
placeholder: `my-preact-app`,
|
|
18
|
+
validate(value) {
|
|
19
|
+
if (value.length === 0) return `Directory name is required!`;
|
|
20
|
+
if (existsSync(value)) return `Refusing to overwrite existing directory or file! Please provide a non-clashing name.`;
|
|
21
|
+
}
|
|
22
|
+
}) }, { onCancel: () => {
|
|
23
|
+
prompts.cancel(pico.yellow(`Cancelled`));
|
|
24
|
+
process.exit(0);
|
|
25
|
+
} });
|
|
26
|
+
const targetDir = resolve(process.cwd(), dir);
|
|
27
|
+
const opts = { packageManager };
|
|
28
|
+
await useSpinner(`Setting up your project directory...`, () => scaffold(targetDir, opts), `Set up project directory`);
|
|
29
|
+
await useSpinner(`Installing project dependencies...`, () => installDeps(targetDir, opts), `Installed project dependencies`);
|
|
30
|
+
if (skipHint === false) {
|
|
31
|
+
const gettingStarted = `
|
|
32
|
+
${pico.dim(`$`)} ${pico.blueBright(`cd ${dir}`)}
|
|
33
|
+
${pico.dim(`$`)} ${pico.blueBright(`${packageManager === `npm` ? `npm run` : packageManager === `bun` ? `bun run` : packageManager} dev`)}
|
|
34
|
+
`;
|
|
35
|
+
prompts.note(gettingStarted.trim().replace(/^\t\t\t/gm, ``), `Getting Started`);
|
|
36
|
+
}
|
|
37
|
+
prompts.outro(pico.green(`You're all set!`));
|
|
38
|
+
}
|
|
39
|
+
async function useSpinner(startMessage, fn, finishMessage) {
|
|
40
|
+
s.start(startMessage);
|
|
41
|
+
await fn();
|
|
42
|
+
s.stop(pico.green(finishMessage));
|
|
43
|
+
}
|
|
44
|
+
async function scaffold(to, opts) {
|
|
45
|
+
await promises.mkdir(to, { recursive: true });
|
|
46
|
+
await templateDir(resolve(dirname(fileURLToPath(import.meta.url)), `../templates`, `base`), to, opts);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Recursive fs copy, swiped from `create-wmr`:
|
|
50
|
+
* https://github.com/preactjs/wmr/blob/3c5672ecd2f958c8eaf372d33c084dc69228ae3f/packages/create-wmr/src/index.js#L108-L124
|
|
51
|
+
*/
|
|
52
|
+
async function templateDir(from, to, opts) {
|
|
53
|
+
const files = await promises.readdir(from);
|
|
54
|
+
return (await Promise.all(files.map(async (f) => {
|
|
55
|
+
if (f === `.` || f === `..`) return;
|
|
56
|
+
const filename = resolve(from, f);
|
|
57
|
+
if ((await promises.stat(filename)).isDirectory()) {
|
|
58
|
+
await promises.mkdir(resolve(to, f), { recursive: true });
|
|
59
|
+
return templateDir(filename, resolve(to, f), opts);
|
|
60
|
+
}
|
|
61
|
+
if (opts.packageManager !== `npm` && f === `README.md`) {
|
|
62
|
+
await promises.writeFile(resolve(to, f), (await promises.readFile(filename, `utf-8`)).replace(/npm run/g, opts.packageManager === `bun` ? `bun run` : opts.packageManager));
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
if (f === `_gitignore`) f = `.gitignore`;
|
|
66
|
+
await promises.copyFile(filename, resolve(to, f));
|
|
67
|
+
}))).flat(99);
|
|
68
|
+
}
|
|
69
|
+
async function installDeps(to, opts) {
|
|
70
|
+
const dependencies = [];
|
|
71
|
+
const devDependencies = [];
|
|
72
|
+
const installOpts = {
|
|
73
|
+
packageManager: opts.packageManager,
|
|
74
|
+
to
|
|
75
|
+
};
|
|
76
|
+
await installPackages(dependencies, { ...installOpts });
|
|
77
|
+
devDependencies.length && await installPackages(devDependencies, {
|
|
78
|
+
...installOpts,
|
|
79
|
+
dev: true
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
function installPackages(pkgs, opts) {
|
|
83
|
+
return x(opts.packageManager, [
|
|
84
|
+
opts.packageManager === `yarn` ? pkgs.length ? `add` : `` : `install`,
|
|
85
|
+
opts.dev ? `-D` : ``,
|
|
86
|
+
...pkgs
|
|
87
|
+
].filter(Boolean), { nodeOptions: {
|
|
88
|
+
stdio: `ignore`,
|
|
89
|
+
cwd: opts.to
|
|
90
|
+
} });
|
|
91
|
+
}
|
|
92
|
+
function getPkgManager() {
|
|
93
|
+
const userAgent = process.env[`npm_config_user_agent`] ?? ``;
|
|
94
|
+
if (userAgent.startsWith(`yarn`)) return `yarn`;
|
|
95
|
+
if (userAgent.startsWith(`pnpm`)) return `pnpm`;
|
|
96
|
+
if (userAgent.startsWith(`bun`)) return `bun`;
|
|
97
|
+
return `npm`;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
//#endregion
|
|
101
|
+
export { pico as n, createAtom as t };
|
|
102
|
+
//# sourceMappingURL=create-atom-BV6WVRvY.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-atom-BV6WVRvY.js","names":["pico: Colors","opts: CreateAtomOptions","fs","dependencies: string[]","devDependencies: string[]"],"sources":["../src/create-atom.ts"],"sourcesContent":["import { existsSync, promises as fs } from \"node:fs\"\nimport { dirname, resolve } from \"node:path\"\nimport { fileURLToPath } from \"node:url\"\n\nimport * as prompts from \"@clack/prompts\"\nimport picocolors from \"picocolors\"\nimport type { Colors } from \"picocolors/types\"\nimport { x } from \"tinyexec\"\n\nexport const pico: Colors = picocolors.createColors(true)\n\nconst s = prompts.spinner()\n\nexport type CreateAtomOptions = {\n\tpackageManager: `bun` | `npm` | `pnpm` | `yarn`\n}\n\nexport type CreateAtomOptionsPreloaded = {\n\t[K in keyof CreateAtomOptions]?: CreateAtomOptions[K] | undefined\n} & { skipHints?: boolean | undefined }\n\nexport async function createAtom(\n\targDir: string | undefined,\n\toptions: CreateAtomOptionsPreloaded,\n): Promise<void> {\n\tconst skipHint = options.skipHints ?? false\n\tconst packageManager = options.packageManager ?? getPkgManager()\n\n\tprompts.intro(pico.greenBright(`atom.io - Data Components for TypeScript`))\n\n\tconst { dir } = await prompts.group(\n\t\t{\n\t\t\tdir: () =>\n\t\t\t\targDir\n\t\t\t\t\t? Promise.resolve(argDir)\n\t\t\t\t\t: prompts.text({\n\t\t\t\t\t\t\tmessage: `Project directory:`,\n\t\t\t\t\t\t\tplaceholder: `my-preact-app`,\n\t\t\t\t\t\t\tvalidate(value) {\n\t\t\t\t\t\t\t\tif (value.length === 0) {\n\t\t\t\t\t\t\t\t\treturn `Directory name is required!`\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (existsSync(value)) {\n\t\t\t\t\t\t\t\t\treturn `Refusing to overwrite existing directory or file! Please provide a non-clashing name.`\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}),\n\t\t},\n\t\t{\n\t\t\tonCancel: () => {\n\t\t\t\tprompts.cancel(pico.yellow(`Cancelled`))\n\t\t\t\tprocess.exit(0)\n\t\t\t},\n\t\t},\n\t)\n\tconst targetDir = resolve(process.cwd(), dir)\n\tconst opts: CreateAtomOptions = { packageManager }\n\n\tawait useSpinner(\n\t\t`Setting up your project directory...`,\n\t\t() => scaffold(targetDir, opts),\n\t\t`Set up project directory`,\n\t)\n\n\tawait useSpinner(\n\t\t`Installing project dependencies...`,\n\t\t() => installDeps(targetDir, opts),\n\t\t`Installed project dependencies`,\n\t)\n\n\tif (skipHint === false) {\n\t\tconst gettingStarted = `\n\t\t\t${pico.dim(`$`)} ${pico.blueBright(`cd ${dir}`)}\n\t\t\t${pico.dim(`$`)} ${pico.blueBright(\n\t\t\t\t`${\n\t\t\t\t\tpackageManager === `npm`\n\t\t\t\t\t\t? `npm run`\n\t\t\t\t\t\t: packageManager === `bun`\n\t\t\t\t\t\t\t? `bun run`\n\t\t\t\t\t\t\t: packageManager\n\t\t\t\t} dev`,\n\t\t\t)}\n\t\t`\n\t\tprompts.note(\n\t\t\tgettingStarted.trim().replace(/^\\t\\t\\t/gm, ``),\n\t\t\t`Getting Started`,\n\t\t)\n\t}\n\n\tprompts.outro(pico.green(`You're all set!`))\n}\n\nasync function useSpinner(\n\tstartMessage: string,\n\tfn: () => Promise<void>,\n\tfinishMessage: string,\n): Promise<void> {\n\ts.start(startMessage)\n\tawait fn()\n\ts.stop(pico.green(finishMessage))\n}\n\nasync function scaffold(to: string, opts: CreateAtomOptions): Promise<void> {\n\tawait fs.mkdir(to, { recursive: true })\n\n\tconst __dirname = dirname(fileURLToPath(import.meta.url))\n\tawait templateDir(resolve(__dirname, `../templates`, `base`), to, opts)\n}\n\n/**\n * Recursive fs copy, swiped from `create-wmr`:\n * https://github.com/preactjs/wmr/blob/3c5672ecd2f958c8eaf372d33c084dc69228ae3f/packages/create-wmr/src/index.js#L108-L124\n */\nasync function templateDir(\n\tfrom: string,\n\tto: string,\n\topts: CreateAtomOptions,\n): Promise<void[]> {\n\tconst files = await fs.readdir(from)\n\tconst results = await Promise.all(\n\t\tfiles.map(async (f) => {\n\t\t\tif (f === `.` || f === `..`) return\n\t\t\tconst filename = resolve(from, f)\n\t\t\tif ((await fs.stat(filename)).isDirectory()) {\n\t\t\t\tawait fs.mkdir(resolve(to, f), { recursive: true })\n\t\t\t\treturn templateDir(filename, resolve(to, f), opts)\n\t\t\t}\n\t\t\tif (opts.packageManager !== `npm` && f === `README.md`) {\n\t\t\t\tawait fs.writeFile(\n\t\t\t\t\tresolve(to, f),\n\t\t\t\t\t(await fs.readFile(filename, `utf-8`)).replace(\n\t\t\t\t\t\t/npm run/g,\n\t\t\t\t\t\topts.packageManager === `bun` ? `bun run` : opts.packageManager,\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t\treturn\n\t\t\t}\n\t\t\t// Publishing to npm renames the .gitignore to .npmignore\n\t\t\t// https://github.com/npm/npm/issues/7252#issuecomment-253339460\n\t\t\tif (f === `_gitignore`) f = `.gitignore`\n\t\t\tawait fs.copyFile(filename, resolve(to, f))\n\t\t}),\n\t)\n\treturn results.flat(99)\n}\n\nasync function installDeps(to: string, opts: CreateAtomOptions) {\n\tconst dependencies: string[] = []\n\tconst devDependencies: string[] = []\n\n\tconst installOpts = {\n\t\tpackageManager: opts.packageManager,\n\t\tto,\n\t}\n\n\tawait installPackages(dependencies, { ...installOpts })\n\tdevDependencies.length &&\n\t\t(await installPackages(devDependencies, { ...installOpts, dev: true }))\n}\n\ntype InstallOptions = {\n\tpackageManager: `bun` | `npm` | `pnpm` | `yarn`\n\tto: string\n\tdev?: boolean\n}\n\nfunction installPackages(pkgs: string[], opts: InstallOptions) {\n\treturn x(\n\t\topts.packageManager,\n\t\t[\n\t\t\t// `yarn add` will fail if nothing is provided\n\t\t\topts.packageManager === `yarn` ? (pkgs.length ? `add` : ``) : `install`,\n\t\t\topts.dev ? `-D` : ``,\n\t\t\t...pkgs,\n\t\t].filter(Boolean),\n\t\t{\n\t\t\tnodeOptions: {\n\t\t\t\tstdio: `ignore`,\n\t\t\t\tcwd: opts.to,\n\t\t\t},\n\t\t},\n\t)\n}\n\nfunction getPkgManager(): `bun` | `npm` | `pnpm` | `yarn` {\n\tconst userAgent = process.env[`npm_config_user_agent`] ?? ``\n\tif (userAgent.startsWith(`yarn`)) return `yarn`\n\tif (userAgent.startsWith(`pnpm`)) return `pnpm`\n\tif (userAgent.startsWith(`bun`)) return `bun`\n\treturn `npm`\n}\n"],"mappings":"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"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Colors } from "picocolors/types";
|
|
2
|
+
|
|
3
|
+
//#region src/create-atom.d.ts
|
|
4
|
+
declare const pico: Colors;
|
|
5
|
+
type CreateAtomOptions = {
|
|
6
|
+
packageManager: `bun` | `npm` | `pnpm` | `yarn`;
|
|
7
|
+
};
|
|
8
|
+
type CreateAtomOptionsPreloaded = { [K in keyof CreateAtomOptions]?: CreateAtomOptions[K] | undefined } & {
|
|
9
|
+
skipHints?: boolean | undefined;
|
|
10
|
+
};
|
|
11
|
+
declare function createAtom(argDir: string | undefined, options: CreateAtomOptionsPreloaded): Promise<void>;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { CreateAtomOptions, CreateAtomOptionsPreloaded, createAtom, pico };
|
|
14
|
+
//# sourceMappingURL=create-atom.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-atom.d.ts","names":["pico: Colors"],"sources":["../src/create-atom.ts"],"sourcesContent":[],"mappings":";;;cASaA,MAAM;KAIP,iBAAA;EAJZ,cAAmB,EAAA,KAAA,GAAA,KAAA,GAAA,MAAA,GAAA,MAAA;AAInB,CAAA;AAIY,KAAA,0BAAA,GAAA,QAAA,MACC,iBADD,IACsB,iBADtB,CACwC,CADxC,CAAA,GAAA,SAAA,EAAA,GAAA;EACC,SAAA,CAAA,EAAA,OAAA,GAAA,SAAA;CAAqB;AAAkB,iBAG9B,UAAA,CAH8B,MAAA,EAAA,MAAA,GAAA,SAAA,EAAA,OAAA,EAK1C,0BAL0C,CAAA,EAMjD,OANiD,CAAA,IAAA,CAAA"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { t as createAtom } from "./create-atom-BV6WVRvY.js";
|
|
3
|
+
import { cli, helpOption, optional, parseBooleanOption } from "comline";
|
|
4
|
+
import { z } from "zod/v4";
|
|
5
|
+
|
|
6
|
+
//#region src/create-atom.x.ts
|
|
7
|
+
const helper = helpOption();
|
|
8
|
+
const CREATE_ATOM_OPTS = {
|
|
9
|
+
description: `Check for breaking changes in a package.`,
|
|
10
|
+
optionsSchema: z.object({
|
|
11
|
+
packageManager: z.union([
|
|
12
|
+
z.literal(`bun`),
|
|
13
|
+
z.literal(`npm`),
|
|
14
|
+
z.literal(`pnpm`),
|
|
15
|
+
z.literal(`yarn`)
|
|
16
|
+
]).optional(),
|
|
17
|
+
skipHints: z.boolean().optional()
|
|
18
|
+
}),
|
|
19
|
+
options: {
|
|
20
|
+
...helper.options,
|
|
21
|
+
packageManager: {
|
|
22
|
+
flag: `m`,
|
|
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
|
+
}
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
const { inputs } = cli({
|
|
37
|
+
cliName: `create-atom`,
|
|
38
|
+
routes: optional({ $projectName: null }),
|
|
39
|
+
routeOptions: {
|
|
40
|
+
"": CREATE_ATOM_OPTS,
|
|
41
|
+
$projectName: CREATE_ATOM_OPTS
|
|
42
|
+
}
|
|
43
|
+
}, {
|
|
44
|
+
error: console.error.bind(console),
|
|
45
|
+
info: () => {}
|
|
46
|
+
})(process.argv);
|
|
47
|
+
await createAtom(inputs.path[0], inputs.opts);
|
|
48
|
+
|
|
49
|
+
//#endregion
|
|
50
|
+
export { };
|
|
51
|
+
//# sourceMappingURL=create-atom.x.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-atom.x.js","names":[],"sources":["../src/create-atom.x.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport type { OptionsGroup } from \"comline\"\nimport { cli, helpOption, optional, parseBooleanOption } from \"comline\"\nimport { z } from \"zod/v4\"\n\nimport type { CreateAtomOptionsPreloaded } from \"./create-atom.ts\"\nimport { createAtom } from \"./create-atom.ts\"\n\nconst helper = helpOption()\n\nconst CREATE_ATOM_OPTS = {\n\tdescription: `Check for breaking changes in a package.`,\n\toptionsSchema: z.object({\n\t\tpackageManager: z\n\t\t\t.union([\n\t\t\t\tz.literal(`bun`),\n\t\t\t\tz.literal(`npm`),\n\t\t\t\tz.literal(`pnpm`),\n\t\t\t\tz.literal(`yarn`),\n\t\t\t])\n\t\t\t.optional(),\n\t\tskipHints: z.boolean().optional(),\n\t}),\n\toptions: {\n\t\t...helper.options,\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,SAAS,YAAY;AAE3B,MAAM,mBAAmB;CACxB,aAAa;CACb,eAAe,EAAE,OAAO;EACvB,gBAAgB,EACd,MAAM;GACN,EAAE,QAAQ,MAAM;GAChB,EAAE,QAAQ,MAAM;GAChB,EAAE,QAAQ,OAAO;GACjB,EAAE,QAAQ,OAAO;GACjB,CAAC,CACD,UAAU;EACZ,WAAW,EAAE,SAAS,CAAC,UAAU;EACjC,CAAC;CACF,SAAS;EACR,GAAG,OAAO;EACV,gBAAgB;GACf,MAAM;GACN,UAAU;GACV,aAAa;GACb,SAAS;GACT;EACD,WAAW;GACV,MAAM;GACN,UAAU;GACV,aAAa;GACb,SAAS;GACT,OAAO;GACP;EACD;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
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "create-atom.io",
|
|
3
|
+
"version": "0.0.0",
|
|
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
|
+
"comline": "workspace:*",
|
|
30
|
+
"picocolors": "1.1.1",
|
|
31
|
+
"tinyexec": "1.0.1",
|
|
32
|
+
"zod": "3.25.76"
|
|
33
|
+
},
|
|
34
|
+
"scripts": {
|
|
35
|
+
"build": "tsdown && rm -f dist/*.x.d.ts",
|
|
36
|
+
"lint:biome": "biome check -- .",
|
|
37
|
+
"lint:eslint": "eslint -- .",
|
|
38
|
+
"lint:types": "tsgo --noEmit",
|
|
39
|
+
"watch:types": "tsgo --watch --noEmit",
|
|
40
|
+
"lint": "concurrently \"bun:lint:*\"",
|
|
41
|
+
"test": "bun test --watch -- **/*.test.ts",
|
|
42
|
+
"test:once": "bun test -- **/*.test.ts",
|
|
43
|
+
"postversion": "biome format --write package.json"
|
|
44
|
+
},
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"@types/node": "24.9.1",
|
|
47
|
+
"@types/bun": "npm:bun-types@1.3.1",
|
|
48
|
+
"@types/tmp": "0.2.6",
|
|
49
|
+
"@typescript/native-preview": "7.0.0-dev.20251025.1",
|
|
50
|
+
"concurrently": "9.2.1",
|
|
51
|
+
"eslint": "9.38.0",
|
|
52
|
+
"rimraf": "6.0.1",
|
|
53
|
+
"tmp": "0.2.5",
|
|
54
|
+
"tsdown": "0.15.9"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import { existsSync, promises as fs } from "node:fs"
|
|
2
|
+
import { dirname, resolve } from "node:path"
|
|
3
|
+
import { fileURLToPath } from "node:url"
|
|
4
|
+
|
|
5
|
+
import * as prompts from "@clack/prompts"
|
|
6
|
+
import picocolors from "picocolors"
|
|
7
|
+
import type { Colors } from "picocolors/types"
|
|
8
|
+
import { x } from "tinyexec"
|
|
9
|
+
|
|
10
|
+
export const pico: Colors = picocolors.createColors(true)
|
|
11
|
+
|
|
12
|
+
const s = prompts.spinner()
|
|
13
|
+
|
|
14
|
+
export type CreateAtomOptions = {
|
|
15
|
+
packageManager: `bun` | `npm` | `pnpm` | `yarn`
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export type CreateAtomOptionsPreloaded = {
|
|
19
|
+
[K in keyof CreateAtomOptions]?: CreateAtomOptions[K] | undefined
|
|
20
|
+
} & { skipHints?: boolean | undefined }
|
|
21
|
+
|
|
22
|
+
export async function createAtom(
|
|
23
|
+
argDir: string | undefined,
|
|
24
|
+
options: CreateAtomOptionsPreloaded,
|
|
25
|
+
): Promise<void> {
|
|
26
|
+
const skipHint = options.skipHints ?? false
|
|
27
|
+
const packageManager = options.packageManager ?? getPkgManager()
|
|
28
|
+
|
|
29
|
+
prompts.intro(pico.greenBright(`atom.io - Data Components for TypeScript`))
|
|
30
|
+
|
|
31
|
+
const { dir } = await prompts.group(
|
|
32
|
+
{
|
|
33
|
+
dir: () =>
|
|
34
|
+
argDir
|
|
35
|
+
? Promise.resolve(argDir)
|
|
36
|
+
: prompts.text({
|
|
37
|
+
message: `Project directory:`,
|
|
38
|
+
placeholder: `my-preact-app`,
|
|
39
|
+
validate(value) {
|
|
40
|
+
if (value.length === 0) {
|
|
41
|
+
return `Directory name is required!`
|
|
42
|
+
}
|
|
43
|
+
if (existsSync(value)) {
|
|
44
|
+
return `Refusing to overwrite existing directory or file! Please provide a non-clashing name.`
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
}),
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
onCancel: () => {
|
|
51
|
+
prompts.cancel(pico.yellow(`Cancelled`))
|
|
52
|
+
process.exit(0)
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
)
|
|
56
|
+
const targetDir = resolve(process.cwd(), dir)
|
|
57
|
+
const opts: CreateAtomOptions = { packageManager }
|
|
58
|
+
|
|
59
|
+
await useSpinner(
|
|
60
|
+
`Setting up your project directory...`,
|
|
61
|
+
() => scaffold(targetDir, opts),
|
|
62
|
+
`Set up project directory`,
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
await useSpinner(
|
|
66
|
+
`Installing project dependencies...`,
|
|
67
|
+
() => installDeps(targetDir, opts),
|
|
68
|
+
`Installed project dependencies`,
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
if (skipHint === false) {
|
|
72
|
+
const gettingStarted = `
|
|
73
|
+
${pico.dim(`$`)} ${pico.blueBright(`cd ${dir}`)}
|
|
74
|
+
${pico.dim(`$`)} ${pico.blueBright(
|
|
75
|
+
`${
|
|
76
|
+
packageManager === `npm`
|
|
77
|
+
? `npm run`
|
|
78
|
+
: packageManager === `bun`
|
|
79
|
+
? `bun run`
|
|
80
|
+
: packageManager
|
|
81
|
+
} dev`,
|
|
82
|
+
)}
|
|
83
|
+
`
|
|
84
|
+
prompts.note(
|
|
85
|
+
gettingStarted.trim().replace(/^\t\t\t/gm, ``),
|
|
86
|
+
`Getting Started`,
|
|
87
|
+
)
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
prompts.outro(pico.green(`You're all set!`))
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
async function useSpinner(
|
|
94
|
+
startMessage: string,
|
|
95
|
+
fn: () => Promise<void>,
|
|
96
|
+
finishMessage: string,
|
|
97
|
+
): Promise<void> {
|
|
98
|
+
s.start(startMessage)
|
|
99
|
+
await fn()
|
|
100
|
+
s.stop(pico.green(finishMessage))
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
async function scaffold(to: string, opts: CreateAtomOptions): Promise<void> {
|
|
104
|
+
await fs.mkdir(to, { recursive: true })
|
|
105
|
+
|
|
106
|
+
const __dirname = dirname(fileURLToPath(import.meta.url))
|
|
107
|
+
await templateDir(resolve(__dirname, `../templates`, `base`), to, opts)
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Recursive fs copy, swiped from `create-wmr`:
|
|
112
|
+
* https://github.com/preactjs/wmr/blob/3c5672ecd2f958c8eaf372d33c084dc69228ae3f/packages/create-wmr/src/index.js#L108-L124
|
|
113
|
+
*/
|
|
114
|
+
async function templateDir(
|
|
115
|
+
from: string,
|
|
116
|
+
to: string,
|
|
117
|
+
opts: CreateAtomOptions,
|
|
118
|
+
): Promise<void[]> {
|
|
119
|
+
const files = await fs.readdir(from)
|
|
120
|
+
const results = await Promise.all(
|
|
121
|
+
files.map(async (f) => {
|
|
122
|
+
if (f === `.` || f === `..`) return
|
|
123
|
+
const filename = resolve(from, f)
|
|
124
|
+
if ((await fs.stat(filename)).isDirectory()) {
|
|
125
|
+
await fs.mkdir(resolve(to, f), { recursive: true })
|
|
126
|
+
return templateDir(filename, resolve(to, f), opts)
|
|
127
|
+
}
|
|
128
|
+
if (opts.packageManager !== `npm` && f === `README.md`) {
|
|
129
|
+
await fs.writeFile(
|
|
130
|
+
resolve(to, f),
|
|
131
|
+
(await fs.readFile(filename, `utf-8`)).replace(
|
|
132
|
+
/npm run/g,
|
|
133
|
+
opts.packageManager === `bun` ? `bun run` : opts.packageManager,
|
|
134
|
+
),
|
|
135
|
+
)
|
|
136
|
+
return
|
|
137
|
+
}
|
|
138
|
+
// Publishing to npm renames the .gitignore to .npmignore
|
|
139
|
+
// https://github.com/npm/npm/issues/7252#issuecomment-253339460
|
|
140
|
+
if (f === `_gitignore`) f = `.gitignore`
|
|
141
|
+
await fs.copyFile(filename, resolve(to, f))
|
|
142
|
+
}),
|
|
143
|
+
)
|
|
144
|
+
return results.flat(99)
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
async function installDeps(to: string, opts: CreateAtomOptions) {
|
|
148
|
+
const dependencies: string[] = []
|
|
149
|
+
const devDependencies: string[] = []
|
|
150
|
+
|
|
151
|
+
const installOpts = {
|
|
152
|
+
packageManager: opts.packageManager,
|
|
153
|
+
to,
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
await installPackages(dependencies, { ...installOpts })
|
|
157
|
+
devDependencies.length &&
|
|
158
|
+
(await installPackages(devDependencies, { ...installOpts, dev: true }))
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
type InstallOptions = {
|
|
162
|
+
packageManager: `bun` | `npm` | `pnpm` | `yarn`
|
|
163
|
+
to: string
|
|
164
|
+
dev?: boolean
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
function installPackages(pkgs: string[], opts: InstallOptions) {
|
|
168
|
+
return x(
|
|
169
|
+
opts.packageManager,
|
|
170
|
+
[
|
|
171
|
+
// `yarn add` will fail if nothing is provided
|
|
172
|
+
opts.packageManager === `yarn` ? (pkgs.length ? `add` : ``) : `install`,
|
|
173
|
+
opts.dev ? `-D` : ``,
|
|
174
|
+
...pkgs,
|
|
175
|
+
].filter(Boolean),
|
|
176
|
+
{
|
|
177
|
+
nodeOptions: {
|
|
178
|
+
stdio: `ignore`,
|
|
179
|
+
cwd: opts.to,
|
|
180
|
+
},
|
|
181
|
+
},
|
|
182
|
+
)
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
function getPkgManager(): `bun` | `npm` | `pnpm` | `yarn` {
|
|
186
|
+
const userAgent = process.env[`npm_config_user_agent`] ?? ``
|
|
187
|
+
if (userAgent.startsWith(`yarn`)) return `yarn`
|
|
188
|
+
if (userAgent.startsWith(`pnpm`)) return `pnpm`
|
|
189
|
+
if (userAgent.startsWith(`bun`)) return `bun`
|
|
190
|
+
return `npm`
|
|
191
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import type { OptionsGroup } from "comline"
|
|
4
|
+
import { cli, helpOption, optional, parseBooleanOption } from "comline"
|
|
5
|
+
import { z } from "zod/v4"
|
|
6
|
+
|
|
7
|
+
import type { CreateAtomOptionsPreloaded } from "./create-atom.ts"
|
|
8
|
+
import { createAtom } from "./create-atom.ts"
|
|
9
|
+
|
|
10
|
+
const helper = helpOption()
|
|
11
|
+
|
|
12
|
+
const CREATE_ATOM_OPTS = {
|
|
13
|
+
description: `Check for breaking changes in a package.`,
|
|
14
|
+
optionsSchema: z.object({
|
|
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(),
|
|
24
|
+
}),
|
|
25
|
+
options: {
|
|
26
|
+
...helper.options,
|
|
27
|
+
packageManager: {
|
|
28
|
+
flag: `m`,
|
|
29
|
+
required: false,
|
|
30
|
+
description: `The package manager to use.`,
|
|
31
|
+
example: `--packageManager="npm"`,
|
|
32
|
+
},
|
|
33
|
+
skipHints: {
|
|
34
|
+
flag: `k`,
|
|
35
|
+
required: false,
|
|
36
|
+
description: `Silences the 'Getting Started' info, mainly for use in other initializers that may wrap this one but provide their own scripts/instructions.`,
|
|
37
|
+
example: `--skipHints`,
|
|
38
|
+
parse: parseBooleanOption,
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
} satisfies OptionsGroup<CreateAtomOptionsPreloaded>
|
|
42
|
+
|
|
43
|
+
const parse = cli(
|
|
44
|
+
{
|
|
45
|
+
cliName: `create-atom`,
|
|
46
|
+
routes: optional({ $projectName: null }),
|
|
47
|
+
routeOptions: {
|
|
48
|
+
"": CREATE_ATOM_OPTS,
|
|
49
|
+
$projectName: CREATE_ATOM_OPTS,
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
error: console.error.bind(console),
|
|
54
|
+
info: () => {},
|
|
55
|
+
},
|
|
56
|
+
)
|
|
57
|
+
const { inputs } = parse(process.argv)
|
|
58
|
+
|
|
59
|
+
await createAtom(inputs.path[0], inputs.opts)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Logs
|
|
2
|
+
logs
|
|
3
|
+
*.log
|
|
4
|
+
npm-debug.log*
|
|
5
|
+
yarn-debug.log*
|
|
6
|
+
yarn-error.log*
|
|
7
|
+
pnpm-debug.log*
|
|
8
|
+
lerna-debug.log*
|
|
9
|
+
|
|
10
|
+
node_modules
|
|
11
|
+
dist
|
|
12
|
+
dist-ssr
|
|
13
|
+
*.local
|
|
14
|
+
|
|
15
|
+
# Editor directories and files
|
|
16
|
+
.vscode/*
|
|
17
|
+
!.vscode/extensions.json
|
|
18
|
+
.idea
|
|
19
|
+
.DS_Store
|
|
20
|
+
*.suo
|
|
21
|
+
*.ntvs*
|
|
22
|
+
*.njsproj
|
|
23
|
+
*.sln
|
|
24
|
+
*.sw?
|