n8n-io / n8n-nodes-starter

Example starter module for custom n8n nodes.
MIT License
190 stars 128 forks source link

Missing tsconfig option #2

Open quansenB opened 4 years ago

quansenB commented 4 years ago

Not sure, why I can not open a PR here.

Anyway, I stubled across a small bug that occurs when the nodes dir contains only one file and the credentials is empty. This is the case for alternative custom nodes using the same creds as the "normal" version.

"rootDir": "./", is needed to preserve the directory structure when building.

Related: https://github.com/Microsoft/TypeScript/issues/5134#issuecomment-277774061

I also recommend adding a "release": "npm run build && npm publish" script

pestevez commented 4 years ago

Thanks for the info, @quansenB. I added the rootDir item to the compilerOptions element and it maintained the structure, as you describe.

Are you trying to open the PR here from a fork or from this repo directly? The latter should work fine.