Skip to content

Commit

Permalink
fix(node-dev): fix the custom node build command (n8n-io#4148)
Browse files Browse the repository at this point in the history
* fix(node-dev): fix the custom node build command

also
* wait for the build command to finish before logging the success message
* use module relative paths for looking up `tsconfig` and `tsc` using `require.resolve`

* copy over svg files as well

* copy over the static files before the compilation step

this makes sure that these files are also copied over with `--watch`
  • Loading branch information
netroy authored Sep 21, 2022
1 parent b739846 commit 8aff883
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 285 deletions.
210 changes: 2 additions & 208 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion packages/node-dev/commands/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export class Build extends Command {

const outputDirectory = await buildFiles(options);

this.log(`The nodes got build and saved into the following folder:\n${outputDirectory}`);
this.log(`The nodes got built and saved into the following folder:\n${outputDirectory}`);
} catch (error) {
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions, @typescript-eslint/no-unsafe-member-access
this.log(`\nGOT ERROR: "${error.message}"`);
Expand Down
3 changes: 1 addition & 2 deletions packages/node-dev/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
"devDependencies": {
"@n8n_io/eslint-config": "",
"@oclif/dev-cli": "^1.22.2",
"@types/copyfiles": "^2.1.1",
"@types/express": "^4.17.6",
"@types/inquirer": "^6.5.0",
"@types/node": "^16.11.22",
Expand All @@ -59,7 +58,7 @@
"@oclif/command": "^1.5.18",
"@oclif/errors": "^1.2.2",
"change-case": "^4.1.1",
"copyfiles": "^2.1.1",
"fast-glob": "^3.2.5",
"inquirer": "^7.0.1",
"n8n-core": "~0.134.0",
"n8n-workflow": "~0.116.0",
Expand Down
Loading

0 comments on commit 8aff883

Please sign in to comment.