Skip to content

Commit d9541c0

Browse files
committed
use npm create to bootstrap the demo app
closes #10
1 parent e27a58a commit d9541c0

File tree

4 files changed

+13
-4
lines changed

4 files changed

+13
-4
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
node_modules/
2-
demo/
2+
demo-app/
33
.DS_Store

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,16 @@ Report bugs in the [issues list](https://github.com/scriptPilot/add-php-backend/
5353
## Maintainer
5454

5555
1. Apply changes
56-
2. Run `npm run backend` to build the `demo` folder
56+
2. Run `npm run demo` to build and start the `demo-app`
5757
3. Commit changes with an issue (closure) reference
5858
4. Run `npm version patch | minor | major` and push changes
5959
5. Let the workflow manage the release to GitHub and NPM
60+
61+
## Maintainer
62+
63+
1. Apply changes to the code
64+
2. Run `npm run demo` to build and start the `demo-app`
65+
3. Apply changes to the `README.md` file and screenshots
66+
4. Commit changes with an issue (closure) reference
67+
5. Run `npm version patch | minor | major` and push changes
68+
6. Let the workflow manage the release to GitHub and NPM

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"type": "module",
88
"scripts": {
99
"test": "",
10-
"backend": "rm -rf demo && node . && cd demo && npm run backend",
10+
"demo": "rm -rf demo-app && npm create vite demo-app -- --template react && node . && cd demo-app && npm install && npm run dev",
1111
"preversion": "npm install && npm test"
1212
},
1313
"repository": {

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import fs from 'fs-extra'
1010
const scriptFolder = path.dirname(url.fileURLToPath(import.meta.url))
1111
const processFolder = process.cwd()
1212
const isDevMode = processFolder === path.resolve(scriptFolder, '..')
13-
const appFolder = isDevMode ? path.resolve(scriptFolder, '../demo') : processFolder
13+
const appFolder = isDevMode ? path.resolve(scriptFolder, '../demo-app') : processFolder
1414
const templateFolder = path.resolve(scriptFolder, 'templates')
1515

1616
// Define files

0 commit comments

Comments
 (0)