Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeORM CLI for ES6 #3

Open
sslgeorge opened this issue Jul 23, 2017 · 5 comments
Open

TypeORM CLI for ES6 #3

sslgeorge opened this issue Jul 23, 2017 · 5 comments

Comments

@sslgeorge
Copy link

When I use the CLI to generate migrations or entities it still generates as typescript.

@pleerock
Copy link
Member

file generation for es6 is not supported yet. Feel free to add its support - its easy to do. We can set extra flag in cli, something like typeorm entity:create --es6 and based on this it will generate es6 entity classes. Also we can add option to ormconfig.json like language: es6 and cli will read this format as a generation default.

@yunfan
Copy link

yunfan commented Apr 11, 2019

@pleerock the typeorm tool told me there isnt an option like --es6

@mrtnzagustin
Copy link

file generation for es6 is not supported yet. Feel free to add its support - its easy to do. We can set extra flag in cli, something like typeorm entity:create --es6 and based on this it will generate es6 entity classes. Also we can add option to ormconfig.json like language: es6 and cli will read this format as a generation default.

Are es6 supported now?

@allandiego
Copy link

Is there any example for migration with javascript only?

@mrtnzagustin
Copy link

@allandiego check this issue and this comment, typeorm cli does not support generating migrations files from and to plain javascript files. They should update their doc. Anyway, typeORM is typescript driven, so i understand that the new features are always being writen first to be "typescript" compatible, dont expect to make a full exploitation of typeORM if you want to use js or es6, at least by now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants