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

Compile on save vs build #222

Closed
abogartz opened this issue Apr 1, 2015 · 4 comments
Closed

Compile on save vs build #222

abogartz opened this issue Apr 1, 2015 · 4 comments

Comments

@abogartz
Copy link

abogartz commented Apr 1, 2015

Perhaps my config is just not set up correctly, but I have my tsconfig file set up as follows.

"version": "1.4.1",
    "compilerOptions": {
        "target": "es5",
        "declaration": false,
        "out": "main.js",
        "noImplicitAny": false,
        "removeComments": false,
        "noLib": false,
        "sourceMap": false
    },

    "files": [
        "./main.ts"

    ]

Main.ts has references in it to other classes, e.g "a.ts" with class A.

If I make a change to a.ts, the "save on compile" command triggers, but the resulting js file doesn't seem to have all of the Typescript code such as the __extends function. However, if I run a "build" from the package, then the resulting js is correct.

@basarat
Copy link
Member

basarat commented Apr 1, 2015

We don't have good support for out as I don't personally use or recommend using it.

Tracked here : #206

@abogartz
Copy link
Author

abogartz commented Apr 1, 2015

That's too bad. Just out of curiosity, if you don't use --out, then what's your workflow for using multiple .ts files? If you're using Atom, how do you keep a list of js files current in your HTML markup?

@csnover
Copy link
Member

csnover commented Apr 1, 2015

@abogartz

if you don't use --out, then what's your workflow for using multiple .ts files?

Use external modules.

how do you keep a list of js files current in your HTML markup?

Don’t. Use an AMD loader.

@basarat
Copy link
Member

basarat commented Apr 1, 2015

@abogartz I've documented my reasons for not doing --out : https://github.com/TypeStrong/atom-typescript/blob/master/docs/out.md

Based on that I'll marking this explicitly as wont-fix, in #206 and also in tsconfig.md.

We can provide an --out story using some external build tools later.

@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.
Projects
None yet
Development

No branches or pull requests

3 participants