cbs-block 1.0.7 → 1.0.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 (2) hide show
  1. package/README.md +55 -26
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,55 +1,84 @@
1
- # cbs-block SDK 🚀
1
+ # 🚀 CodeBlock Studio SDK (CLI)
2
2
 
3
- The official toolkit for building **CodeBlock Studio** extensions. Create, package, and share powerful visual blocks with ease.
3
+ The professional toolkit for building, testing, and sharing **CodeBlock Studio** extensions.
4
+
5
+ Built for performance. Designed for developers.
6
+
7
+ ---
4
8
 
5
9
  ## ðŸ“Ķ Installation
6
10
 
7
- Install the CLI globally to use the `cbs-block` command anywhere:
11
+ Install globally to use the `cbs-block` command anywhere:
8
12
 
9
13
  ```bash
10
14
  npm install cbs-block -g
11
15
  ```
12
16
 
17
+ ## 🛠ïļ Feature Highlights
18
+
19
+ * **Code-First Workflow**: Build complex blocks with full folder structures, supporting `index.js/ts`, `package.json`, and local `node_modules`.
20
+ * **Integrated Unit Testing**: Run logic tests instantly with `cbs-block test`.
21
+ * **Micro-Benchmarking**: Performance-test your logic with `cbs-block bench` (100k iteration analysis).
22
+ * **Integrated Tutorials**: Every new project includes a beautiful, CSS-rich `tutorial.html`. View it via `cbs-block tutorial`.
23
+ * **VSIX-Style Packaging**: Bundle your workspace into a professional `.cbsext` extension with one command.
24
+
25
+ ---
26
+
13
27
  ## 🚀 Quick Start
14
28
 
15
29
  ### 1. Initialize a Project
16
30
  Create a new workspace for your block library:
17
31
  ```bash
18
- cbs-block init MyAwesomeBlocks
19
- cd MyAwesomeBlocks
32
+ cbs-block init MyAwesomePack
33
+ cd MyAwesomePack
20
34
  ```
21
35
 
22
- ### 2. Create your First Block
23
- Generate a template for a new block. Choose a category like `Math`, `Logic`, or `Control`:
36
+ ### 2. Create a Block
37
+ Generate a professional directory-based block:
24
38
  ```bash
25
- cbs-block create SimpleAdd Math
39
+ cbs-block create MyBlock
26
40
  ```
27
41
 
28
- ### 3. Build & Package
29
- When you're ready to share, bundle your blocks into a `.cbspak` file:
42
+ ### 3. Develop & Test
43
+ Open `index.js`, write your logic, and test it:
30
44
  ```bash
31
45
  cbs-block build
46
+ cbs-block test myblock.cbsblock
32
47
  ```
33
48
 
49
+ ### 4. Pack & Share
50
+ Bundle your workspace into a professional extension:
51
+ ```bash
52
+ cbs-block pack
53
+ ```
54
+
55
+ ---
56
+
34
57
  ## 🛠ïļ Command Reference
35
58
 
36
59
  | Command | Description |
37
60
  | --- | --- |
38
- | `init <Name>` | Creates a new block development workspace. |
39
- | `create <Name> [Category]` | Generates a new `.cbsblock` template. |
40
- | `list` | Lists all blocks in the current directory. |
41
- | `lint` | Validates your blocks against the Studio schema. |
42
- | `build` | Packages your project into a `.cbspak` for the marketplace. |
43
- | `serve` | Starts a local hot-reload server for real-time testing. |
44
- | `publish` | Deploys your package to the CBS Marketplace. |
45
-
46
- ## ðŸ§Đ What is a .cbsblock?
47
- A block is a JSON file that defines its visuals and its logic.
48
- - **Visuals**: Ports (Input/Output/Flow) and interactive fields.
49
- - **Logic**: A sandboxed JavaScript function that executes within the Studio.
50
-
51
- ## 🔒 The CBS Ecosystem
52
- Note: `.cbspak` and `.cbsblock` files are proprietary formats optimized for **CodeBlock Studio**. They cannot be opened in standard text editors or other IDEs without the CBS engine.
61
+ | `init [name]` | Initialize a new block project workspace. |
62
+ | `create [name]` | Scaffold a new block (supports Directory or Single-File mode). |
63
+ | `build [dir]` | Compile a directory block into a production `.cbsblock`. |
64
+ | `pack` | Bundle your workspace into a professional `.cbsext` extension. |
65
+ | `test <file>` | Run logic unit tests with mock data. |
66
+ | `bench <file>` | Benchmark block logic performance (iterations & Ξs). |
67
+ | `tutorial` | Open the integrated developer guide in your browser. |
68
+ | `link` | Link local blocks to your CodeBlock Studio installation. |
69
+ | `publish` | Deploys your package to the global CBS Marketplace. |
70
+ | `site` | Generate a themed documentation website for your project. |
71
+ | `doc <file>` | Generate a markdown README for a specific block. |
72
+ | `lint` | Validate block definitions for schema compliance. |
73
+ | `status` | Check SDK version and environment health. |
74
+
75
+ ---
76
+
77
+ ## ðŸ§Đ The .cbsext Format
78
+ Professional extensions are packaged as ZIP-based `.cbsext` files. This allows for:
79
+ - **Rich Assets**: Bundle icons, helper scripts, and HTML tutorials into one file.
80
+ - **Enterprise Metadata**: Verified publisher IDs and display names.
81
+ - **Dependency Isolation**: Fully bundled logic with optimized execution.
53
82
 
54
83
  ---
55
- **Build the future of visual coding with CodeBlock Studio.**
84
+ **Build the future of visual coding with [CodeBlock Studio](https://codeblockstudio.web.app).**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cbs-block",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "SDK for creating CodeBlock Studio blocks",
5
5
  "main": "index.js",
6
6
  "bin": {