Comments (4)
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.
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.
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.
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)
- 0.6.1 -> 0.6.2 is not a "patch" revision HOT 1
- Does not detect file changes on vagrant synced_folder HOT 1
- Typescript 1.5 options missing HOT 1
- Upgrade "typescript" package dependency from 1.5.0-beta to 1.5.3 HOT 6
- Allow compilation of System.JS and UMD modules HOT 2
- Add option to use custom TypeScript compiler version HOT 2
- Single destination file is empty HOT 2
- Transpile only files which have changed HOT 2
- Map files
- JSX compilerOption not supported
- es6 doesn't compile classes HOT 5
- Question HOT 1
- Customize typescript compiler version? HOT 1
- Warning: path.replace is not a function Used HOT 1
- Wrong default target
- Update TypeScript Dep. to 1.8.2 HOT 6
- grunt-typescript VS gtunt-ts: why maintaining two plugins that do the same? HOT 6
- Empty js file when compiling ts to single js file
- BasePath option has been deprecated HOT 1
- Running typescript task with version 6.2 gives me "duplicate identifier" errors HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grunt-typescript.