mirror of
https://github.com/aljazceru/pear-docs.git
synced 2025-12-17 22:44:21 +01:00
Add Making A Terminal App guide
This commit is contained in:
@@ -4,17 +4,32 @@
|
||||
|
||||
## Step 1. Init
|
||||
|
||||
First create a new project using `pear init`.
|
||||
First create a new project using `pear init --type terminal`.
|
||||
|
||||
```
|
||||
mkdir chat-bot
|
||||
cd chat-bot
|
||||
pear init --yes
|
||||
mkdir chat-app
|
||||
cd chat-app
|
||||
pear init --yes --type terminal
|
||||
```
|
||||
|
||||
This creates the base project structure.
|
||||
|
||||
- `package.json`. App configuration. Notice the `pear` property.
|
||||
- `index.js`. App entrypoint.
|
||||
- `app.js`. Main code.
|
||||
- `test/index.test.js`. Test skeleton.
|
||||
|
||||
## Step 2. Verify Everything Works
|
||||
|
||||
Use `pear dev` to see that it works.
|
||||
|
||||
```
|
||||
pear dev
|
||||
```
|
||||
|
||||
The app will now run. Note that it will keep running until you exit with `ctrl + c`.
|
||||
|
||||
That's all there is to it!
|
||||
|
||||
|
||||
## Next
|
||||
|
||||
* [Making a Pear Terminal Application](./making-a-pear-terminal-app.md)
|
||||
|
||||
Reference in New Issue
Block a user