create-peachy 0.0.10 → 0.0.12
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/dist/index.mjs +5 -8
- package/package.json +11 -11
- package/template/package.json +3 -3
- package/template/src/counter.tsx +2 -1
- package/template/src/index.tsx +3 -5
- package/template/tsconfig.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { mkdir, readFile, readdir, stat, writeFile } from "node:fs/promises";
|
|
3
|
-
import { intro, log, outro, spinner, text } from "@clack/prompts";
|
|
4
3
|
import { dirname, resolve } from "node:path";
|
|
4
|
+
import { intro, log, outro, spinner, text } from "@clack/prompts";
|
|
5
5
|
import h from "handlebars";
|
|
6
|
-
|
|
7
6
|
//#region package.json
|
|
8
|
-
var version = "0.0.
|
|
9
|
-
|
|
7
|
+
var version = "0.0.12";
|
|
10
8
|
//#endregion
|
|
11
9
|
//#region src/index.ts
|
|
12
10
|
const TEMPLATE_DIR = resolve(import.meta.dirname, "..", "template");
|
|
@@ -15,7 +13,7 @@ const name = await text({
|
|
|
15
13
|
message: "What is the name of your project?",
|
|
16
14
|
placeholder: "peachy-app",
|
|
17
15
|
validate: (value) => {
|
|
18
|
-
if (!value
|
|
16
|
+
if (!value?.match(/^@?[a-z0-9-/]+$/)) return "project name must be lowercase and contain only letters, numbers, and dashes";
|
|
19
17
|
}
|
|
20
18
|
});
|
|
21
19
|
const safeName = name.replace(/^@/, "").replaceAll(/\//g, "-");
|
|
@@ -35,13 +33,12 @@ for (const file of files) {
|
|
|
35
33
|
safeName,
|
|
36
34
|
peachyVersion,
|
|
37
35
|
reactVersion: "^19.2.4",
|
|
38
|
-
reactTypesVersion: "^19.2.
|
|
36
|
+
reactTypesVersion: "^19.2.14"
|
|
39
37
|
}));
|
|
40
38
|
}
|
|
41
39
|
s.stop("Copied files");
|
|
42
40
|
log.success(`Initialized peachy project at: ${OUTDIR}`);
|
|
43
41
|
log.info(`Remember to \`npm install\` and \`npm run dev\` to get started.`);
|
|
44
42
|
outro(`Done!`);
|
|
45
|
-
|
|
46
43
|
//#endregion
|
|
47
|
-
export {
|
|
44
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-peachy",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"type": "module",
|
|
3
|
+
"version": "0.0.12",
|
|
5
4
|
"description": "Bootstrap a peachy application",
|
|
6
|
-
"bin": "./dist/index.mjs",
|
|
7
|
-
"author": "",
|
|
8
5
|
"license": "MIT",
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
"handlebars": "^4.7.8"
|
|
12
|
-
},
|
|
6
|
+
"author": "",
|
|
7
|
+
"bin": "./dist/index.mjs",
|
|
13
8
|
"files": [
|
|
14
9
|
"dist",
|
|
15
10
|
"template",
|
|
16
11
|
"template/.gitignore"
|
|
17
12
|
],
|
|
13
|
+
"type": "module",
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"@clack/prompts": "^1.1.0",
|
|
16
|
+
"handlebars": "^4.7.8"
|
|
17
|
+
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@types/node": "^25.
|
|
20
|
-
"rolldown": "1.0.0-rc.
|
|
21
|
-
"tsdown": "0.
|
|
19
|
+
"@types/node": "^25.3.5",
|
|
20
|
+
"rolldown": "1.0.0-rc.7",
|
|
21
|
+
"tsdown": "0.21.0",
|
|
22
22
|
"tsx": "^4.21.0",
|
|
23
23
|
"typescript": "^5.9.3"
|
|
24
24
|
},
|
package/template/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "{{name}}",
|
|
3
|
-
"private": true,
|
|
4
3
|
"version": "1.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"keywords": [],
|
|
6
|
+
"license": "MIT",
|
|
5
7
|
"scripts": {
|
|
6
8
|
"dev": "peachy dev",
|
|
7
9
|
"build": "peachy build"
|
|
8
10
|
},
|
|
9
|
-
"keywords": [],
|
|
10
|
-
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@peachy/core": "~{{peachyVersion}}",
|
|
13
13
|
"@peachy/react": "~{{peachyVersion}}",
|
package/template/src/counter.tsx
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import Adw from "gi://Adw?version=1";
|
|
1
2
|
import Gtk from "gi://Gtk?version=4.0";
|
|
2
3
|
|
|
3
4
|
import { useState } from "react";
|
|
@@ -7,7 +8,7 @@ export function Counter() {
|
|
|
7
8
|
|
|
8
9
|
return (
|
|
9
10
|
<Adw.ToolbarView>
|
|
10
|
-
<Adw.HeaderBar
|
|
11
|
+
<Adw.HeaderBar $type="top" />
|
|
11
12
|
<Gtk.Box>
|
|
12
13
|
<Gtk.Button onClicked={() => setCount(count - 1)}>-</Gtk.Button>
|
|
13
14
|
<Gtk.Label hexpand label={count.toString()} />
|
package/template/src/index.tsx
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import Gio from "gi://Gio?version=2.0";
|
|
2
1
|
import Adw from "gi://Adw?version=1";
|
|
2
|
+
import Gio from "gi://Gio?version=2.0";
|
|
3
3
|
|
|
4
4
|
import { render } from "@peachy/react";
|
|
5
|
+
|
|
5
6
|
import { Counter } from "./counter";
|
|
6
7
|
|
|
7
|
-
const app = Adw.Application.new(
|
|
8
|
-
"dev.peachy.{{safeName}}",
|
|
9
|
-
Gio.ApplicationFlags.DEFAULT_FLAGS,
|
|
10
|
-
);
|
|
8
|
+
const app = Adw.Application.new("dev.peachy.{{safeName}}", Gio.ApplicationFlags.DEFAULT_FLAGS);
|
|
11
9
|
|
|
12
10
|
app.connect("activate", () => {
|
|
13
11
|
const app_window = new Adw.ApplicationWindow({
|
package/template/tsconfig.json
CHANGED