Giter Site home page Giter Site logo

Comments (4)

k-maru avatar k-maru commented on June 16, 2024

Hi, Bartvds.

When the directory is specified as the dest option, do you desire to concatenate JS file and a reference file?

for example


lib
└ MyType.ts
test
└ foo.ts(reference ../lib/MyType.ts)
└ bar.ts


compiles...


builid
└ test
    └ foo.js(concatenate MyType)
    └ bar.js

※I'm sorry for poor English

from grunt-typescript.

Bartvds avatar Bartvds commented on June 16, 2024

Yes, that would feel right, otherwise the foo.js would not be runable unless it's wrapped or embedded with everything from ../lib/MyType.ts (and it's sub-references).

Although that could be a desirable result as well for some situations (as it works like that currently), maybe people use references only for typing and import() for loading? It's a bit inflexible with circular imports so I use reference mostly.

My use case are my unit tests: it would be nice to compile them all at once (or glob/filter a subset) but still have each source file compile to it's own self-contained test file (and we could still use import/require to dynamically load helper files).

Could also be an option flag so it doesn't break existing behaviour?

from grunt-typescript.

k-maru avatar k-maru commented on June 16, 2024

Hmm... It's so difficult.
Because, TypeScriptCompiler support only all concatenate or all separate.

Now TypeScriptCompiler or TypeScriptService api is not stable.
So, I like to think version 1 is from out.

※I'm sorry for poor English

日本語で。

TypeScriptCompiler の API はすべて結合するか、またはすべてバラバラかしか対応してないので実現は難しいです。
今はまだ、APIが安定していないので、バージョン1がでてから検討させてください。

from grunt-typescript.

Bartvds avatar Bartvds commented on June 16, 2024

Sorry for my late reaction.

I see how this can be difficult to implement but it's not critical, andI have a work-around.

I'll close the issue and we'll see how it pans out with the compiler changes (and 0.9.0 is coming out very soon, so if you see a opportunity there it could be cool to add :)

from grunt-typescript.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.