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

Add facility to disable emit-on-save #67

Closed
1 of 2 tasks
robertknight opened this issue Feb 9, 2015 · 11 comments
Closed
1 of 2 tasks

Add facility to disable emit-on-save #67

robertknight opened this issue Feb 9, 2015 · 11 comments
Milestone

Comments

@robertknight
Copy link

My project's build outputs TypeScript-compiled Javascript in a separate build dir (src\lib\foo.ts -> build\lib\foo.js) to avoid polluting the source tree with build artefacts.

It would be useful if it was possible to either:

  1. Disable emit-on-save.
  2. Be able to configure the options that the code is built with, including output directory and flags such as module type and noImplicitAny.

Discussion on Gitter:

But valid suggestion to have atom-typescript config. Please open an issue :
https://github.com/TypeStrong/atom-typescript/issues and this will be the first config option we add

I see a reference to tsconfig.json which will apparently be a standard way to configure TypeScript in future but I don't know too much about the plans for it. Would that be another way to address this use case?

Admin task list

@basarat basarat self-assigned this Feb 9, 2015
@basarat basarat added this to the 2 Second Cut milestone Feb 9, 2015
@basarat
Copy link
Member

basarat commented Feb 9, 2015

Be able to configure the options that the code is built with, including output directory and flags such as module type and noImplicitAny.

Yes tsconfig already does this portion: https://github.com/TypeStrong/atom-typescript/blob/master/docs/tsconfig.md

Disable emit-on-save.

I'll add this a plugin option. Reason: Don't want to a) pollute tsconfig , b) people getting an project and not being able to build without modifying tsconfig.

@basarat
Copy link
Member

basarat commented Feb 9, 2015

@robertknight having re-read the comments I just noticed your either. Perhaps I shouldn't have added this option as I do not see a reason why one would want to disable compile on save. Because it is faster than any other typescript plugin I've tried.

@basarat
Copy link
Member

basarat commented Feb 9, 2015

Nevertheless I have the code staged and will push it, potentially for people that use something else like webpack etc to compile on the fly.

@basarat
Copy link
Member

basarat commented Feb 9, 2015

image
💥

@robertknight
Copy link
Author

@basarat - For my particular use case, compile-on-save would be fine if the usual output directory was preserved - although I still need to run 'make' to perform other build steps.

Thanks for implementing this so quickly.

@kalaomer
Copy link

kalaomer commented Nov 7, 2015

Is this setting available now? I can't find it.

@basarat
Copy link
Member

basarat commented Nov 7, 2015

@kalaomer We ended up making it a part of compileOnSave : https://github.com/TypeStrong/atom-typescript/blob/master/docs/tsconfig.md

@kalaomer
Copy link

kalaomer commented Nov 7, 2015

Oh, thanks!

@gordonklaus
Copy link

Please add this setting back to the plugin.

Editor/plugin-specific configuration doesn't belong in tsconfig.json which is a configuration file for the compiler. Imagine if everyone's different favorite editor/plugin decided to read its configuration from tsconfig.json: We would end up with a tsconfig.json full of options each of which only a few people cared about; a mess.

@al6x
Copy link

al6x commented Dec 10, 2016

Please add the option of disabling notification back, I added options to config (see code below), still doesn't work. I see notifications with warnings/errors every time I save the file, it's extremely annoying.

    "compileOnSave": false,
    "buildOnSave": false,

@basarat basarat removed their assignment Dec 11, 2016
@joesonw
Copy link

joesonw commented Dec 13, 2016

The compileOnSave should be off by default, user can use it when they want to. Or it MESSES THINGS UP!!!!!!!!!

@TypeStrong TypeStrong locked and limited conversation to collaborators Jan 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants