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.
Files changed (3) hide show
  1. package/README.md +32 -30
  2. package/package.json +1 -1
  3. 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 based on user prompts.
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 the necessary project files in the specified `<app-name>` directory.
33
+ This will generate a fully structured SpyneJS SPA in the specified `<app-name>` directory.
33
34
 
34
- ### Generating Components
35
+ ---
35
36
 
36
- You can use `spyne-cli` to generate new `ViewStream`, `Channel`, and `SpyneTrait` components:
37
+ ### Generating Components (Interactive CLI)
37
38
 
38
- - **ViewStream**: To generate a new `ViewStream`, use:
39
+ To generate SpyneJS components, simply run:
39
40
 
40
- ```bash
41
- npx spyne-cli generate viewstream <view-name>
42
- ```
41
+ ```bash
42
+ npx spyne-cli
43
+ ```
43
44
 
44
- - **Channel**: To generate a new `Channel`, use:
45
+ You’ll be presented with an interactive menu where you can select the file type:
45
46
 
46
- ```bash
47
- npx spyne-cli generate channel <channel-name>
48
- ```
47
+ - `ViewStream`
48
+ - `DomElement`
49
+ - `Channel`
50
+ - `SpyneTrait`
49
51
 
50
- - **SpyneTrait**: To generate a new `SpyneTrait`, use:
52
+ Use the arrow keys to make a selection, and follow the prompts to name and configure your file.
51
53
 
52
- ```bash
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
- ### Example
56
+ ---
57
57
 
58
- To create a new application and add a `ViewStream` component:
58
+ ### Example Workflow
59
59
 
60
60
  1. Create a new application:
61
61
 
62
- ```bash
63
- npx spyne-cli new my-spyne-app
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
- ```bash
69
- cd my-spyne-app && npm start
70
- ```
68
+ ```bash
69
+ cd my-spyne-app && npm start
70
+ ```
71
71
 
72
- 3. Generate a `ViewStream` component:
72
+ 3. Run the interactive generator:
73
73
 
74
- ```bash
75
- npx spyne-cli generate viewstream MyView
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
@@ -4,7 +4,7 @@
4
4
  "spyne-cli": "index.js"
5
5
  },
6
6
  "type": "module",
7
- "version": "0.6.7",
7
+ "version": "0.6.8",
8
8
  "description": "Generates spyne objects and saves them to standard spyne.",
9
9
  "main": "index.js",
10
10
  "scripts": {
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.7', {
8
+ const figletTxt = figlet.textSync('spyne-cli 6.8', {
9
9
  horizontalLayout: 'universal smushing'
10
10
  })
11
11
  const chalkOutput = chalk.blue(figletTxt);