@process.co/element-dev-server 0.0.1-test-4 → 0.0.1
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/.process/index.html +1 -1
- package/README.md +7 -8
- package/bin/proc-dev +21 -0
- package/package.json +4 -3
package/.process/index.html
CHANGED
package/README.md
CHANGED
|
@@ -5,25 +5,24 @@ A CLI tool for developing Process.co elements with an interactive development se
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
|
|
9
|
+
npm i @process.co/element-dev-server -g
|
|
10
|
+
|
|
10
11
|
```
|
|
11
12
|
|
|
12
13
|
## Usage
|
|
13
14
|
|
|
14
15
|
The CLI accepts an optional path argument to specify which directory to scan for Process.co element modules:
|
|
15
16
|
|
|
17
|
+
or you can run from within your element's directory or one directory above run the following command
|
|
18
|
+
|
|
16
19
|
```bash
|
|
17
|
-
# Use current directory
|
|
18
|
-
process-element
|
|
19
20
|
|
|
20
|
-
|
|
21
|
-
process-element /path/to/your/elements
|
|
21
|
+
proc-dev
|
|
22
22
|
|
|
23
|
-
# Use relative path
|
|
24
|
-
process-element ../my-elements
|
|
25
23
|
```
|
|
26
24
|
|
|
25
|
+
|
|
27
26
|
## Features
|
|
28
27
|
|
|
29
28
|
- **Interactive UI**: Uses Ink to provide a beautiful terminal interface
|
package/bin/proc-dev
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { spawn } from 'node:child_process'
|
|
4
|
+
import { fileURLToPath } from 'node:url'
|
|
5
|
+
import { dirname, resolve } from 'node:path'
|
|
6
|
+
|
|
7
|
+
const __filename = fileURLToPath(import.meta.url)
|
|
8
|
+
const __dirname = dirname(__filename)
|
|
9
|
+
|
|
10
|
+
const tsxBin = resolve(__dirname, '../node_modules/.bin/tsx')
|
|
11
|
+
const cliEntry = resolve(__dirname, '../src/cli.tsx')
|
|
12
|
+
|
|
13
|
+
// Strip: ["node", "bin/proc-dev", ...args]
|
|
14
|
+
const args = process.argv.slice(2)
|
|
15
|
+
|
|
16
|
+
const child = spawn(tsxBin, [cliEntry, ...args], {
|
|
17
|
+
stdio: 'inherit',
|
|
18
|
+
env: process.env,
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
child.on('exit', (code) => process.exit(code ?? 1))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@process.co/element-dev-server",
|
|
3
|
-
"version": "0.0.1
|
|
3
|
+
"version": "0.0.1",
|
|
4
4
|
"description": "Helper Library for developing elements for Process.co",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -9,12 +9,13 @@
|
|
|
9
9
|
".": "./dist/index.js"
|
|
10
10
|
},
|
|
11
11
|
"bin": {
|
|
12
|
-
"proc-dev": "
|
|
12
|
+
"proc-dev": "./bin/proc-dev"
|
|
13
13
|
},
|
|
14
14
|
"files": [
|
|
15
15
|
"dist/*",
|
|
16
16
|
"src/*",
|
|
17
|
-
".process/*"
|
|
17
|
+
".process/*",
|
|
18
|
+
"bin/*"
|
|
18
19
|
],
|
|
19
20
|
"publishConfig": {
|
|
20
21
|
"access": "public",
|