@corrasion/typeorm-cli

A typeorm cli wrapper to injects ts-node and ts-path-mapping as required packages.

Usage no npm install needed!

<script type="module">
  import corrasionTypeormCli from 'https://cdn.skypack.dev/@corrasion/typeorm-cli';
</script>

README

TypeORM unnoficial CLI Wrapper

This is a wrapper for TypeORM CLI, which execute the original CLI, using ts-node and ts-path-mapping as required dependencies.

Implementation

First you must have a project with typescript, typeorm and its corresponding ormconfig.json file. Then, install ts-node:

npm i --save-dev ts-node

Optionally, if you want to use custom path alias, you can add ts-path-mapping too:

npm i --save ts-path-mapping

finally, install this package locally...

npm i --save-dev @corrasion/typeorm-cli

...or global if you want:

npm i --g @corrasion/typeorm-cli

Usage

If you was installed the package as local development dependency, simply type:

npx typeorm-cli ...commands

...or if you was installed this package globally:

typeorm-cli ...commands

Replace ...commands with any command from typeorm. For example:

typeorm-cli migration:generate -n Create-DB