create-rstack 0.0.3 → 1.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/README.md +8 -35
- package/dist/index.d.ts +18 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,47 +1,20 @@
|
|
|
1
|
-
#
|
|
1
|
+
# create-rstack
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A shared package for create-rspack, create-rsbuild, create-rspress and create-rslib.
|
|
4
|
+
|
|
5
|
+
> This package should only be used in Rstack projects.
|
|
4
6
|
|
|
5
7
|
<p>
|
|
6
|
-
<a href="https://npmjs.com/package/
|
|
7
|
-
<img src="https://img.shields.io/npm/v/
|
|
8
|
+
<a href="https://npmjs.com/package/create-rstack">
|
|
9
|
+
<img src="https://img.shields.io/npm/v/create-rstack?style=flat-square&colorA=564341&colorB=EDED91" alt="npm version" />
|
|
8
10
|
</a>
|
|
9
11
|
<img src="https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square&colorA=564341&colorB=EDED91" alt="license" />
|
|
10
12
|
</p>
|
|
11
13
|
|
|
12
|
-
##
|
|
13
|
-
|
|
14
|
-
Install:
|
|
14
|
+
## Install
|
|
15
15
|
|
|
16
16
|
```bash
|
|
17
|
-
npm add
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
Add plugin to your `rsbuild.config.ts`:
|
|
21
|
-
|
|
22
|
-
```ts
|
|
23
|
-
// rsbuild.config.ts
|
|
24
|
-
import { pluginExample } from "rsbuild-plugin-example";
|
|
25
|
-
|
|
26
|
-
export default {
|
|
27
|
-
plugins: [pluginExample()],
|
|
28
|
-
};
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
## Options
|
|
32
|
-
|
|
33
|
-
### foo
|
|
34
|
-
|
|
35
|
-
Some description.
|
|
36
|
-
|
|
37
|
-
- Type: `string`
|
|
38
|
-
- Default: `undefined`
|
|
39
|
-
- Example:
|
|
40
|
-
|
|
41
|
-
```js
|
|
42
|
-
pluginExample({
|
|
43
|
-
foo: "bar",
|
|
44
|
-
});
|
|
17
|
+
npm add create-rstack -D
|
|
45
18
|
```
|
|
46
19
|
|
|
47
20
|
## License
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { multiselect, select, text } from '@clack/prompts';
|
|
2
|
+
export { select, multiselect, text };
|
|
3
|
+
export declare function checkCancel<T>(value: unknown): T;
|
|
4
|
+
export type Argv = {
|
|
5
|
+
help?: boolean;
|
|
6
|
+
dir?: string;
|
|
7
|
+
template?: string;
|
|
8
|
+
override?: boolean;
|
|
9
|
+
tools?: string | string[];
|
|
10
|
+
};
|
|
11
|
+
export type ESLintTemplateName = 'vanilla-js' | 'vanilla-ts' | 'react-js' | 'react-ts' | 'vue-ts' | 'vue-js' | 'svelte-js' | 'svelte-ts';
|
|
12
|
+
export declare function create({ name, root, templates, getTemplateName, mapESLintTemplate, }: {
|
|
13
|
+
name: string;
|
|
14
|
+
root: string;
|
|
15
|
+
templates: string[];
|
|
16
|
+
getTemplateName: (argv: Argv) => Promise<string>;
|
|
17
|
+
mapESLintTemplate: (templateName: string) => ESLintTemplateName | null;
|
|
18
|
+
}): Promise<void>;
|