diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 3ed9fe9..42712dd 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -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", diff --git a/dev.cjs b/dev.cjs new file mode 100644 index 0000000..35bc6da --- /dev/null +++ b/dev.cjs @@ -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'], + }, +]) diff --git a/package.json b/package.json index fddd855..cbd1f60 100755 --- a/package.json +++ b/package.json @@ -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" }, @@ -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", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0f8381b..66d7f12 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -33,6 +33,9 @@ importers: '@changesets/cli': specifier: ^2.27.6 version: 2.27.6 + concurrently: + specifier: ^9.1.0 + version: 9.1.0 grunt: specifier: ^1.6.1 version: 1.6.1 @@ -520,6 +523,11 @@ packages: concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + concurrently@9.1.0: + resolution: {integrity: sha512-VxkzwMAn4LP7WyMnJNbHN5mKV9L2IbyDjpzemKr99sXNR3GqRNMMHdm7prV1ws9wg7ETj6WUkNOigZVsptwbgg==} + engines: {node: '>=18'} + hasBin: true + continuable-cache@0.3.1: resolution: {integrity: sha512-TF30kpKhTH8AGCG3dut0rdd/19B7Z+qCnrMoBLpyQu/2drZdNrrpcjPEoJeSVsQM+8KmWG5O56oPDjSSUsuTyA==} @@ -1529,6 +1537,9 @@ packages: run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} + rxjs@7.8.1: + resolution: {integrity: sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==} + safe-buffer@5.2.1: resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} @@ -1577,6 +1588,10 @@ packages: resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} engines: {node: '>=8'} + shell-quote@1.8.2: + resolution: {integrity: sha512-AzqKpGKjrj7EM6rKVQEPpB288oCfnrEIuyoT9cyF4nmGa7V8Zk6f7RRqYisX8X9m+Q7bd632aZW4ky7EhbQztA==} + engines: {node: '>= 0.4'} + should-equal@2.0.0: resolution: {integrity: sha512-ZP36TMrK9euEuWQYBig9W55WPC7uo37qzAEmbjHz4gfyuXrEUgF8cUvQVO+w+d3OMfPvSRQJ22lSm8MQJ43LTA==} @@ -1698,6 +1713,13 @@ packages: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} + tree-kill@1.2.2: + resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} + hasBin: true + + tslib@2.8.1: + resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} + type-detect@4.0.8: resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} engines: {node: '>=4'} @@ -2486,6 +2508,16 @@ snapshots: concat-map@0.0.1: {} + concurrently@9.1.0: + dependencies: + chalk: 4.1.2 + lodash: 4.17.21 + rxjs: 7.8.1 + shell-quote: 1.8.2 + supports-color: 8.1.1 + tree-kill: 1.2.2 + yargs: 17.7.2 + continuable-cache@0.3.1: {} convert-source-map@1.9.0: {} @@ -3531,6 +3563,10 @@ snapshots: dependencies: queue-microtask: 1.2.3 + rxjs@7.8.1: + dependencies: + tslib: 2.8.1 + safe-buffer@5.2.1: {} safe-json-parse@1.0.1: {} @@ -3570,6 +3606,8 @@ snapshots: shebang-regex@3.0.0: {} + shell-quote@1.8.2: {} + should-equal@2.0.0: dependencies: should-type: 1.4.0 @@ -3706,6 +3744,10 @@ snapshots: dependencies: is-number: 7.0.0 + tree-kill@1.2.2: {} + + tslib@2.8.1: {} + type-detect@4.0.8: {} type-fest@0.8.1: {}