Skip to content

Commit 1d03a69

Browse files
chore: improve dependencies installation and run app in debugger by default
1 parent 0d8dcd1 commit 1d03a69

File tree

4 files changed

+30
-6
lines changed

4 files changed

+30
-6
lines changed

packages/create-frames/README.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# Create Frames.js app
2+
3+
Create a new Frames.js app with a single command using predefined templates.
4+
15
## Using npm
26

37
```

packages/create-frames/create.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ export async function create(params) {
104104
});
105105

106106
if (wantsToInstallDependencies) {
107+
log.message(`Installing the dependencies...`);
107108
const result = spawnSync(pkgManager, ["install"], {
108109
cwd: destDir,
109110
stdio: "ignore",
@@ -124,10 +125,10 @@ export async function create(params) {
124125
`1. Go to the project directory by running: ${pc.blue(`cd ./${projectName}`)}`
125126
);
126127
log.step(
127-
`2. Start the development server by running: ${pc.blue(await packageManagerRunCommand("dev"))}`
128+
`2. Start the development server and run the app in debugger by running: ${pc.blue(await packageManagerRunCommand("dev"))}`
128129
);
129130
log.step(
130-
`3. Open your browser and go to ${pc.blue(`http://localhost:3000`)} to see your app running`
131+
`3. Open your browser and go to ${pc.blue(`http://localhost:3010`)} to see your app running in the debugger`
131132
);
132133

133134
outro("Done! Your project has been set up! 🎉");

templates/next/README.md

+20-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,25 @@
1+
# Frames.js Next example
2+
3+
Simple Frames.js app using Next.js.
4+
5+
### Installation
6+
7+
```sh
8+
$ npm install
19
```
2-
npm install
10+
11+
### Run without debugger
12+
13+
Following command will start Next.js app in dev mode.
14+
15+
```sh
316
npm run dev
417
```
518

6-
Head to http://localhost:3000/api
19+
### Run in Debugger
720

8-
Open in debugger by running `npx @frames.js/debugger@latest -u http://localhost:3000/api` in another terminal.
21+
Following command will open frames debugger and also run the app in development mode.
22+
23+
```sh
24+
$ npm run dev:debug
25+
```

templates/next/package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@
1212
"@types/node": "^18.17.0",
1313
"@types/react": "^18.2.0",
1414
"@types/react-dom": "^18.2.0",
15+
"@frames.js/debugger": "^0.1.5",
16+
"concurrently": "^8.2.2",
1517
"typescript": "^5.3.3"
1618
},
1719
"scripts": {
18-
"dev": "next dev",
20+
"dev": "concurrently \"next dev\" \"frames --url http://localhost:3000\"",
1921
"start": "next start",
2022
"build": "next build",
2123
"lint": "next lint"

0 commit comments

Comments
 (0)