Skip to content

Commit 37feb8f

Browse files
committed
rework dev command
1 parent b447605 commit 37feb8f

File tree

4 files changed

+62
-2
lines changed

4 files changed

+62
-2
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
// Use 'forwardPorts' to make a list of ports inside the container available locally.
3636
// "forwardPorts": [],
3737
// Use 'postCreateCommand' to run commands after the container is created.
38-
"postCreateCommand": "pnpm install && echo alias ll=\\'ls -al\\' >> /home/node/.bashrc",
38+
"postCreateCommand": "pnpm install && echo alias ll=\\'ls -al\\' >> /home/node/.bashrc && npm install --location=global .",
3939

4040
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
4141
"remoteUser": "node",

dev.cjs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env node
2+
3+
const concurrently = require('concurrently')
4+
5+
concurrently([
6+
{
7+
command: 'npx grunt watch',
8+
name: 'grunt',
9+
prefixColor: '#f39c12',
10+
},
11+
{
12+
command: 'node-red',
13+
name: 'node-red',
14+
prefixColor: '#3498db',
15+
dependsOn: ['grunt'],
16+
},
17+
])

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
],
4646
"scripts": {
4747
"build": "grunt build",
48-
"dev": "grunt watch",
48+
"dev": "pnpm run build && node ./dev.cjs",
4949
"test": "mocha",
5050
"release": "pnpm run test && pnpm run build && changeset publish"
5151
},
@@ -61,6 +61,7 @@
6161
},
6262
"devDependencies": {
6363
"@changesets/cli": "^2.27.6",
64+
"concurrently": "^9.1.0",
6465
"grunt": "^1.6.1",
6566
"grunt-contrib-uglify": "^5.2.2",
6667
"grunt-contrib-watch": "^1.1.0",

pnpm-lock.yaml

Lines changed: 42 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)