spyne-cli 0.6.7 → 0.6.8
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 +32 -30
- package/package.json +1 -1
- package/src/ui.js +1 -1
package/README.md
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
|
|
1
2
|
# Spyne CLI
|
|
2
3
|
|
|
3
|
-
`spyne-cli` is a command-line utility designed to streamline the process of generating and managing applications built using the [SpyneJS](https://github.com/spynejs/spynejs) framework. It simplifies the creation of `ViewStream`, `Channel`, and `SpyneTrait` classes, making it easier to build scalable and modular single-page applications.
|
|
4
|
+
`spyne-cli` is a command-line utility designed to streamline the process of generating and managing applications built using the [SpyneJS](https://github.com/spynejs/spynejs) framework. It simplifies the creation of `ViewStream`, `DomElement`, `Channel`, and `SpyneTrait` classes, making it easier to build scalable and modular single-page applications.
|
|
4
5
|
|
|
5
6
|
## Features
|
|
6
7
|
|
|
7
8
|
- Create a new SpyneJS application with a single command.
|
|
8
|
-
- Generate `ViewStream`, `Channel`, and `SpyneTrait` classes
|
|
9
|
+
- Generate `ViewStream`, `DomElement`, `Channel`, and `SpyneTrait` classes via interactive prompts.
|
|
9
10
|
- Easily extend and customize applications.
|
|
10
11
|
- Built-in support for channel-driven development.
|
|
11
12
|
|
|
@@ -29,51 +30,52 @@ To create a new SpyneJS application, run:
|
|
|
29
30
|
npx spyne-cli new <app-name>
|
|
30
31
|
```
|
|
31
32
|
|
|
32
|
-
This will generate
|
|
33
|
+
This will generate a fully structured SpyneJS SPA in the specified `<app-name>` directory.
|
|
33
34
|
|
|
34
|
-
|
|
35
|
+
---
|
|
35
36
|
|
|
36
|
-
|
|
37
|
+
### Generating Components (Interactive CLI)
|
|
37
38
|
|
|
38
|
-
|
|
39
|
+
To generate SpyneJS components, simply run:
|
|
39
40
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
```bash
|
|
42
|
+
npx spyne-cli
|
|
43
|
+
```
|
|
43
44
|
|
|
44
|
-
|
|
45
|
+
You’ll be presented with an interactive menu where you can select the file type:
|
|
45
46
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
- `ViewStream`
|
|
48
|
+
- `DomElement`
|
|
49
|
+
- `Channel`
|
|
50
|
+
- `SpyneTrait`
|
|
49
51
|
|
|
50
|
-
|
|
52
|
+
Use the arrow keys to make a selection, and follow the prompts to name and configure your file.
|
|
51
53
|
|
|
52
|
-
|
|
53
|
-
npx spyne-cli generate spynetrait <trait-name>
|
|
54
|
-
```
|
|
54
|
+
This interface is ideal for developers who want fast, zero-config scaffolding during development.
|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
---
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
### Example Workflow
|
|
59
59
|
|
|
60
60
|
1. Create a new application:
|
|
61
61
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
```bash
|
|
63
|
+
npx spyne-cli new my-spyne-app
|
|
64
|
+
```
|
|
65
65
|
|
|
66
|
-
2. Navigate to and start the application:
|
|
66
|
+
2. Navigate to the project and start the application:
|
|
67
67
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
68
|
+
```bash
|
|
69
|
+
cd my-spyne-app && npm start
|
|
70
|
+
```
|
|
71
71
|
|
|
72
|
-
3.
|
|
72
|
+
3. Run the interactive generator:
|
|
73
73
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
74
|
+
```bash
|
|
75
|
+
npx spyne-cli
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
4. Select the file type (e.g., `ViewStream`), and follow the prompts to generate a new component.
|
|
77
79
|
|
|
78
80
|
## Contributing
|
|
79
81
|
|
package/package.json
CHANGED
package/src/ui.js
CHANGED
|
@@ -5,7 +5,7 @@ export class SpyneCliUI {
|
|
|
5
5
|
|
|
6
6
|
constructor() {}
|
|
7
7
|
static title(){
|
|
8
|
-
const figletTxt = figlet.textSync('spyne-cli 6.
|
|
8
|
+
const figletTxt = figlet.textSync('spyne-cli 6.8', {
|
|
9
9
|
horizontalLayout: 'universal smushing'
|
|
10
10
|
})
|
|
11
11
|
const chalkOutput = chalk.blue(figletTxt);
|