mirror of
https://github.com/n8n-io/n8n-nodes-starter.git
synced 2025-10-29 06:22:24 -05:00
Merge f603b550f6 into 0466fdb2df
This commit is contained in:
commit
08c1a141e5
8 changed files with 1413 additions and 10437 deletions
1
.env
Normal file
1
.env
Normal file
|
|
@ -0,0 +1 @@
|
|||
GENERIC_TIMEZONE=UTC
|
||||
|
|
@ -31,7 +31,7 @@ These are the basic steps for working with the starter. For detailed guidance on
|
|||
3. Run `npm i` to install dependencies.
|
||||
4. Open the project in your editor.
|
||||
5. Browse the examples in `/nodes` and `/credentials`. Modify the examples, or replace them with your own nodes.
|
||||
6. Update the `package.json` to match your details.
|
||||
6. Update the `package.json` to match your details. Also update the `run.sh` with your package (In `package.json` => "name") name.
|
||||
7. Run `npm run lint` to check for errors or `npm run lintfix` to automatically fix errors when possible.
|
||||
8. Test your node locally. Refer to [Run your node locally](https://docs.n8n.io/integrations/creating-nodes/test/run-node-locally/) for guidance.
|
||||
9. Replace this README with documentation for your node. Use the [README_TEMPLATE](README_TEMPLATE.md) to get started.
|
||||
|
|
|
|||
20
docker-compose.yml
Normal file
20
docker-compose.yml
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
version: "3"
|
||||
|
||||
services:
|
||||
n8n:
|
||||
image: n8n-custom-nodes
|
||||
restart: unless-stopped
|
||||
build:
|
||||
dockerfile: ./docker/Dockerfile
|
||||
context: .
|
||||
ports:
|
||||
- "5678:5678"
|
||||
environment:
|
||||
- GENERIC_TIMEZONE=${GENERIC_TIMEZONE}
|
||||
- N8N_LOG_LEVEL=debug
|
||||
volumes:
|
||||
- n8n-data:/home/node/.n8n
|
||||
|
||||
volumes:
|
||||
n8n-data:
|
||||
name: n8n-data
|
||||
21
docker/Dockerfile
Normal file
21
docker/Dockerfile
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
FROM docker.n8n.io/n8nio/n8n:latest AS target
|
||||
|
||||
FROM node:18-alpine AS build
|
||||
RUN npm i npm@latest -g
|
||||
WORKDIR /build
|
||||
COPY . .
|
||||
|
||||
RUN npm run build
|
||||
|
||||
FROM target as final
|
||||
WORKDIR /custom-nodes
|
||||
|
||||
COPY --from=build /build .
|
||||
COPY --from=build /build/docker/run.sh /run.sh
|
||||
|
||||
WORKDIR /custom-nodes
|
||||
USER root
|
||||
RUN npm link
|
||||
|
||||
USER node
|
||||
ENTRYPOINT [ "tini", "--", "/run.sh" ]
|
||||
5
docker/run.sh
Normal file
5
docker/run.sh
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh
|
||||
mkdir -p ~/.n8n/nodes/
|
||||
cd ~/.n8n/nodes/
|
||||
npm link n8n-nodes-<...>
|
||||
/docker-entrypoint.sh
|
||||
16
gulpfile.js
16
gulpfile.js
|
|
@ -1,16 +0,0 @@
|
|||
const path = require('path');
|
||||
const { task, src, dest } = require('gulp');
|
||||
|
||||
task('build:icons', copyIcons);
|
||||
|
||||
function copyIcons() {
|
||||
const nodeSource = path.resolve('nodes', '**', '*.{png,svg}');
|
||||
const nodeDestination = path.resolve('dist', 'nodes');
|
||||
|
||||
src(nodeSource).pipe(dest(nodeDestination));
|
||||
|
||||
const credSource = path.resolve('credentials', '**', '*.{png,svg}');
|
||||
const credDestination = path.resolve('dist', 'credentials');
|
||||
|
||||
return src(credSource).pipe(dest(credDestination));
|
||||
}
|
||||
11766
package-lock.json
generated
11766
package-lock.json
generated
File diff suppressed because it is too large
Load diff
19
package.json
19
package.json
|
|
@ -17,7 +17,9 @@
|
|||
},
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"build": "tsc && gulp build:icons",
|
||||
"build": "npm run clean && tsc && npm run build:images",
|
||||
"clean": "rimraf dist/",
|
||||
"build:images": "copyfiles nodes/**/*.svg nodes/**/*.png dist/",
|
||||
"dev": "tsc --watch",
|
||||
"format": "prettier nodes credentials --write",
|
||||
"lint": "eslint nodes credentials package.json",
|
||||
|
|
@ -39,14 +41,15 @@
|
|||
]
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/express": "^4.17.6",
|
||||
"@types/express": "^4.17.17",
|
||||
"@types/request-promise-native": "~1.0.15",
|
||||
"@typescript-eslint/parser": "~5.45",
|
||||
"eslint-plugin-n8n-nodes-base": "^1.11.0",
|
||||
"gulp": "^4.0.2",
|
||||
"n8n-core": "*",
|
||||
"@typescript-eslint/parser": "~6.3.0",
|
||||
"copyfiles": "^2.4.1",
|
||||
"eslint-plugin-n8n-nodes-base": "^1.16.0",
|
||||
"n8n-core": "^1.2.0",
|
||||
"n8n-workflow": "*",
|
||||
"prettier": "^2.7.1",
|
||||
"typescript": "~4.8.4"
|
||||
"prettier": "^3.0.1",
|
||||
"rimraf": "^5.0.1",
|
||||
"typescript": "~5.1.6"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue