pagezero 0.5.0 → 0.6.0
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/bin/pagezero.ts +2 -10
- package/package.json +3 -5
- package/src/commands/init.ts +4 -10
- package/src/commands/upgrade.ts +4 -10
package/bin/pagezero.ts
CHANGED
|
@@ -8,16 +8,8 @@ program
|
|
|
8
8
|
.description("PageZERO CLI")
|
|
9
9
|
.option("-h, --help", "output usage information")
|
|
10
10
|
|
|
11
|
-
program
|
|
12
|
-
.command("init")
|
|
13
|
-
.description("initialize a new project")
|
|
14
|
-
.option("-p, --powerup", "use PowerUP edition")
|
|
15
|
-
.action(init)
|
|
11
|
+
program.command("init").description("initialize a new project").action(init)
|
|
16
12
|
|
|
17
|
-
program
|
|
18
|
-
.command("upgrade")
|
|
19
|
-
.description("upgrade pagezero stack")
|
|
20
|
-
.option("-p, --powerup", "use PowerUP edition")
|
|
21
|
-
.action(upgrade)
|
|
13
|
+
program.command("upgrade").description("upgrade pagezero stack").action(upgrade)
|
|
22
14
|
|
|
23
15
|
program.parse()
|
package/package.json
CHANGED
|
@@ -35,10 +35,8 @@
|
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@biomejs/biome": "2.3.3",
|
|
38
|
-
"@types/bun": "1.3.1"
|
|
39
|
-
|
|
40
|
-
"peerDependencies": {
|
|
41
|
-
"typescript": "^5.9.3"
|
|
38
|
+
"@types/bun": "1.3.1",
|
|
39
|
+
"typescript": "5.9.3"
|
|
42
40
|
},
|
|
43
41
|
"dependencies": {
|
|
44
42
|
"@inquirer/prompts": "7.9.0",
|
|
@@ -48,5 +46,5 @@
|
|
|
48
46
|
"log-symbols": "7.0.1",
|
|
49
47
|
"ora": "9.0.0"
|
|
50
48
|
},
|
|
51
|
-
"version": "0.
|
|
49
|
+
"version": "0.6.0"
|
|
52
50
|
}
|
package/src/commands/init.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { $, file, write } from "bun"
|
|
|
3
3
|
import chalk from "chalk"
|
|
4
4
|
import { spinner } from "../utils"
|
|
5
5
|
|
|
6
|
-
export async function init(
|
|
6
|
+
export async function init() {
|
|
7
7
|
// Welcome
|
|
8
8
|
console.log(chalk.green("👋 Welcome to PageZERO CLI"))
|
|
9
9
|
console.log(chalk.green("🚀 Let's get you started with your project!"))
|
|
@@ -12,15 +12,9 @@ export async function init({ powerup }: { powerup?: boolean }) {
|
|
|
12
12
|
const projectName = await input({
|
|
13
13
|
message: "What is the name of your project?",
|
|
14
14
|
})
|
|
15
|
-
|
|
16
|
-
await
|
|
17
|
-
|
|
18
|
-
})
|
|
19
|
-
} else {
|
|
20
|
-
await spinner("downloading pagezero", async () => {
|
|
21
|
-
await $`git clone --depth 1 https://github.com/pagezero-dev/pagezero.git ${projectName}`.quiet()
|
|
22
|
-
})
|
|
23
|
-
}
|
|
15
|
+
await spinner("downloading pagezero", async () => {
|
|
16
|
+
await $`git clone --depth 1 https://github.com/pagezero-dev/pagezero.git ${projectName}`.quiet()
|
|
17
|
+
})
|
|
24
18
|
|
|
25
19
|
// Install dependencies
|
|
26
20
|
await spinner(`running: bun install`, () =>
|
package/src/commands/upgrade.ts
CHANGED
|
@@ -5,7 +5,7 @@ import chalk from "chalk"
|
|
|
5
5
|
import logSymbols from "log-symbols"
|
|
6
6
|
import { spinner } from "../utils"
|
|
7
7
|
|
|
8
|
-
export async function upgrade(
|
|
8
|
+
export async function upgrade() {
|
|
9
9
|
console.log(
|
|
10
10
|
chalk.yellow(
|
|
11
11
|
boxen(
|
|
@@ -43,15 +43,9 @@ export async function upgrade({ powerup }: { powerup?: boolean }) {
|
|
|
43
43
|
return
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
)
|
|
50
|
-
} else {
|
|
51
|
-
await spinner(`downloading latest PageZERO stack`, () =>
|
|
52
|
-
$`git clone --depth 1 https://github.com/pagezero-dev/pagezero.git pagezero-latest`.quiet(),
|
|
53
|
-
)
|
|
54
|
-
}
|
|
46
|
+
await spinner(`downloading latest PageZERO stack`, () =>
|
|
47
|
+
$`git clone --depth 1 https://github.com/pagezero-dev/pagezero.git pagezero-latest`.quiet(),
|
|
48
|
+
)
|
|
55
49
|
|
|
56
50
|
await spinner(`copying PageZERO stack to project directory`, () =>
|
|
57
51
|
$`rsync -a --exclude=".git" ./pagezero-latest/ ./`.quiet(),
|