@plop-next/core 0.1.2 → 0.1.3
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 -47
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,64 +1,25 @@
|
|
|
1
1
|
# @plop-next/core
|
|
2
2
|
|
|
3
|
-
Core
|
|
3
|
+
Core internals for plop-next.
|
|
4
4
|
|
|
5
|
-
This package
|
|
5
|
+
This package is primarily intended to be used by `@plop-next/cli`.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
- prompt handler registry
|
|
9
|
-
- theming system
|
|
10
|
-
- error classes and utilities
|
|
11
|
-
|
|
12
|
-
If you only need the CLI, use `@plop-next/cli`.
|
|
13
|
-
|
|
14
|
-
## Installation
|
|
7
|
+
For normal usage, install and run the CLI package only:
|
|
15
8
|
|
|
16
9
|
```bash
|
|
17
|
-
npm install @plop-next/
|
|
10
|
+
npm install -D @plop-next/cli
|
|
18
11
|
```
|
|
19
12
|
|
|
20
13
|
or:
|
|
21
14
|
|
|
22
15
|
```bash
|
|
23
|
-
yarn add @plop-next/
|
|
16
|
+
yarn add -D @plop-next/cli
|
|
24
17
|
```
|
|
25
18
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
```ts
|
|
29
|
-
import { PlopNextCore } from "@plop-next/core";
|
|
30
|
-
|
|
31
|
-
const core = new PlopNextCore();
|
|
32
|
-
|
|
33
|
-
core.setGenerator("demo", {
|
|
34
|
-
description: "Minimal generator",
|
|
35
|
-
prompts: [],
|
|
36
|
-
actions: [],
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
const generators = core.getGeneratorList();
|
|
40
|
-
console.log(generators.map((g) => ("name" in g ? g.name : "separator")));
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
## Common exports
|
|
44
|
-
|
|
45
|
-
- `PlopNextCore`
|
|
46
|
-
- `ActionRunner`
|
|
47
|
-
- `PromptHandlerRegistry`
|
|
48
|
-
- `registerBuiltInPromptHandlers`
|
|
49
|
-
- `defaultTheme`
|
|
50
|
-
- `ErrorHandler`
|
|
51
|
-
- `Separator`
|
|
52
|
-
|
|
53
|
-
## Development scripts
|
|
54
|
-
|
|
55
|
-
```bash
|
|
56
|
-
yarn workspace @plop-next/core build
|
|
57
|
-
yarn workspace @plop-next/core test
|
|
58
|
-
```
|
|
19
|
+
You do not need to install or use this package directly in a typical project setup.
|
|
59
20
|
|
|
60
21
|
## Links
|
|
61
22
|
|
|
62
23
|
- Documentation: [https://nivvdiy.github.io/plop-next/](https://nivvdiy.github.io/plop-next/)
|
|
63
|
-
- Repository: [https://github.com/
|
|
64
|
-
- Issues: [https://github.com/
|
|
24
|
+
- Repository: [https://github.com/Nivvdiy/plop-next](https://github.com/Nivvdiy/plop-next)
|
|
25
|
+
- Issues: [https://github.com/Nivvdiy/plop-next/issues](https://github.com/Nivvdiy/plop-next/issues)
|