Skip to main content

TypeScript

If your TypeORM Entity Schema file is written in TypeScript, you have to use ts-node to run erdia. Win32 environment have to use the cli.js file in the node_modules directory because the erdia file in the .bin directory is not a JavaScript file.

Without Re-Map paths

Requires installation of the ts-node package.

TS_NODE_PROJECT="./tsconfig.json" node \
-r ts-node/register \
./node_modules/erdia/dist/cli.js build -d [your dataSourcePath] --format html -o ./dist/html

With Re-Map paths

Requires installation of the ts-node, tsconfig-paths package.

TS_NODE_PROJECT="./tsconfig.json" node \
-r ts-node/register \
-r tsconfig-paths/register \
./node_modules/erdia/dist/cli.js build -d [your dataSourcePath] --format html -o ./dist/html