Skip to content

Commit

Permalink
rework dev command
Browse files Browse the repository at this point in the history
  • Loading branch information
Zehir committed Dec 2, 2024
1 parent b447605 commit 37feb8f
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "pnpm install && echo alias ll=\\'ls -al\\' >> /home/node/.bashrc",
"postCreateCommand": "pnpm install && echo alias ll=\\'ls -al\\' >> /home/node/.bashrc && npm install --location=global .",

// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "node",
Expand Down
17 changes: 17 additions & 0 deletions dev.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env node

const concurrently = require('concurrently')

concurrently([
{
command: 'npx grunt watch',
name: 'grunt',
prefixColor: '#f39c12',
},
{
command: 'node-red',
name: 'node-red',
prefixColor: '#3498db',
dependsOn: ['grunt'],
},
])
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
],
"scripts": {
"build": "grunt build",
"dev": "grunt watch",
"dev": "pnpm run build && node ./dev.cjs",
"test": "mocha",
"release": "pnpm run test && pnpm run build && changeset publish"
},
Expand All @@ -61,6 +61,7 @@
},
"devDependencies": {
"@changesets/cli": "^2.27.6",
"concurrently": "^9.1.0",
"grunt": "^1.6.1",
"grunt-contrib-uglify": "^5.2.2",
"grunt-contrib-watch": "^1.1.0",
Expand Down
42 changes: 42 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 37feb8f

Please sign in to comment.