create-gtkx 0.21.0 → 1.0.0-rc.2
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 +173 -0
- package/bin/create-gtkx.js +1 -4
- package/dist/cli.d.ts +1 -23
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +6 -11
- package/dist/cli.js.map +1 -1
- package/dist/command.d.ts +50 -57
- package/dist/command.d.ts.map +1 -1
- package/dist/command.js +80 -53
- package/dist/command.js.map +1 -1
- package/dist/errors.d.ts +8 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +14 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +1 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -3
- package/dist/index.js.map +1 -1
- package/dist/package-managers.d.ts +24 -0
- package/dist/package-managers.d.ts.map +1 -0
- package/dist/package-managers.js +10 -0
- package/dist/package-managers.js.map +1 -0
- package/dist/project-name.d.ts +3 -0
- package/dist/project-name.d.ts.map +1 -0
- package/dist/project-name.js +3 -0
- package/dist/project-name.js.map +1 -0
- package/dist/scaffolder.d.ts +8 -46
- package/dist/scaffolder.d.ts.map +1 -1
- package/dist/scaffolder.js +280 -127
- package/dist/scaffolder.js.map +1 -1
- package/{templates/gitignore.ejs → dist/templates/.gitignore.ejs} +0 -1
- package/{templates → dist/templates}/gtkx.config.ts.ejs +1 -1
- package/{templates → dist/templates}/package.json.ejs +8 -2
- package/{templates → dist/templates}/src/app.tsx.ejs +4 -8
- package/{templates → dist/templates}/src/index.tsx.ejs +1 -1
- package/{templates → dist/templates}/tests/app.test.tsx.ejs +5 -8
- package/{templates → dist/templates}/tsconfig.json.ejs +2 -0
- package/{templates/config → dist/templates}/vitest.config.ts.ejs +2 -3
- package/dist/templates.d.ts +7 -6
- package/dist/templates.d.ts.map +1 -1
- package/dist/templates.js +10 -20
- package/dist/templates.js.map +1 -1
- package/package.json +37 -14
- package/src/cli.ts +6 -11
- package/src/command.ts +95 -65
- package/src/errors.ts +15 -0
- package/src/index.ts +1 -4
- package/src/package-managers.ts +15 -0
- package/src/project-name.ts +3 -0
- package/src/scaffolder.ts +377 -183
- package/src/templates/.gitignore.ejs +3 -0
- package/src/templates/gtkx.config.ts.ejs +6 -0
- package/src/templates/package.json.ejs +22 -0
- package/src/templates/src/app.tsx.ejs +44 -0
- package/src/templates/src/gtkx-env.d.ts.ejs +2 -0
- package/src/templates/src/index.tsx.ejs +4 -0
- package/src/templates/tests/app.test.tsx.ejs +13 -0
- package/src/templates/tsconfig.json.ejs +16 -0
- package/src/templates/vitest.config.ts.ejs +10 -0
- package/src/templates.ts +17 -28
- package/dist/create.d.ts +0 -3
- package/dist/create.d.ts.map +0 -1
- package/dist/create.js +0 -7
- package/dist/create.js.map +0 -1
- package/dist/deps.d.ts +0 -3
- package/dist/deps.d.ts.map +0 -1
- package/dist/deps.js +0 -51
- package/dist/deps.js.map +0 -1
- package/dist/options.d.ts +0 -25
- package/dist/options.d.ts.map +0 -1
- package/dist/options.js +0 -13
- package/dist/options.js.map +0 -1
- package/src/create.ts +0 -7
- package/src/deps.ts +0 -51
- package/src/options.ts +0 -24
- package/templates/claude/EXAMPLES.md.ejs +0 -790
- package/templates/claude/SKILL.md.ejs +0 -126
- package/templates/claude/WIDGETS.md.ejs +0 -934
- /package/{templates → dist/templates}/src/gtkx-env.d.ts.ejs +0 -0
package/README.md
ADDED
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/gtkx-org/gtkx/main/logo.svg" alt="GTKX" width="100" />
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<h1 align="center">GTKX</h1>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
The React framework for Linux.<br />
|
|
9
|
+
Build GTK4 and Adwaita apps in TypeScript, with React components and hooks driving GNOME's own widgets. What you ship is a GNOME app.
|
|
10
|
+
</p>
|
|
11
|
+
|
|
12
|
+
<p align="center">
|
|
13
|
+
<a href="https://www.npmjs.com/package/create-gtkx"><img src="https://img.shields.io/npm/v/create-gtkx?color=cb3837&logo=npm&label=create-gtkx" alt="npm version" /></a>
|
|
14
|
+
<a href="https://www.npmjs.com/package/create-gtkx"><img src="https://img.shields.io/npm/dm/create-gtkx?color=cb3837&logo=npm&label=downloads" alt="npm downloads" /></a>
|
|
15
|
+
<img src="https://img.shields.io/badge/node-%E2%89%A524-339933?logo=node.js&logoColor=white" alt="Node >= 24" />
|
|
16
|
+
<a href="https://github.com/gtkx-org/gtkx/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MPL--2.0-blue.svg" alt="License: MPL-2.0" /></a>
|
|
17
|
+
<a href="https://github.com/gtkx-org/gtkx/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/gtkx-org/gtkx/ci.yml?branch=main&logo=github&label=CI" alt="CI status" /></a>
|
|
18
|
+
<img src="https://img.shields.io/badge/TypeScript-strict-3178c6?logo=typescript&logoColor=white" alt="TypeScript" />
|
|
19
|
+
</p>
|
|
20
|
+
|
|
21
|
+
<p align="center">
|
|
22
|
+
<a href="https://gtkx.dev">Homepage</a> ·
|
|
23
|
+
<a href="https://gtkx.dev/guide/why-gtkx">Documentation</a> ·
|
|
24
|
+
<a href="https://github.com/gtkx-org/gtkx/tree/main/examples">Examples</a> ·
|
|
25
|
+
<a href="https://github.com/gtkx-org/gtkx/blob/main/CONTRIBUTING.md">Contributing</a>
|
|
26
|
+
</p>
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
GTKX generates fully typed bindings for the entire GTK4 and Adwaita surface directly from GObject-Introspection. On top of those bindings you get the React programming model: components and hooks driving GObject instances, with Fast Refresh while you develop.
|
|
31
|
+
|
|
32
|
+
<p align="center">
|
|
33
|
+
<img src="https://raw.githubusercontent.com/gtkx-org/gtkx/main/examples/tutorial/assets/screenshot.png" alt="The Tasks app: an Adwaita window with a sidebar of smart views and colored lists on the left, and a boxed task list on the right." />
|
|
34
|
+
</p>
|
|
35
|
+
|
|
36
|
+
<p align="center">
|
|
37
|
+
<em>The Tasks app you build in the <a href="https://gtkx.dev/tutorial/">tutorial</a>.</em>
|
|
38
|
+
</p>
|
|
39
|
+
|
|
40
|
+
## Demo
|
|
41
|
+
|
|
42
|
+
The intrinsic elements in this snippet render GTK4 widgets, and ordinary React hooks and events drive them:
|
|
43
|
+
|
|
44
|
+
```tsx
|
|
45
|
+
import * as Gtk from "@gtkx/gi/gtk";
|
|
46
|
+
import { GtkApplication, GtkApplicationWindow, GtkBox, GtkButton, GtkLabel } from "@gtkx/jsx/gtk";
|
|
47
|
+
import { createRoot, quit } from "@gtkx/react";
|
|
48
|
+
import { useState } from "react";
|
|
49
|
+
|
|
50
|
+
const Counter = () => {
|
|
51
|
+
const [count, setCount] = useState(0);
|
|
52
|
+
|
|
53
|
+
return (
|
|
54
|
+
<GtkApplicationWindow
|
|
55
|
+
title="Hello GTKX"
|
|
56
|
+
defaultWidth={400}
|
|
57
|
+
defaultHeight={300}
|
|
58
|
+
onCloseRequest={quit}
|
|
59
|
+
>
|
|
60
|
+
<GtkBox
|
|
61
|
+
orientation={Gtk.Orientation.VERTICAL}
|
|
62
|
+
spacing={20}
|
|
63
|
+
marginTop={40}
|
|
64
|
+
marginBottom={40}
|
|
65
|
+
marginStart={40}
|
|
66
|
+
marginEnd={40}
|
|
67
|
+
valign={Gtk.Align.CENTER}
|
|
68
|
+
halign={Gtk.Align.CENTER}
|
|
69
|
+
>
|
|
70
|
+
<GtkLabel cssClasses={["title-1"]}>Welcome to GTKX!</GtkLabel>
|
|
71
|
+
<GtkLabel cssClasses={["title-2"]}>{`Count: ${count}`}</GtkLabel>
|
|
72
|
+
<GtkButton
|
|
73
|
+
label="Increment"
|
|
74
|
+
onClicked={() => setCount((c) => c + 1)}
|
|
75
|
+
cssClasses={["suggested-action", "pill"]}
|
|
76
|
+
/>
|
|
77
|
+
</GtkBox>
|
|
78
|
+
</GtkApplicationWindow>
|
|
79
|
+
);
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
const App = () => (
|
|
83
|
+
<GtkApplication>
|
|
84
|
+
<Counter />
|
|
85
|
+
</GtkApplication>
|
|
86
|
+
);
|
|
87
|
+
|
|
88
|
+
createRoot().render(<App />);
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
This is the [`hello-world`](https://github.com/gtkx-org/gtkx/tree/main/examples/hello-world) example, with `app.tsx` and `index.tsx` combined into a single snippet. `@gtkx/gi` and `@gtkx/jsx` are per-project bindings generated by the CLI, not packages you install from npm.
|
|
92
|
+
|
|
93
|
+
## Why GTKX
|
|
94
|
+
|
|
95
|
+
### A declarative layer for the GNOME stack
|
|
96
|
+
|
|
97
|
+
GTK4 is mature, and GtkBuilder XML can lay out a static interface, but nothing re-renders that interface when your application state changes, and nothing hot-reloads it as you work. GTKX adds that missing layer, and the tooling around it, on top of the stack you already know:
|
|
98
|
+
|
|
99
|
+
- a React reconciler that exposes every GObject as a JSX element,
|
|
100
|
+
- a CLI for scaffolding, development, and production builds,
|
|
101
|
+
- a dev server with Fast Refresh that patches your running UI in place,
|
|
102
|
+
- CSS-in-JS styling and high-level list, grid, and dialog components,
|
|
103
|
+
- a Testing Library-style API for querying and driving your widgets in tests,
|
|
104
|
+
- and a Model Context Protocol (MCP) server that exposes your live app to AI agents.
|
|
105
|
+
|
|
106
|
+
### The full GNOME API surface
|
|
107
|
+
|
|
108
|
+
React Native and similar frameworks hide the native toolkit so one API can run everywhere. GTKX exposes it: GTK4, Adwaita, and any other GObject-Introspection library on your system. Linux-only by design.
|
|
109
|
+
|
|
110
|
+
### Why Node.js, and why generated bindings
|
|
111
|
+
|
|
112
|
+
GTKX runs on Node.js, which puts native modules, the npm ecosystem, and the tooling built for Node.js APIs within reach. GJS is GNOME's own runtime, built on SpiderMonkey rather than V8; node-gtk runs on Node.js but is lightly maintained, on the older nan/V8 ABI rather than N-API, and still centered on GTK3. The [why-gtkx guide](https://gtkx.dev/guide/why-gtkx) covers the comparison in full.
|
|
113
|
+
|
|
114
|
+
GTKX generates the TypeScript types and the native FFI calls from the same GObject-Introspection data, so the types cannot drift from the calls they back. Codegen covers the whole GTK4 and Adwaita surface.
|
|
115
|
+
|
|
116
|
+
At runtime, the native Rust core calls straight into the system GTK4, Adwaita, and GLib libraries through libffi, without loading libgirepository at all.
|
|
117
|
+
|
|
118
|
+
## Quick start
|
|
119
|
+
|
|
120
|
+
GTKX is Linux-only and needs Node.js 24 or later. See [Requirements](#requirements).
|
|
121
|
+
|
|
122
|
+
Scaffold a new app with the `create-gtkx` initializer:
|
|
123
|
+
|
|
124
|
+
```sh
|
|
125
|
+
npm create gtkx@rc
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
The same command works with other package managers: `pnpm create gtkx@rc` or `yarn create gtkx@rc`.
|
|
129
|
+
|
|
130
|
+
Then run your new app:
|
|
131
|
+
|
|
132
|
+
```sh
|
|
133
|
+
cd my-app
|
|
134
|
+
npm run dev
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
To go further, follow the [tutorial](https://gtkx.dev/tutorial/).
|
|
138
|
+
|
|
139
|
+
## Documentation
|
|
140
|
+
|
|
141
|
+
The documentation at **[gtkx.dev](https://gtkx.dev)** includes a step-by-step tutorial that builds a complete GNOME app, from scaffolding to packaging and shipping, plus guides and a full API reference.
|
|
142
|
+
|
|
143
|
+
**[Read the docs →](https://gtkx.dev/guide/why-gtkx)**
|
|
144
|
+
|
|
145
|
+
## Requirements
|
|
146
|
+
|
|
147
|
+
GTKX is Linux-only. You need:
|
|
148
|
+
|
|
149
|
+
- Linux with the GTK4 (4.20 or later), Adwaita (1.8 or later), and GLib development libraries
|
|
150
|
+
- Node.js 24 or later
|
|
151
|
+
|
|
152
|
+
The `@gtkx/native` addon ships prebuilt for x64 and arm64 glibc Linux; other targets need to build it from the GTKX repository, which requires a Rust toolchain.
|
|
153
|
+
|
|
154
|
+
## Examples
|
|
155
|
+
|
|
156
|
+
Explore the [example apps](https://github.com/gtkx-org/gtkx/tree/main/examples):
|
|
157
|
+
|
|
158
|
+
- [`hello-world`](https://github.com/gtkx-org/gtkx/tree/main/examples/hello-world): the counter above.
|
|
159
|
+
- [`gtk-demo`](https://github.com/gtkx-org/gtkx/tree/main/examples/gtk-demo): a React port of the official GTK4 widget showcase, covering lists, dialogs, gestures, CSS, and OpenGL.
|
|
160
|
+
- [`browser`](https://github.com/gtkx-org/gtkx/tree/main/examples/browser): a WebKitWebView-based web browser.
|
|
161
|
+
- [`tutorial`](https://github.com/gtkx-org/gtkx/tree/main/examples/tutorial): the Tasks app the documentation builds.
|
|
162
|
+
|
|
163
|
+
## Status
|
|
164
|
+
|
|
165
|
+
GTKX 1.0 is at the release candidate stage.
|
|
166
|
+
|
|
167
|
+
## Contributing
|
|
168
|
+
|
|
169
|
+
Contributions are welcome. See [CONTRIBUTING.md](https://github.com/gtkx-org/gtkx/blob/main/CONTRIBUTING.md), the [Code of Conduct](https://github.com/gtkx-org/gtkx/blob/main/CODE_OF_CONDUCT.md), and the [security policy](https://github.com/gtkx-org/gtkx/blob/main/SECURITY.md). Building the repo needs Node.js 24 or later, pnpm, and a Rust toolchain.
|
|
170
|
+
|
|
171
|
+
## License
|
|
172
|
+
|
|
173
|
+
GTKX is licensed under [MPL-2.0](https://github.com/gtkx-org/gtkx/blob/main/LICENSE).
|
package/bin/create-gtkx.js
CHANGED
package/dist/cli.d.ts
CHANGED
|
@@ -1,24 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
name: {
|
|
3
|
-
type: "positional";
|
|
4
|
-
description: string;
|
|
5
|
-
required: false;
|
|
6
|
-
};
|
|
7
|
-
"application-id": {
|
|
8
|
-
type: "string";
|
|
9
|
-
description: string;
|
|
10
|
-
};
|
|
11
|
-
pm: {
|
|
12
|
-
type: "string";
|
|
13
|
-
description: string;
|
|
14
|
-
};
|
|
15
|
-
testing: {
|
|
16
|
-
type: "string";
|
|
17
|
-
description: string;
|
|
18
|
-
};
|
|
19
|
-
"claude-skills": {
|
|
20
|
-
type: "boolean";
|
|
21
|
-
description: string;
|
|
22
|
-
};
|
|
23
|
-
}>;
|
|
1
|
+
export {};
|
|
24
2
|
//# sourceMappingURL=cli.d.ts.map
|
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":""}
|
package/dist/cli.js
CHANGED
|
@@ -1,19 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { resolve } from "node:path";
|
|
3
|
-
import { fileURLToPath } from "node:url";
|
|
1
|
+
import { packageVersion } from "@gtkx/utils";
|
|
4
2
|
import { defineCommand, runMain } from "citty";
|
|
5
|
-
import {
|
|
6
|
-
const
|
|
7
|
-
|
|
3
|
+
import { scaffoldCommand } from "./command.js";
|
|
4
|
+
const version = packageVersion(import.meta.url);
|
|
5
|
+
const main = defineCommand({
|
|
6
|
+
...scaffoldCommand,
|
|
8
7
|
meta: {
|
|
9
8
|
name: "create-gtkx",
|
|
10
9
|
version,
|
|
11
10
|
description: "Scaffold a new GTKX application",
|
|
12
11
|
},
|
|
13
|
-
args: createCommandArgs,
|
|
14
|
-
run: ({ args }) => runCreate(args),
|
|
15
12
|
});
|
|
16
|
-
|
|
17
|
-
void runMain(main);
|
|
18
|
-
}
|
|
13
|
+
void runMain(main);
|
|
19
14
|
//# sourceMappingURL=cli.js.map
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,MAAM,OAAO,GAAG,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAEhD,MAAM,IAAI,GAAG,aAAa,CAAC;IACvB,GAAG,eAAe;IAClB,IAAI,EAAE;QACF,IAAI,EAAE,aAAa;QACnB,OAAO;QACP,WAAW,EAAE,iCAAiC;KACjD;CACJ,CAAC,CAAC;AAEH,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC","sourcesContent":["import { packageVersion } from \"@gtkx/utils\";\nimport { defineCommand, runMain } from \"citty\";\nimport { scaffoldCommand } from \"./command.js\";\n\nconst version = packageVersion(import.meta.url);\n\nconst main = defineCommand({\n ...scaffoldCommand,\n meta: {\n name: \"create-gtkx\",\n version,\n description: \"Scaffold a new GTKX application\",\n },\n});\n\nvoid runMain(main);\n"]}
|
package/dist/command.d.ts
CHANGED
|
@@ -1,65 +1,58 @@
|
|
|
1
|
-
|
|
2
|
-
export type CreateCommandArgs = {
|
|
1
|
+
type CreateCommandArgs = {
|
|
3
2
|
name?: string | undefined;
|
|
4
3
|
"application-id"?: string | undefined;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
"package-manager"?: string | undefined;
|
|
5
|
+
typescript?: boolean | undefined;
|
|
6
|
+
vitest?: boolean | undefined;
|
|
7
|
+
yes?: boolean | undefined;
|
|
8
|
+
"no-interactive"?: boolean | undefined;
|
|
9
|
+
overwrite?: boolean | undefined;
|
|
8
10
|
};
|
|
9
11
|
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
+
* Citty command definition for the CLI `create` subcommand. It declares the
|
|
13
|
+
* scaffolder's arguments (target name, application ID, package manager,
|
|
14
|
+
* TypeScript and Vitest toggles, prompt behavior, and overwrite) and runs the
|
|
15
|
+
* scaffolder to generate a new GTKX application.
|
|
12
16
|
*/
|
|
13
|
-
|
|
14
|
-
name: {
|
|
15
|
-
type: "positional";
|
|
16
|
-
description:
|
|
17
|
-
required: false;
|
|
18
|
-
};
|
|
19
|
-
"application-id": {
|
|
20
|
-
type: "string";
|
|
21
|
-
description:
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
type: "string";
|
|
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
|
-
description: string;
|
|
51
|
-
};
|
|
52
|
-
pm: {
|
|
53
|
-
type: "string";
|
|
54
|
-
description: string;
|
|
55
|
-
};
|
|
56
|
-
testing: {
|
|
57
|
-
type: "string";
|
|
58
|
-
description: string;
|
|
59
|
-
};
|
|
60
|
-
"claude-skills": {
|
|
61
|
-
type: "boolean";
|
|
62
|
-
description: string;
|
|
17
|
+
declare const scaffoldCommand: import("citty").CommandDef<{
|
|
18
|
+
readonly name: {
|
|
19
|
+
readonly type: "positional";
|
|
20
|
+
readonly description: "Target directory or project name (e.g. my-app, ., apps/my-app)";
|
|
21
|
+
readonly required: false;
|
|
22
|
+
};
|
|
23
|
+
readonly "application-id": {
|
|
24
|
+
readonly type: "string";
|
|
25
|
+
readonly description: "Application ID (e.g., com.example.myapp)";
|
|
26
|
+
};
|
|
27
|
+
readonly "package-manager": {
|
|
28
|
+
readonly type: "string";
|
|
29
|
+
readonly alias: "pm";
|
|
30
|
+
readonly description: string;
|
|
31
|
+
};
|
|
32
|
+
readonly typescript: {
|
|
33
|
+
readonly type: "boolean";
|
|
34
|
+
readonly negativeDescription: "Scaffold the application in JavaScript instead of TypeScript";
|
|
35
|
+
readonly description: "Scaffold the application in TypeScript";
|
|
36
|
+
};
|
|
37
|
+
readonly vitest: {
|
|
38
|
+
readonly type: "boolean";
|
|
39
|
+
readonly description: "Include a Vitest testing setup";
|
|
40
|
+
};
|
|
41
|
+
readonly yes: {
|
|
42
|
+
readonly type: "boolean";
|
|
43
|
+
readonly alias: "y";
|
|
44
|
+
readonly description: "Skip prompts and accept defaults for unspecified options";
|
|
45
|
+
};
|
|
46
|
+
readonly "no-interactive": {
|
|
47
|
+
readonly type: "boolean";
|
|
48
|
+
readonly description: string;
|
|
49
|
+
};
|
|
50
|
+
readonly overwrite: {
|
|
51
|
+
readonly type: "boolean";
|
|
52
|
+
readonly alias: "force";
|
|
53
|
+
readonly description: "Overwrite the contents of a non-empty target directory when running without prompts";
|
|
63
54
|
};
|
|
64
55
|
}>;
|
|
56
|
+
declare const runCreate: (args: CreateCommandArgs) => Promise<void>;
|
|
57
|
+
export { scaffoldCommand, runCreate, type CreateCommandArgs };
|
|
65
58
|
//# sourceMappingURL=command.d.ts.map
|
package/dist/command.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../src/command.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../src/command.ts"],"names":[],"mappings":"AAKA,KAAK,iBAAiB,GAAG;IACrB,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC,iBAAiB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACvC,UAAU,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACjC,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC7B,GAAG,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC1B,gBAAgB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACvC,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CACnC,CAAC;AAEF;;;;;GAKG;AACH,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+CnB,CAAC;AA4BH,QAAA,MAAM,SAAS,GAAU,MAAM,iBAAiB,KAAG,OAAO,CAAC,IAAI,CAiB9D,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,KAAK,iBAAiB,EAAE,CAAC"}
|
package/dist/command.js
CHANGED
|
@@ -1,69 +1,96 @@
|
|
|
1
1
|
import { defineCommand } from "citty";
|
|
2
|
-
import {
|
|
3
|
-
import { isKnownPackageManager,
|
|
2
|
+
import { OperationCanceledError, ScaffoldAbortedError } from "./errors.js";
|
|
3
|
+
import { isKnownPackageManager, PACKAGE_MANAGER_FLAG_DESCRIPTION } from "./package-managers.js";
|
|
4
|
+
import { scaffold } from "./scaffolder.js";
|
|
4
5
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
6
|
+
* Citty command definition for the CLI `create` subcommand. It declares the
|
|
7
|
+
* scaffolder's arguments (target name, application ID, package manager,
|
|
8
|
+
* TypeScript and Vitest toggles, prompt behavior, and overwrite) and runs the
|
|
9
|
+
* scaffolder to generate a new GTKX application.
|
|
7
10
|
*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
description: "
|
|
12
|
-
required: false,
|
|
13
|
-
},
|
|
14
|
-
"application-id": {
|
|
15
|
-
type: "string",
|
|
16
|
-
description: "Application ID (e.g., com.example.myapp)",
|
|
17
|
-
},
|
|
18
|
-
pm: {
|
|
19
|
-
type: "string",
|
|
20
|
-
description: PACKAGE_MANAGER_FLAG_DESCRIPTION,
|
|
21
|
-
},
|
|
22
|
-
testing: {
|
|
23
|
-
type: "string",
|
|
24
|
-
description: TESTING_FLAG_DESCRIPTION,
|
|
11
|
+
const scaffoldCommand = defineCommand({
|
|
12
|
+
meta: {
|
|
13
|
+
name: "create",
|
|
14
|
+
description: "Create a new GTKX application",
|
|
25
15
|
},
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
16
|
+
args: {
|
|
17
|
+
name: {
|
|
18
|
+
type: "positional",
|
|
19
|
+
description: "Target directory or project name (e.g. my-app, ., apps/my-app)",
|
|
20
|
+
required: false,
|
|
21
|
+
},
|
|
22
|
+
"application-id": {
|
|
23
|
+
type: "string",
|
|
24
|
+
description: "Application ID (e.g., com.example.myapp)",
|
|
25
|
+
},
|
|
26
|
+
"package-manager": {
|
|
27
|
+
type: "string",
|
|
28
|
+
alias: "pm",
|
|
29
|
+
description: PACKAGE_MANAGER_FLAG_DESCRIPTION,
|
|
30
|
+
},
|
|
31
|
+
typescript: {
|
|
32
|
+
type: "boolean",
|
|
33
|
+
negativeDescription: "Scaffold the application in JavaScript instead of TypeScript",
|
|
34
|
+
description: "Scaffold the application in TypeScript",
|
|
35
|
+
},
|
|
36
|
+
vitest: {
|
|
37
|
+
type: "boolean",
|
|
38
|
+
description: "Include a Vitest testing setup",
|
|
39
|
+
},
|
|
40
|
+
yes: {
|
|
41
|
+
type: "boolean",
|
|
42
|
+
alias: "y",
|
|
43
|
+
description: "Skip prompts and accept defaults for unspecified options",
|
|
44
|
+
},
|
|
45
|
+
"no-interactive": {
|
|
46
|
+
type: "boolean",
|
|
47
|
+
description: "Run without prompts, using the default for every option not passed on the command line " +
|
|
48
|
+
"(same as --yes)",
|
|
49
|
+
},
|
|
50
|
+
overwrite: {
|
|
51
|
+
type: "boolean",
|
|
52
|
+
alias: "force",
|
|
53
|
+
description: "Overwrite the contents of a non-empty target directory when running without prompts",
|
|
54
|
+
},
|
|
29
55
|
},
|
|
30
|
-
}
|
|
56
|
+
run: ({ args }) => runCreate(args),
|
|
57
|
+
});
|
|
31
58
|
const parsePackageManager = (value) => {
|
|
32
|
-
if (value === undefined)
|
|
59
|
+
if (value === undefined) {
|
|
33
60
|
return undefined;
|
|
61
|
+
}
|
|
34
62
|
if (!isKnownPackageManager(value)) {
|
|
35
63
|
throw new Error(`Unknown package manager "${value}". Expected one of: ${PACKAGE_MANAGER_FLAG_DESCRIPTION}.`);
|
|
36
64
|
}
|
|
37
65
|
return value;
|
|
38
66
|
};
|
|
39
|
-
const
|
|
40
|
-
if (
|
|
41
|
-
return
|
|
42
|
-
if (!isTestingOption(value)) {
|
|
43
|
-
throw new Error(`Unknown testing setup "${value}". Expected one of: ${TESTING_FLAG_DESCRIPTION}.`);
|
|
67
|
+
const settleScaffoldFailure = (error) => {
|
|
68
|
+
if (error instanceof OperationCanceledError) {
|
|
69
|
+
return;
|
|
44
70
|
}
|
|
45
|
-
|
|
71
|
+
if (error instanceof ScaffoldAbortedError) {
|
|
72
|
+
process.exitCode = 1;
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
throw error;
|
|
46
76
|
};
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
77
|
+
const runCreate = async (args) => {
|
|
78
|
+
const isInteractive = args["no-interactive"] || args.yes ? false : process.stdin.isTTY;
|
|
79
|
+
const packageManager = parsePackageManager(args["package-manager"]);
|
|
80
|
+
try {
|
|
81
|
+
await scaffold({
|
|
82
|
+
name: args.name,
|
|
83
|
+
applicationId: args["application-id"],
|
|
84
|
+
packageManager,
|
|
85
|
+
typescript: args.typescript,
|
|
86
|
+
includeTesting: args.vitest,
|
|
87
|
+
interactive: isInteractive,
|
|
88
|
+
overwrite: args.overwrite,
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
catch (error) {
|
|
92
|
+
settleScaffoldFailure(error);
|
|
93
|
+
}
|
|
59
94
|
};
|
|
60
|
-
|
|
61
|
-
export const createCommand = defineCommand({
|
|
62
|
-
meta: {
|
|
63
|
-
name: "create",
|
|
64
|
-
description: "Create a new GTKX application",
|
|
65
|
-
},
|
|
66
|
-
args: createCommandArgs,
|
|
67
|
-
run: ({ args }) => runCreate(args),
|
|
68
|
-
});
|
|
95
|
+
export { scaffoldCommand, runCreate };
|
|
69
96
|
//# sourceMappingURL=command.js.map
|
package/dist/command.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.js","sourceRoot":"","sources":["../src/command.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"command.js","sourceRoot":"","sources":["../src/command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAE,gCAAgC,EAAuB,MAAM,uBAAuB,CAAC;AACrH,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAa3C;;;;;GAKG;AACH,MAAM,eAAe,GAAG,aAAa,CAAC;IAClC,IAAI,EAAE;QACF,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,+BAA+B;KAC/C;IACD,IAAI,EAAE;QACF,IAAI,EAAE;YACF,IAAI,EAAE,YAAY;YAClB,WAAW,EAAE,gEAAgE;YAC7E,QAAQ,EAAE,KAAK;SAClB;QACD,gBAAgB,EAAE;YACd,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,0CAA0C;SAC1D;QACD,iBAAiB,EAAE;YACf,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,IAAI;YACX,WAAW,EAAE,gCAAgC;SAChD;QACD,UAAU,EAAE;YACR,IAAI,EAAE,SAAS;YACf,mBAAmB,EAAE,8DAA8D;YACnF,WAAW,EAAE,wCAAwC;SACxD;QACD,MAAM,EAAE;YACJ,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,gCAAgC;SAChD;QACD,GAAG,EAAE;YACD,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,GAAG;YACV,WAAW,EAAE,0DAA0D;SAC1E;QACD,gBAAgB,EAAE;YACd,IAAI,EAAE,SAAS;YACf,WAAW,EACP,yFAAyF;gBACzF,iBAAiB;SACxB;QACD,SAAS,EAAE;YACP,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,OAAO;YACd,WAAW,EAAE,qFAAqF;SACrG;KACJ;IACD,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC;CACrC,CAAC,CAAC;AAEH,MAAM,mBAAmB,GAAG,CAAC,KAAyB,EAA8B,EAAE;IAClF,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACtB,OAAO,SAAS,CAAC;IACrB,CAAC;IAED,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC,EAAE,CAAC;QAChC,MAAM,IAAI,KAAK,CAAC,4BAA4B,KAAK,uBAAuB,gCAAgC,GAAG,CAAC,CAAC;IACjH,CAAC;IAED,OAAO,KAAK,CAAC;AACjB,CAAC,CAAC;AAEF,MAAM,qBAAqB,GAAG,CAAC,KAAc,EAAQ,EAAE;IACnD,IAAI,KAAK,YAAY,sBAAsB,EAAE,CAAC;QAC1C,OAAO;IACX,CAAC;IAED,IAAI,KAAK,YAAY,oBAAoB,EAAE,CAAC;QACxC,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;QAErB,OAAO;IACX,CAAC;IAED,MAAM,KAAK,CAAC;AAChB,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,KAAK,EAAE,IAAuB,EAAiB,EAAE;IAC/D,MAAM,aAAa,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC;IACvF,MAAM,cAAc,GAAG,mBAAmB,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC;IAEpE,IAAI,CAAC;QACD,MAAM,QAAQ,CAAC;YACX,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,aAAa,EAAE,IAAI,CAAC,gBAAgB,CAAC;YACrC,cAAc;YACd,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,cAAc,EAAE,IAAI,CAAC,MAAM;YAC3B,WAAW,EAAE,aAAa;YAC1B,SAAS,EAAE,IAAI,CAAC,SAAS;SAC5B,CAAC,CAAC;IACP,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACb,qBAAqB,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC;AACL,CAAC,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,SAAS,EAA0B,CAAC","sourcesContent":["import { defineCommand } from \"citty\";\nimport { OperationCanceledError, ScaffoldAbortedError } from \"./errors.js\";\nimport { isKnownPackageManager, PACKAGE_MANAGER_FLAG_DESCRIPTION, type PackageManager } from \"./package-managers.js\";\nimport { scaffold } from \"./scaffolder.js\";\n\ntype CreateCommandArgs = {\n name?: string | undefined;\n \"application-id\"?: string | undefined;\n \"package-manager\"?: string | undefined;\n typescript?: boolean | undefined;\n vitest?: boolean | undefined;\n yes?: boolean | undefined;\n \"no-interactive\"?: boolean | undefined;\n overwrite?: boolean | undefined;\n};\n\n/**\n * Citty command definition for the CLI `create` subcommand. It declares the\n * scaffolder's arguments (target name, application ID, package manager,\n * TypeScript and Vitest toggles, prompt behavior, and overwrite) and runs the\n * scaffolder to generate a new GTKX application.\n */\nconst scaffoldCommand = defineCommand({\n meta: {\n name: \"create\",\n description: \"Create a new GTKX application\",\n },\n args: {\n name: {\n type: \"positional\",\n description: \"Target directory or project name (e.g. my-app, ., apps/my-app)\",\n required: false,\n },\n \"application-id\": {\n type: \"string\",\n description: \"Application ID (e.g., com.example.myapp)\",\n },\n \"package-manager\": {\n type: \"string\",\n alias: \"pm\",\n description: PACKAGE_MANAGER_FLAG_DESCRIPTION,\n },\n typescript: {\n type: \"boolean\",\n negativeDescription: \"Scaffold the application in JavaScript instead of TypeScript\",\n description: \"Scaffold the application in TypeScript\",\n },\n vitest: {\n type: \"boolean\",\n description: \"Include a Vitest testing setup\",\n },\n yes: {\n type: \"boolean\",\n alias: \"y\",\n description: \"Skip prompts and accept defaults for unspecified options\",\n },\n \"no-interactive\": {\n type: \"boolean\",\n description:\n \"Run without prompts, using the default for every option not passed on the command line \" +\n \"(same as --yes)\",\n },\n overwrite: {\n type: \"boolean\",\n alias: \"force\",\n description: \"Overwrite the contents of a non-empty target directory when running without prompts\",\n },\n },\n run: ({ args }) => runCreate(args),\n});\n\nconst parsePackageManager = (value: string | undefined): PackageManager | undefined => {\n if (value === undefined) {\n return undefined;\n }\n\n if (!isKnownPackageManager(value)) {\n throw new Error(`Unknown package manager \"${value}\". Expected one of: ${PACKAGE_MANAGER_FLAG_DESCRIPTION}.`);\n }\n\n return value;\n};\n\nconst settleScaffoldFailure = (error: unknown): void => {\n if (error instanceof OperationCanceledError) {\n return;\n }\n\n if (error instanceof ScaffoldAbortedError) {\n process.exitCode = 1;\n\n return;\n }\n\n throw error;\n};\n\nconst runCreate = async (args: CreateCommandArgs): Promise<void> => {\n const isInteractive = args[\"no-interactive\"] || args.yes ? false : process.stdin.isTTY;\n const packageManager = parsePackageManager(args[\"package-manager\"]);\n\n try {\n await scaffold({\n name: args.name,\n applicationId: args[\"application-id\"],\n packageManager,\n typescript: args.typescript,\n includeTesting: args.vitest,\n interactive: isInteractive,\n overwrite: args.overwrite,\n });\n } catch (error) {\n settleScaffoldFailure(error);\n }\n};\n\nexport { scaffoldCommand, runCreate, type CreateCommandArgs };\n"]}
|
package/dist/errors.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,cAAM,oBAAqB,SAAQ,KAAK;gBACxB,OAAO,EAAE,MAAM;CAI9B;AAED,cAAM,sBAAuB,SAAQ,KAAK;;CAKzC;AAED,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,CAAC"}
|
package/dist/errors.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
class ScaffoldAbortedError extends Error {
|
|
2
|
+
constructor(message) {
|
|
3
|
+
super(message);
|
|
4
|
+
this.name = "ScaffoldAbortedError";
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
class OperationCanceledError extends Error {
|
|
8
|
+
constructor() {
|
|
9
|
+
super("Operation canceled");
|
|
10
|
+
this.name = "OperationCanceledError";
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export { OperationCanceledError, ScaffoldAbortedError };
|
|
14
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,MAAM,oBAAqB,SAAQ,KAAK;IACpC,YAAY,OAAe;QACvB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;IACvC,CAAC;CACJ;AAED,MAAM,sBAAuB,SAAQ,KAAK;IACtC;QACI,KAAK,CAAC,oBAAoB,CAAC,CAAC;QAC5B,IAAI,CAAC,IAAI,GAAG,wBAAwB,CAAC;IACzC,CAAC;CACJ;AAED,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,CAAC","sourcesContent":["class ScaffoldAbortedError extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"ScaffoldAbortedError\";\n }\n}\n\nclass OperationCanceledError extends Error {\n constructor() {\n super(\"Operation canceled\");\n this.name = \"OperationCanceledError\";\n }\n}\n\nexport { OperationCanceledError, ScaffoldAbortedError };\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { createApp } from "./create.js";
|
|
3
|
-
export { isKnownPackageManager, isTestingOption, type PackageManager, type TestingOption } from "./options.js";
|
|
4
|
-
export type { CreateOptions } from "./scaffolder.js";
|
|
1
|
+
export { scaffoldCommand } from "./command.js";
|
|
5
2
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { createApp } from "./create.js";
|
|
3
|
-
export { isKnownPackageManager, isTestingOption } from "./options.js";
|
|
1
|
+
export { scaffoldCommand } from "./command.js";
|
|
4
2
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC","sourcesContent":["export { scaffoldCommand } from \"./command.js\";\n"]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
type PackageManager = (typeof PACKAGE_MANAGERS)[number]["value"];
|
|
2
|
+
declare const PACKAGE_MANAGERS: readonly [{
|
|
3
|
+
readonly value: "pnpm";
|
|
4
|
+
readonly label: "pnpm";
|
|
5
|
+
readonly devCommand: "pnpm dev";
|
|
6
|
+
readonly installCommand: "pnpm install";
|
|
7
|
+
readonly recommended: true;
|
|
8
|
+
}, {
|
|
9
|
+
readonly value: "npm";
|
|
10
|
+
readonly label: "npm";
|
|
11
|
+
readonly devCommand: "npm run dev";
|
|
12
|
+
readonly installCommand: "npm install";
|
|
13
|
+
readonly recommended: false;
|
|
14
|
+
}, {
|
|
15
|
+
readonly value: "yarn";
|
|
16
|
+
readonly label: "yarn";
|
|
17
|
+
readonly devCommand: "yarn dev";
|
|
18
|
+
readonly installCommand: "yarn install";
|
|
19
|
+
readonly recommended: false;
|
|
20
|
+
}];
|
|
21
|
+
declare const PACKAGE_MANAGER_FLAG_DESCRIPTION: string;
|
|
22
|
+
declare const isKnownPackageManager: (name: string) => name is PackageManager;
|
|
23
|
+
export { PACKAGE_MANAGERS, PACKAGE_MANAGER_FLAG_DESCRIPTION, isKnownPackageManager, type PackageManager };
|
|
24
|
+
//# sourceMappingURL=package-managers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package-managers.d.ts","sourceRoot":"","sources":["../src/package-managers.ts"],"names":[],"mappings":"AAAA,KAAK,cAAc,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC;AAEjE,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;EAIZ,CAAC;AAGX,QAAA,MAAM,gCAAgC,QAA2D,CAAC;AAElG,QAAA,MAAM,qBAAqB,GAAI,MAAM,MAAM,KAAG,IAAI,IAAI,cACC,CAAC;AAExD,OAAO,EAAE,gBAAgB,EAAE,gCAAgC,EAAE,qBAAqB,EAAE,KAAK,cAAc,EAAE,CAAC"}
|