Comments (6)
Thanks for this, that clarifies things - I do have some questions and a few general points to make:
The 'System.register' output is now in TypeScript master but is not part of the latest release (1.5.0-beta), hopefully it will get released soon. I have had a play around with the code from master to see how it integrates and there are a couple of issues:
TypeScript itself is now incorrectly detected as being in System.register format, because it contains the string 'System.register'. This can be fixed quite easily with an override, or perhaps the format detection could be improved.
The main conflict between SystemJS and TypeScript at the moment is the .ts file extension. Currently plugin-typescript post-processes the compiled JavaScript and adds a '.ts!' extension to all the relative import paths, so that they get resolved correctly and automatically fed through the plugin. This works ok, but it is less than ideal and does cause some issues. A little while ago you mentioned that the logic for determining the default file extension for an imported file is going to change (here), and also that it will be possible to specify plugins by file extension. I think that these 2 changes should solve a lot of issues for me, do you think they will be released soon?
There are some features of the TypeScript language which cannot be used with single-file compilation (const enums, namespaces) - just something to be aware of. I think the compiler will spit out an appropriate error message if they are used in single-file mode.
What's the plan for making TypeScript a core option? Like I said I am happy to help out - even if it's just by doing some testing.
from plugin-typescript.
Ok I have seen the PRs now, that's awesome. I will try compiling my programs and see how I get on.
from plugin-typescript.
Thanks, really appreciate your feedback. TypeScript being detected as System.register is actually right - it's the format after transpilation. Having plugins via config is a priority right now - I'm working on getting this into SystemJS right now along with the TypeScript work, hopefully very soon.
from plugin-typescript.
What I mean is that the TypeScript compiler itself is being detected as System.register, but it definitely isn't. This is why it currently needs a shim:
"overrides": {
"github:Arnavion/typescript-github@master": {
"format": "global",
"shim": {
"bin/typescript": {
"exports": "ts"
}
}
}
}
I have updated my app to use the new versions from @vladima and the compilation is working nicely and everything is a lot faster.
from plugin-typescript.
Ahh I see, right. Yes we may need to add an override to TypeScript to make
that work.
On Mon, May 4, 2015 at 1:28 PM frankwallis [email protected] wrote:
What I mean is that the TypeScript compiler itself is being detected as
System.register, but it definitely isn't. This is why it currently needs a
shim:"overrides": { "github:Arnavion/typescript-github@master": { "format": "global", "shim": { "bin/typescript": { "exports": "ts" } } } }
I have updated my app https://github.com/frankwallis/tower/tree/angular2
to use the new versions from @vladima https://github.com/vladima and
the compilation is working nicely and everything is a lot faster.Reply to this email directly or view it on GitHub
#18 (comment)
.
from plugin-typescript.
Version 2.0 of this plugin now supports single-file transpilation in the same way as the built-in TypeScript transpiler. Users who are using Babel as he built-in transpiler will be able to use this plugin to compileTypeScript.
Optionally the plugin can also type-check the code although this takes a little longer. I am working on a configuration which will enable a 'flow-like' experience using systemjs-builder in-memory builds to incrementally recompile changed files and their dependencies.
from plugin-typescript.
Related Issues (20)
- 7.x branch not on npm? HOT 1
- Unexpected export encountered on abstract classes HOT 3
- defaulting to tsconfig: true HOT 6
- tslib_1.__metadata is not a function HOT 2
- Plugin-Typescript doesn't completely strip out Interface import/exports which breaks rollup. HOT 12
- no such file or directory: `plugin-typescript/lib.js` HOT 7
- exports is not defined HOT 3
- js error when loading - cannot read property 'length' of undefined HOT 6
- ENOENT: no such file or directory HOT 1
- Systemjs builder output not working as expected HOT 2
- No console output from Typescript compilation errors HOT 1
- Lookup error at node v8.1.2 npm 5.0.3 HOT 2
- Support for "module": "ESNext" HOT 1
- Not compatible with Typescript 2.6.x package HOT 1
- Getting "Cannot read property 'map' of undefined" HOT 1
- Is it possible to load global script? HOT 6
- tsconfig extends HOT 3
- Error: require is not defined HOT 8
- Does not work with typescript 2.9.1 and above HOT 1
- Getting errors during npm install
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 plugin-typescript.