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

Inner project customization ? #144

Open
beytu opened this issue Apr 14, 2015 · 9 comments
Open

Inner project customization ? #144

beytu opened this issue Apr 14, 2015 · 9 comments

Comments

@beytu
Copy link

beytu commented Apr 14, 2015

Hello,

in the Tips section of your README, point 8, their is a default inner project notion when no tsconfig.json file is found. Is there a way to customize this project like setting the target option to ES6 or to set the module option.

I'm editing TS file using ES6 module feature and i don't have any tsconfig.json and i'm entouring the following issue :

image

thks!

@MartinMajewski
Copy link

Same issue and same message in JetBrain's WebStorm IDE with the TS 1.5 compiler.

At least now I know that it's not my IDE configuration! ;-)

@beytu
Copy link
Author

beytu commented Apr 14, 2015

@MartinMajewski , you should be able to provide those information (module and/or target) via the command line options on Webstorm 10 :

image

you can add --target ES6 for example

And in Webstorm 9, you should also be able to provide the module and/or target option using the file watcher customization window.

@billti
Copy link
Member

billti commented Apr 14, 2015

There is no way to set defaults for this currently. We could look at adding this to the User Preferences (but then, if you're going to have to edit a JSON file to set them, might as well add a tsconfig.json :-) ).

Is there a reason adding a tsconfig.json for the stuff you are working on is impractical right now?

I'll add the 'enhancement' tag to this issue for being able to set defaults for the plugin.

@MartinMajewski
Copy link

@beytu Okay, I'll try the --target ES6 option later today. Have tried it by simply using --module , but then I got a "Error: Cannot start compiler process" message.

@MartinMajewski
Copy link

Nope... same problem... compiler process cannot start...

@beytu
Copy link
Author

beytu commented Apr 15, 2015

@MartinMajewski thanks! good to know

@beytu
Copy link
Author

beytu commented Apr 15, 2015

hello @billti , About your question, it's not that is impractical but more inconvenient particularly in new projects where file creation, deletion, renaming occurs all the time and when there is multiple developers, maintaining this kind of file list is not that good. The tsconfig.json does not support glob yet ( microsoft/TypeScript#1927 ), so having to maintain this kind of list is not convenient in an active project especially in a prototyping phase.
I'll try to bypass this point using a gulp file watcher with gulp-inject which can inject the updated file list but even in this case, the plugin does not have a file watcher on tsconfig.json.

If you have any question, don't hesitate.

@zoltan-mihalyi
Copy link

Using --module commonjs solved this problem for me.

@paulvanbladel
Copy link

@zoltan-mihaly thanks for that. Works !

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

No branches or pull requests

5 participants