Skip to content

Commit

Permalink
Simplify common dev commands (#31)
Browse files Browse the repository at this point in the history
* `npm run create` to create the test app
 * `npm start` to start the test app
 * `npm run build:config` automatically runs `npm run build` beforehand
  • Loading branch information
flakey5 authored May 3, 2024
1 parent 73e5136 commit 34df76a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Steps for downloading and setting up AI Warp for local development.
6. Generate the test app.

```bash
node ./dist/cli/create.js
npm run create
```

7. Configure the test app's `platformatic.json` to your liking. By default, it
Expand All @@ -41,7 +41,7 @@ Steps for downloading and setting up AI Warp for local development.
8. Start the test app.
```bash
node ./dist/cli/start.js -c <path to test app platformatic.json>
npm start
```
## Important Notes
Expand All @@ -52,7 +52,7 @@ app. This includes schema changes.
## Noteable Commands
* `npm run build` - Build the app.
* `npm run build:config` - Rebuild the config. **Make sure to build first.**
* `npm run build:config` - Rebuild the config.
* `npm run lint:fix` - Fix all formatting issues and console log any linting
issues that need to be fixed in code.
* `npm run test` - Run Unit, E2E, and Type tests.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ To get started using AI Warp, all you need to do is three steps:
```bash
npm install
npm run build
node ./dist/cli/create.js
npm run create
```

2. Configure the app's Platformatic config file. By default, this is located
Expand All @@ -21,7 +21,7 @@ To get started using AI Warp, all you need to do is three steps:
3. Start the app!
```bash
node ./dist/cli/start.js
npm start
```
For more information, see [CONTRIBUTING.md](./CONTRIBUTING.md) and [Documentation](#documentation).
Expand Down
2 changes: 1 addition & 1 deletion docs/add-ai-provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Documentation on how to support a new AI provider.

### 1. Setup your developer environment

See [Dev Setup](./dev-setup.md).
See [CONTRIBUTING](../CONTRIBUTING.md).

### 2. Add it to the Config Schema

Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@
"start-ai-warp": "./dist/cli/start.js"
},
"scripts": {
"create": "node ./dist/cli/create.js",
"start": "node ./dist/cli/start.js -c ./ai-warp-app/platformatic.json",
"build": "tsc --build && cp -r ./static ./dist/",
"build:config": "node ./dist/lib/schema.js --dump-schema | json2ts > config.d.ts",
"build:config": "npm run build && node ./dist/lib/schema.js --dump-schema | json2ts > config.d.ts",
"clean": "rm -fr ./dist",
"lint": "ts-standard | snazzy",
"lint:fix": "ts-standard --fix | snazzy",
Expand Down

0 comments on commit 34df76a

Please sign in to comment.