@hfossli/dev 0.1.0 → 0.1.1
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 +34 -0
- package/package.json +3 -3
package/README.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# `@hfossli/dev`
|
|
2
|
+
|
|
3
|
+
CLI for starting apps, managing tmux sessions, tailing logs, and running repo tools from a `dev.config.js` or `dev.config.ts` file.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
pnpm add -D @hfossli/dev @hfossli/dev-sdk @hfossli/dev-helpers
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
Create `dev.config.js`:
|
|
14
|
+
|
|
15
|
+
```js
|
|
16
|
+
const { defineConfig } = require("@hfossli/dev-sdk");
|
|
17
|
+
const { leasePort } = require("@hfossli/dev-helpers");
|
|
18
|
+
|
|
19
|
+
module.exports = defineConfig(({ root, session }) => ({
|
|
20
|
+
apps: {
|
|
21
|
+
web: {
|
|
22
|
+
start: () => `pnpm run dev --port "${leasePort({ name: "web", basePort: 3000, cwd: root, session })}"`,
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
}));
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Start an app:
|
|
29
|
+
|
|
30
|
+
```sh
|
|
31
|
+
npx dev start web
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
See the repo README for examples and helper utilities.
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hfossli/dev",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"@hfossli/dev-helpers": "0.1.
|
|
6
|
-
"@hfossli/dev-sdk": "0.1.
|
|
5
|
+
"@hfossli/dev-helpers": "0.1.1",
|
|
6
|
+
"@hfossli/dev-sdk": "0.1.1"
|
|
7
7
|
},
|
|
8
8
|
"bin": {
|
|
9
9
|
"dev": "bin/_dev.js",
|