Skip to content

Commit

Permalink
setup local dev environment
Browse files Browse the repository at this point in the history
  • Loading branch information
ptweety committed Oct 8, 2022
1 parent c4d4e66 commit 88af7e4
Show file tree
Hide file tree
Showing 4 changed files with 107 additions and 7 deletions.
57 changes: 53 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,55 @@
node_modules
.idea

.huskyrc
.vscode
.nyc_output
ccu_*.json
ccu_*.json

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Dependency directories
node_modules/

# Output of 'npm pack'
*.tgz

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# Temp and Cache directory
.temp
.cache

# General macOS files
.DS_Store
*.icloud
._*

# Visual Studio Code files
.vscode/*
!.vscode/launch.json
!.vscode/tasks.json
!.vscode/settings.json
.history/

# node-red runtime
.node-red/*
!.node-red/settings.js
31 changes: 31 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch Program",
"type": "node",
"request": "launch",
"skipFiles": ["<node_internals>/**"],
"program": "${workspaceFolder}/node_modules/node-red/red.js",
"args": ["-s", "../.node-red/settings.js", "-u", "../.node-red"]
},
{
"name": "Launch via npm",
"type": "node",
"request": "launch",
"skipFiles": ["<node_internals>/**"],
"cwd": "${workspaceFolder}",
"runtimeExecutable": "npm",
"runtimeArgs": ["run-script", "debug"]
},
{
"type": "node",
"request": "attach",
"name": "Attach by Process ID",
"processId": "${command:PickProcess}"
}
]
}
12 changes: 12 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"prettier.enable": false,
"eslint.enable": false,
"xo.enable": true,
"xo.format.enable": true,
"[javascript]": {
"editor.defaultFormatter": "samverschueren.linter-xo"
},
"[typescript]": {
"editor.defaultFormatter": "samverschueren.linter-xo"
}
}
14 changes: 11 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,17 @@
"eq-3"
],
"author": {
"name": "Sebastian Raff",
"email": "hobbyquaker@gmail.com"
"name": "ptweety (Matthias)",
"email": "me@ptweety.net"
},
"bugs": {
"url": "https://github.com/ptweety/node-red-contrib-ccu/issues"
},
"contributors": [
{
"name": "Sebastian Raff",
"email": "hobbyquaker@gmail.com"
},
{
"name": "Hypnos3",
"email": "hypnos3@online.de"
Expand Down Expand Up @@ -110,7 +114,10 @@
"test": "xo && nyc mocha \"test/**/*_spec.js\" --exit",
"testcov": "nyc mocha \"test/**/*_spec.js\" --exit",
"testonly": "mocha \"test/**/*_spec.js\" --exit",
"prepare": "husky install"
"prepare": "husky install",
"debug": "node --nolazy --inspect ./node_modules/node-red/red.js -s ../.node-red/settings.js -u ../.node-red",
"start": "node ./node_modules/node-red/red.js -s ../.node-red/settings.js -u ../.node-red",
"update": "npx npm-check-updates -u && npm install"
},
"xo": {
"space": 4,
Expand Down Expand Up @@ -165,6 +172,7 @@
"unicorn/prefer-switch": "warn"
},
"ignore": [
".node-red/**/*",
"nodes/ccu-switch.js",
"nodes/ccu-switch.html",
"paramsets-join.js"
Expand Down

0 comments on commit 88af7e4

Please sign in to comment.