create-juo 0.0.1-alpha.5 → 0.1.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/README.md +29 -0
- package/bin/create-juo.js +37 -0
- package/package.json +20 -11
- package/bin/run.sh +0 -2
package/README.md
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# create-juo
|
|
2
|
+
|
|
3
|
+
Create a new Juo project with a single command.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npx create-juo
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
This is an alias for `juo create`. All flags and options are passed through to the underlying command.
|
|
12
|
+
|
|
13
|
+
### Examples
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
# Interactive mode
|
|
17
|
+
npx create-juo
|
|
18
|
+
|
|
19
|
+
# Quickstart mode
|
|
20
|
+
npx create-juo --quickstart
|
|
21
|
+
|
|
22
|
+
# With verbose output
|
|
23
|
+
npx create-juo --verbose
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## See Also
|
|
27
|
+
|
|
28
|
+
- [juo CLI documentation](../cli/README.md)
|
|
29
|
+
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import {spawn} from 'node:child_process'
|
|
4
|
+
import {fileURLToPath} from 'node:url'
|
|
5
|
+
import {dirname, join} from 'node:path'
|
|
6
|
+
import {existsSync} from 'node:fs'
|
|
7
|
+
|
|
8
|
+
const __filename = fileURLToPath(import.meta.url)
|
|
9
|
+
const __dirname = dirname(__filename)
|
|
10
|
+
|
|
11
|
+
// Get all arguments passed to this script
|
|
12
|
+
const args = process.argv.slice(2)
|
|
13
|
+
|
|
14
|
+
// Try to find juo in local node_modules first (workspace scenario)
|
|
15
|
+
const localJuoPath = join(__dirname, '..', 'node_modules', '.bin', 'juo')
|
|
16
|
+
const useLocal = existsSync(localJuoPath)
|
|
17
|
+
|
|
18
|
+
// Use local juo if available, otherwise use npx
|
|
19
|
+
const command = useLocal ? localJuoPath : 'npx'
|
|
20
|
+
const commandArgs = useLocal
|
|
21
|
+
? ['create', ...args]
|
|
22
|
+
: ['--yes', 'juo', 'create', ...args]
|
|
23
|
+
|
|
24
|
+
const child = spawn(command, commandArgs, {
|
|
25
|
+
stdio: 'inherit',
|
|
26
|
+
shell: false,
|
|
27
|
+
})
|
|
28
|
+
|
|
29
|
+
child.on('error', (error) => {
|
|
30
|
+
console.error('Error running juo create:', error)
|
|
31
|
+
process.exit(1)
|
|
32
|
+
})
|
|
33
|
+
|
|
34
|
+
child.on('exit', (code) => {
|
|
35
|
+
process.exit(code ?? 0)
|
|
36
|
+
})
|
|
37
|
+
|
package/package.json
CHANGED
|
@@ -1,17 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-juo",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Create a new Juo project",
|
|
5
|
+
"author": "Juo (https://juo.io)",
|
|
6
|
+
"license": "MIT",
|
|
4
7
|
"type": "module",
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
"
|
|
9
|
-
|
|
8
|
+
"bin": {
|
|
9
|
+
"create-juo": "./bin/create-juo.js"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"./bin"
|
|
13
|
+
],
|
|
10
14
|
"dependencies": {
|
|
11
|
-
"juo": "0.0
|
|
15
|
+
"juo": "0.2.0"
|
|
16
|
+
},
|
|
17
|
+
"engines": {
|
|
18
|
+
"node": ">=18.0.0"
|
|
12
19
|
},
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
|
|
20
|
+
"homepage": "https://juo.io",
|
|
21
|
+
"keywords": [
|
|
22
|
+
"juo",
|
|
23
|
+
"create",
|
|
24
|
+
"cli"
|
|
25
|
+
]
|
|
17
26
|
}
|
package/bin/run.sh
DELETED