Code Monkey home page Code Monkey logo

Comments (6)

frankwallis avatar frankwallis commented on June 11, 2024

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.

frankwallis avatar frankwallis commented on June 11, 2024

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.

guybedford avatar guybedford commented on June 11, 2024

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.

frankwallis avatar frankwallis commented on June 11, 2024

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.

guybedford avatar guybedford commented on June 11, 2024

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.

frankwallis avatar frankwallis commented on June 11, 2024

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)

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.