mirror of
https://github.com/n8n-io/n8n-nodes-starter.git
synced 2025-10-28 14:12:24 -05:00
Add single-click startup with devcontainers
This commit is contained in:
parent
67ee5b8e80
commit
b368b1dc8f
4 changed files with 5015 additions and 8 deletions
22
.devcontainer/devcontainer.json
Normal file
22
.devcontainer/devcontainer.json
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"name": "n8n Fitbit Node Development",
|
||||
"image": "mcr.microsoft.com/devcontainers/javascript-node:20",
|
||||
"features": {
|
||||
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
|
||||
"ghcr.io/devcontainers/features/git:1": {},
|
||||
"ghcr.io/devcontainers/features/github-cli:1": {},
|
||||
"ghcr.io/devcontainers-extra/features/n8n:1": {}
|
||||
},
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"extensions": [
|
||||
"ms-vscode.vscode-typescript-next",
|
||||
"esbenp.prettier-vscode",
|
||||
"ms-vscode.vscode-eslint"
|
||||
]
|
||||
}
|
||||
},
|
||||
"forwardPorts": [3000, 5678],
|
||||
"postCreateCommand": "bash start-n8n-with-custom-node.sh",
|
||||
"remoteUser": "node"
|
||||
}
|
||||
4962
package-lock.json
generated
Normal file
4962
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
17
package.json
17
package.json
|
|
@ -1,19 +1,19 @@
|
|||
{
|
||||
"name": "n8n-nodes-<...>",
|
||||
"name": "n8n-nodes-TODO-YOUR-NODE-HERE",
|
||||
"version": "0.1.0",
|
||||
"description": "",
|
||||
"description": "TODO YOUR DESCRIPTION HERE",
|
||||
"keywords": [
|
||||
"n8n-community-node-package"
|
||||
],
|
||||
"license": "MIT",
|
||||
"homepage": "",
|
||||
"homepage": "TODO",
|
||||
"author": {
|
||||
"name": "",
|
||||
"email": ""
|
||||
"name": "TODO",
|
||||
"email": "TODO"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/<...>/n8n-nodes-<...>.git"
|
||||
"url": "https://github.com/TODO/n8n-nodes-TODO.git"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=20.15"
|
||||
|
|
@ -25,7 +25,8 @@
|
|||
"format": "prettier nodes credentials --write",
|
||||
"lint": "eslint nodes credentials package.json",
|
||||
"lintfix": "eslint nodes credentials package.json --fix",
|
||||
"prepublishOnly": "npm run build && npm run lint -c .eslintrc.prepublish.js nodes credentials package.json"
|
||||
"prepublishOnly": "npm run build && npm run lint -c .eslintrc.prepublish.js nodes credentials package.json",
|
||||
"getPackageName": "echo ${npm_package_name}"
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
|
|
@ -52,4 +53,4 @@
|
|||
"peerDependencies": {
|
||||
"n8n-workflow": "*"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
22
start-n8n-with-custom-node.sh
Executable file
22
start-n8n-with-custom-node.sh
Executable file
|
|
@ -0,0 +1,22 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
set -x
|
||||
|
||||
N8N_NODES_DIR=~/.n8n/custom
|
||||
|
||||
# Build the node
|
||||
npm install
|
||||
npm run lint
|
||||
npm run build
|
||||
npm link
|
||||
package_name="$(npm run getPackageName -s)"
|
||||
|
||||
mkdir -p "${N8N_NODES_DIR}"
|
||||
cd "${N8N_NODES_DIR}"
|
||||
|
||||
# Link the custom node into n8n
|
||||
npm link "${package_name}"
|
||||
|
||||
# Start the server
|
||||
n8n
|
||||
Loading…
Add table
Add a link
Reference in a new issue