@soroush.design/cli 0.3.0-alpha.0 → 0.3.0-alpha.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/README.md +6 -4
- package/dist/bin.mjs +2 -9
- package/dist/index.d.mts +19 -27
- package/dist/index.mjs +1 -1
- package/dist/init-D8jcA_md.mjs +1279 -0
- package/dist/{io-BFbf4S_u.mjs → io-CcfotW1X.mjs} +105 -883
- package/dist/migrate-jUWXX1hA.mjs +22239 -0
- package/package.json +23 -22
- package/templates/astro/js/base/README.md +4 -3
- package/templates/astro/js/base/astro.config.mjs +16 -1
- package/templates/astro/js/base/src/components/About.jsx +2 -2
- package/templates/astro/js/base/src/components/Counter.jsx +3 -3
- package/templates/astro/js/base/src/components/Greeting.jsx +1 -1
- package/templates/astro/js/base/src/components/Header.jsx +6 -6
- package/templates/astro/js/base/src/components/Home.jsx +6 -6
- package/templates/astro/js/base/src/components/Home.test.jsx +5 -1
- package/templates/astro/js/base/src/components/NotFound.jsx +3 -3
- package/templates/astro/js/base/src/components/SchemeSwitch.jsx +4 -4
- package/templates/astro/js/base/src/theme/Island.jsx +1 -1
- package/templates/astro/js/sample-data/src/components/ItemDetails.jsx +3 -3
- package/templates/astro/js/sample-data/src/components/ItemList.jsx +3 -3
- package/templates/astro/js/sample-data/src/components/StatusChip.jsx +1 -1
- package/templates/astro/js/with/jotai/src/components/Counter.jsx +3 -3
- package/templates/astro/js/with/react-hook-form/src/components/Form.jsx +4 -4
- package/templates/astro/js/with/redux-toolkit/src/components/Counter.jsx +3 -3
- package/templates/astro/js/with/zustand/src/components/Counter.jsx +3 -3
- package/templates/astro/ts/base/README.md +4 -3
- package/templates/astro/ts/base/astro.config.mjs +16 -1
- package/templates/astro/ts/base/src/components/About.tsx +2 -2
- package/templates/astro/ts/base/src/components/Counter.tsx +3 -3
- package/templates/astro/ts/base/src/components/Greeting.tsx +1 -1
- package/templates/astro/ts/base/src/components/Header.tsx +6 -6
- package/templates/astro/ts/base/src/components/Home.test.tsx +5 -1
- package/templates/astro/ts/base/src/components/Home.tsx +6 -6
- package/templates/astro/ts/base/src/components/NotFound.tsx +3 -3
- package/templates/astro/ts/base/src/components/SchemeSwitch.tsx +4 -4
- package/templates/astro/ts/base/src/theme/Island.tsx +1 -1
- package/templates/astro/ts/sample-data/src/components/ItemDetails.tsx +3 -3
- package/templates/astro/ts/sample-data/src/components/ItemList.tsx +3 -3
- package/templates/astro/ts/sample-data/src/components/StatusChip.tsx +1 -1
- package/templates/astro/ts/with/jotai/src/components/Counter.tsx +3 -3
- package/templates/astro/ts/with/react-hook-form/src/components/Form.tsx +4 -4
- package/templates/astro/ts/with/redux-toolkit/src/components/Counter.tsx +3 -3
- package/templates/astro/ts/with/zustand/src/components/Counter.tsx +3 -3
- package/templates/react-router/js/base/README.md +4 -3
- package/templates/react-router/js/base/src/components/Header.jsx +5 -5
- package/templates/react-router/js/base/src/components/RouterLink.jsx +2 -2
- package/templates/react-router/js/base/src/components/SchemeSwitch.jsx +4 -4
- package/templates/react-router/js/base/src/main.jsx +5 -0
- package/templates/react-router/js/base/src/pages/ErrorPage.jsx +2 -2
- package/templates/react-router/js/base/src/pages/Layout.jsx +1 -1
- package/templates/react-router/js/base/src/pages/about/Page.jsx +2 -2
- package/templates/react-router/js/base/src/pages/index/Counter.jsx +3 -3
- package/templates/react-router/js/base/src/pages/index/Greeting.jsx +1 -1
- package/templates/react-router/js/base/src/pages/index/Page.jsx +6 -6
- package/templates/react-router/js/base/src/pages/index/Page.test.jsx +5 -1
- package/templates/react-router/js/sample-data/src/pages/item/Page.jsx +2 -2
- package/templates/react-router/js/sample-data/src/pages/items/Page.jsx +2 -2
- package/templates/react-router/js/sample-data/src/pages/items/StatusChip.jsx +1 -1
- package/templates/react-router/js/with/jotai/src/pages/index/Counter.jsx +3 -3
- package/templates/react-router/js/with/react-hook-form/src/pages/form/Page.jsx +4 -4
- package/templates/react-router/js/with/redux-toolkit/src/pages/index/Counter.jsx +3 -3
- package/templates/react-router/js/with/zustand/src/pages/index/Counter.jsx +3 -3
- package/templates/react-router/ts/base/README.md +4 -3
- package/templates/react-router/ts/base/src/components/Header.tsx +5 -5
- package/templates/react-router/ts/base/src/components/RouterLink.tsx +2 -2
- package/templates/react-router/ts/base/src/components/SchemeSwitch.tsx +4 -4
- package/templates/react-router/ts/base/src/main.tsx +5 -0
- package/templates/react-router/ts/base/src/pages/ErrorPage.tsx +2 -2
- package/templates/react-router/ts/base/src/pages/Layout.tsx +1 -1
- package/templates/react-router/ts/base/src/pages/about/Page.tsx +2 -2
- package/templates/react-router/ts/base/src/pages/index/Counter.tsx +3 -3
- package/templates/react-router/ts/base/src/pages/index/Greeting.tsx +1 -1
- package/templates/react-router/ts/base/src/pages/index/Page.test.tsx +5 -1
- package/templates/react-router/ts/base/src/pages/index/Page.tsx +6 -6
- package/templates/react-router/ts/sample-data/src/pages/item/Page.tsx +2 -2
- package/templates/react-router/ts/sample-data/src/pages/items/Page.tsx +2 -2
- package/templates/react-router/ts/sample-data/src/pages/items/StatusChip.tsx +1 -1
- package/templates/react-router/ts/with/jotai/src/pages/index/Counter.tsx +3 -3
- package/templates/react-router/ts/with/react-hook-form/src/pages/form/Page.tsx +4 -4
- package/templates/react-router/ts/with/redux-toolkit/src/pages/index/Counter.tsx +3 -3
- package/templates/react-router/ts/with/zustand/src/pages/index/Counter.tsx +3 -3
- package/templates/vike/js/base/README.md +3 -2
- package/templates/vike/js/base/src/components/Header.jsx +6 -6
- package/templates/vike/js/base/src/components/SchemeSwitch.jsx +4 -4
- package/templates/vike/js/base/src/pages/+Layout.jsx +1 -1
- package/templates/vike/js/base/src/pages/+onCreateGlobalContext.js +7 -0
- package/templates/vike/js/base/src/pages/+onRenderHtml.jsx +2 -3
- package/templates/vike/js/base/src/pages/PageShell.jsx +2 -2
- package/templates/vike/js/base/src/pages/_error/+Page.jsx +3 -3
- package/templates/vike/js/base/src/pages/about/+Page.jsx +2 -2
- package/templates/vike/js/base/src/pages/index/+Page.jsx +6 -6
- package/templates/vike/js/base/src/pages/index/Counter.jsx +3 -3
- package/templates/vike/js/base/src/pages/index/Greeting.jsx +1 -1
- package/templates/vike/js/base/src/pages/index/Page.test.jsx +5 -1
- package/templates/vike/js/sample-data/src/pages/items/+Page.jsx +3 -3
- package/templates/vike/js/sample-data/src/pages/items/@id/+Page.jsx +3 -3
- package/templates/vike/js/sample-data/src/pages/items/StatusChip.jsx +1 -1
- package/templates/vike/js/ssg/src/pages/about/+Page.jsx +2 -2
- package/templates/vike/js/ssr/src/pages/+onRenderHtml.jsx +2 -3
- package/templates/vike/js/ssr/src/pages/about/+Page.jsx +2 -2
- package/templates/vike/js/with/jotai/src/pages/index/Counter.jsx +3 -3
- package/templates/vike/js/with/react-hook-form/src/pages/form/+Page.jsx +4 -4
- package/templates/vike/js/with/redux-toolkit/src/pages/index/Counter.jsx +3 -3
- package/templates/vike/js/with/zustand/src/pages/index/Counter.jsx +3 -3
- package/templates/vike/ts/base/README.md +3 -2
- package/templates/vike/ts/base/src/components/Header.tsx +6 -6
- package/templates/vike/ts/base/src/components/SchemeSwitch.tsx +4 -4
- package/templates/vike/ts/base/src/pages/+Layout.tsx +1 -1
- package/templates/vike/ts/base/src/pages/+onCreateGlobalContext.ts +7 -0
- package/templates/vike/ts/base/src/pages/+onRenderHtml.tsx +2 -3
- package/templates/vike/ts/base/src/pages/PageShell.tsx +2 -2
- package/templates/vike/ts/base/src/pages/_error/+Page.tsx +3 -3
- package/templates/vike/ts/base/src/pages/about/+Page.tsx +2 -2
- package/templates/vike/ts/base/src/pages/index/+Page.tsx +6 -6
- package/templates/vike/ts/base/src/pages/index/Counter.tsx +3 -3
- package/templates/vike/ts/base/src/pages/index/Greeting.tsx +1 -1
- package/templates/vike/ts/base/src/pages/index/Page.test.tsx +5 -1
- package/templates/vike/ts/sample-data/src/pages/items/+Page.tsx +3 -3
- package/templates/vike/ts/sample-data/src/pages/items/@id/+Page.tsx +3 -3
- package/templates/vike/ts/sample-data/src/pages/items/StatusChip.tsx +1 -1
- package/templates/vike/ts/ssg/src/pages/about/+Page.tsx +2 -2
- package/templates/vike/ts/ssr/src/pages/+onRenderHtml.tsx +2 -3
- package/templates/vike/ts/ssr/src/pages/about/+Page.tsx +2 -2
- package/templates/vike/ts/with/jotai/src/pages/index/Counter.tsx +3 -3
- package/templates/vike/ts/with/react-hook-form/src/pages/form/+Page.tsx +4 -4
- package/templates/vike/ts/with/redux-toolkit/src/pages/index/Counter.tsx +3 -3
- package/templates/vike/ts/with/zustand/src/pages/index/Counter.tsx +3 -3
package/README.md
CHANGED
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
# @soroush.design/cli
|
|
2
2
|
|
|
3
|
-
The command line of
|
|
3
|
+
The command line of [Gild UI](https://gild-ui.soroush.design).
|
|
4
4
|
|
|
5
|
-
- **`create`** starts a new app: a working boilerplate on
|
|
5
|
+
- **`create`** starts a new app: a working boilerplate on Gild UI, with its theme, its
|
|
6
6
|
providers and a few pages in place, ready to build on.
|
|
7
|
-
- **`init`** sets
|
|
7
|
+
- **`init`** sets Gild UI up in a React app you already have.
|
|
8
|
+
- **`migrate`** moves an app to the latest Gild UI, one step at a time.
|
|
8
9
|
|
|
9
10
|
```sh
|
|
10
11
|
npx @soroush.design/cli create my-app
|
|
11
12
|
npx @soroush.design/cli init
|
|
13
|
+
npx @soroush.design/cli migrate
|
|
12
14
|
```
|
|
13
15
|
|
|
14
16
|
Each shows every change first, and writes nothing until you say yes. `--help` after a command
|
|
15
17
|
lists its options.
|
|
16
18
|
|
|
17
|
-
**Documentation:** [
|
|
19
|
+
**Documentation:** [gild-ui.soroush.design/cli](https://gild-ui.soroush.design/cli/) - every question and
|
|
18
20
|
option, the app `create` makes, and what `init` changes.
|
|
19
21
|
|
|
20
22
|
## License
|
package/dist/bin.mjs
CHANGED
|
@@ -1,16 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
var name = "@soroush.tech/design-system";
|
|
5
|
-
var version = "3.0.0-alpha.0";
|
|
6
|
-
var peerDependencies = {
|
|
7
|
-
"react": "^19.2.8",
|
|
8
|
-
"react-dom": "^19.2.8"
|
|
9
|
-
};
|
|
2
|
+
import { N as name, P as peerDependencies } from "./init-D8jcA_md.mjs";
|
|
3
|
+
import { n as main, t as createNodeIo } from "./io-CcfotW1X.mjs";
|
|
10
4
|
// src/bin.ts
|
|
11
5
|
process.exitCode = await main(process.argv.slice(2), createNodeIo(), {
|
|
12
6
|
name,
|
|
13
|
-
version,
|
|
14
7
|
peerDependencies
|
|
15
8
|
});
|
|
16
9
|
export {};
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,20 @@
|
|
|
1
1
|
import { Readable, Writable } from "node:stream";
|
|
2
|
+
type Scheme = 'light' | 'dark';
|
|
3
|
+
type PackageManagerName = 'npm' | 'pnpm' | 'yarn' | 'bun';
|
|
4
|
+
interface PackageJson {
|
|
5
|
+
name?: string;
|
|
6
|
+
version?: string;
|
|
7
|
+
packageManager?: string;
|
|
8
|
+
dependencies?: Record<string, string>;
|
|
9
|
+
devDependencies?: Record<string, string>;
|
|
10
|
+
peerDependencies?: Record<string, string>;
|
|
11
|
+
'@parcel/resolver-default'?: {
|
|
12
|
+
packageExports?: boolean;
|
|
13
|
+
};
|
|
14
|
+
workspaces?: string[] | {
|
|
15
|
+
packages?: string[];
|
|
16
|
+
};
|
|
17
|
+
}
|
|
2
18
|
/** One answer a choice offers. */
|
|
3
19
|
interface Choice {
|
|
4
20
|
/** What the command gets back. */
|
|
@@ -47,31 +63,11 @@ interface NodeIoOptions {
|
|
|
47
63
|
cwd?: string;
|
|
48
64
|
}
|
|
49
65
|
export declare function createNodeIo({ stdin, stdout, platform, cwd }?: NodeIoOptions): Io;
|
|
50
|
-
type Scheme = 'light' | 'dark';
|
|
51
|
-
type PackageManagerName = 'npm' | 'pnpm' | 'yarn' | 'bun';
|
|
52
|
-
interface PackageJson {
|
|
53
|
-
name?: string;
|
|
54
|
-
version?: string;
|
|
55
|
-
packageManager?: string;
|
|
56
|
-
dependencies?: Record<string, string>;
|
|
57
|
-
devDependencies?: Record<string, string>;
|
|
58
|
-
peerDependencies?: Record<string, string>;
|
|
59
|
-
'@parcel/resolver-default'?: {
|
|
60
|
-
packageExports?: boolean;
|
|
61
|
-
};
|
|
62
|
-
workspaces?: string[] | {
|
|
63
|
-
packages?: string[];
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* The `package.json` of `@soroush.tech/design-system`: the nearest one above `fromFile` that is named
|
|
68
|
-
* for it. Its bin finds itself this way.
|
|
69
|
-
*/
|
|
70
|
-
export declare function readDesignSystemPackage(fromFile: string): PackageJson;
|
|
71
66
|
/**
|
|
72
67
|
* Reads the command line and runs the command, for `designSystem`: the package of
|
|
73
|
-
* `@
|
|
74
|
-
* stops it at a question, which is before anything is
|
|
68
|
+
* `@gild-ui/react`, whose peer range for React `init` checks the app against.
|
|
69
|
+
* Returns the exit code: 130 when the person stops it at a question, which is before anything is
|
|
70
|
+
* written.
|
|
75
71
|
*/
|
|
76
72
|
declare function main(argv: readonly string[], io: Io, designSystem: PackageJson): Promise<number>;
|
|
77
73
|
/** A library `create` can add to a new app, with its wiring and a small example. */
|
|
@@ -111,16 +107,12 @@ interface CreateOptions {
|
|
|
111
107
|
isConfirmed: boolean;
|
|
112
108
|
/** Prints the plan and exits. */
|
|
113
109
|
isDryRun: boolean;
|
|
114
|
-
/** Runs `git init` in the new folder, unless it is inside a repository already. */
|
|
115
|
-
isGit: boolean;
|
|
116
110
|
}
|
|
117
111
|
interface InitOptions {
|
|
118
112
|
/** Applies without asking. */
|
|
119
113
|
isConfirmed: boolean;
|
|
120
114
|
/** Prints the plan and exits. */
|
|
121
115
|
isDryRun: boolean;
|
|
122
|
-
/** Runs outside git, or in a tree with uncommitted changes. */
|
|
123
|
-
isForced: boolean;
|
|
124
116
|
scheme: Scheme | undefined;
|
|
125
117
|
}
|
|
126
118
|
export { type CreateOptions, type InitOptions, type Io, type PackageJson, main as default };
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as createNodeIo, n as default
|
|
1
|
+
export { t as createNodeIo, n as default } from "./io-CcfotW1X.mjs";
|