use-chisel 0.1.1 → 0.1.2
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 +3 -0
- package/bin/chisel.js +10 -0
- package/package.json +5 -1
package/README.md
CHANGED
|
@@ -44,6 +44,9 @@ Supports Next.js 14 through 16 with React 18 or 19, including both App Router an
|
|
|
44
44
|
npm install use-chisel
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
+
Run `npx chisel` to open the hosted Chisel sign-in page. Connecting your project
|
|
48
|
+
to the hosted workspace is not available yet.
|
|
49
|
+
|
|
47
50
|
## Use
|
|
48
51
|
|
|
49
52
|
Mount `Chisel` in your app layout:
|
package/bin/chisel.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { spawn } from "node:child_process";
|
|
3
|
+
|
|
4
|
+
const url = "https://chisel-review.vercel.app/chisel/start";
|
|
5
|
+
console.log(`Open ${url} to sign in to Chisel.`);
|
|
6
|
+
const command = process.platform === "darwin" ? "open" : process.platform === "win32" ? "rundll32" : "xdg-open";
|
|
7
|
+
const args = process.platform === "win32" ? ["url.dll,FileProtocolHandler", url] : [url];
|
|
8
|
+
const browser = spawn(command, args, { detached: true, stdio: "ignore" });
|
|
9
|
+
browser.on("error", () => console.error("Could not open a browser. Open the link above instead."));
|
|
10
|
+
browser.unref();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "use-chisel",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Dev-only visual editing layer for Next.js apps.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -21,6 +21,9 @@
|
|
|
21
21
|
},
|
|
22
22
|
"main": "./dist/index.js",
|
|
23
23
|
"types": "./dist/index.d.ts",
|
|
24
|
+
"bin": {
|
|
25
|
+
"chisel": "./bin/chisel.js"
|
|
26
|
+
},
|
|
24
27
|
"exports": {
|
|
25
28
|
"./workspace": {
|
|
26
29
|
"types": "./dist/workspace-entry.d.ts",
|
|
@@ -32,6 +35,7 @@
|
|
|
32
35
|
}
|
|
33
36
|
},
|
|
34
37
|
"files": [
|
|
38
|
+
"bin/chisel.js",
|
|
35
39
|
"dist/index.js",
|
|
36
40
|
"dist/workspace-entry.js",
|
|
37
41
|
"dist/**/*.d.ts",
|