Skip to content

JSPM support #2233

@marinasundstrom

Description

@marinasundstrom

The JavaScript Package Manager, JSPM, is a frictionless package manager for JavaScript that is able to pull packages from various sources ("endpoints", as they are called), such as Node Package Manager (NPM) and Bower. Unifying all in one interface.

It also has the ability to load EcmaScript 6 modules through the System.js library that implements a loader.

One notable feature is its support for transpilers, traceur (with AtScript) and Babel (formerly e6to5), that brings the new ES6 syntax and features and makes it easy to get started with building modern JavaScript applications.

JSPM brings a dynamic developer experience that pulls dependencies on the the fly. When an app is ready to be deployed it can then be compiled and dependencies can be bundled.

The JSPM configuration-file is based on the NPM package.json format.

TypeScript should support this new ecosystem too.

Activity

red010b37

red010b37 commented on Mar 9, 2015

@red010b37

Yes please!

robcleghorn

robcleghorn commented on Mar 9, 2015

@robcleghorn

+1

RichiCoder1

RichiCoder1 commented on Mar 10, 2015

@RichiCoder1

Aurelia makes extensive use of JSPM, and having worked with both I'd 👍 this.

atrauzzi

atrauzzi commented on Mar 13, 2015

@atrauzzi

👍

ejsmith

ejsmith commented on Mar 17, 2015

@ejsmith

Yes please!

RyanCavanaugh

RyanCavanaugh commented on Mar 17, 2015

@RyanCavanaugh
Member

@mhegazy Accepting PRs?

mhegazy

mhegazy commented on Mar 17, 2015

@mhegazy
Contributor

I actually like the JSPM work flow, and we should do that :) a couple of thoughts:

  • we need a transpile(input: string): string interface on the TS side, to make the interaction with the API clean and simple
  • we need to emit into the system.js module structure, possibly a new --module system
  • finally plugin typescript support to JSPM

PRs are definitely welcomed

added this to the Community milestone on Mar 17, 2015
basarat

basarat commented on Mar 17, 2015

@basarat
Contributor

we need a transpile(input: string): string interface on the TS side, to make the interaction with the API clean and simple

I am sure you already know : https://github.com/teppeis/typescript-simple , it now does inline sourcemaps : teppeis/typescript-simple#7 (I used it for atom/atom#5898)

atrauzzi

atrauzzi commented on Mar 17, 2015

@atrauzzi

We have to make sure this comes out requiring zero configuration beyond any steps needed to get typescript initially installed.

basarat

basarat commented on Mar 18, 2015

@basarat
Contributor

@atrauzzi I was about to start work on this but noticed from : https://github.com/jspm/registry/blob/master/registry.json#L13 that there is jspm install ts from (https://github.com/frankwallis/plugin-typescript) by @frankwallis already.

Is there something more required?

marinasundstrom

marinasundstrom commented on Mar 18, 2015

@marinasundstrom
Author

I have not evaluted the extension yet. I don't know what level of support there is.

Can you debug the TS in the browser?

44 remaining items

OliverJAsh

OliverJAsh commented on Jun 15, 2015

@OliverJAsh
Contributor

@vladima Thanks for the explanation.

I'm looking at VSCode and the IDE plugins now. Is it possible to hook these up to SystemJS so they read the config and can parse third party dependencies, e.g. import jquery from 'jquery;`?

atrauzzi

atrauzzi commented on Jun 15, 2015

@atrauzzi

@OliverJAsh That would be simply amazing. Would almost offer a first-class client side dev experience.

I'm fairly curious about this, because I feel like there are numerous undiscovered challenges:

  • If it's a pure JavaScript package, how far can the hinting really expect to go?
  • If it's a TypeScript package, does it read built JS, or does it look somewhere for TS code?
  • If it's built JavaScript that includes the .r.js files, where should it expect to find those?
  • What if it's a package that needs to be supplemented with an r.js from another source? Any way to match the two?

Probably more questions. But I feel like package development in JS is just insanely complex and difficult to reason about with or without TypeScript.

OliverJAsh

OliverJAsh commented on Jun 19, 2015

@OliverJAsh
Contributor

I don't seem to get compile errors when bundling either (now supported in jspm@0.16-beta.2). /cc @vladima

Tracking systemjs/builder#206

vladima

vladima commented on Jun 19, 2015

@vladima
Contributor

Technically bundling as it is done in jspm now is not a whole program analysis as it processes modules one by one. I already have a workitem in my list to add support for reporting syntax errors during transpile part in es6-module-loader and in systemjs/builder.

Also we already have plenty of requests to add support for bunding in TypeScript compiler - is already in the roadmap (I think it is currently scheduled for 2.0).

SonofNun15

SonofNun15 commented on Feb 20, 2016

@SonofNun15

Currently JSPM understands typescript but the typescript compiler does not know how to resolve typings using jspm as it does with npm. This is significant for two reasons:

  1. Running tscresults in false errors because it can't load library typings. This may be able to be resolved via typings (https://github.com/typings/typings), but only via an additional typings install.
  2. VSCode shows a bunch of false errors in files, presumably because it relies on tsc to generate errors.
daslicht

daslicht commented on Mar 2, 2016

@daslicht

Is there meanwhile an example ?

frankwallis

frankwallis commented on Mar 2, 2016

@frankwallis
Contributor

@daslicht - you can see some jspm/typescript examples here

oising

oising commented on Mar 26, 2016

@oising

@SonofNun15 Is there an issue tracking this?

SonofNun15

SonofNun15 commented on Mar 28, 2016

@SonofNun15

@oising: yes, this one

Bretto

Bretto commented on Apr 27, 2016

@Bretto

Why is this closed ? Where can we follow the progress on this ?

kitsonk

kitsonk commented on Apr 27, 2016

@kitsonk
Contributor

It is closed because as mentioned above it is supported.

There are the Microsoft/TypeScriptSamples which maybe a better place to focus your questions/look for answers.

locked and limited conversation to collaborators on Jun 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    SuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @atrauzzi@ThatRendle@ejsmith@danielearwicker@daslicht

        Issue actions

          JSPM support · Issue #2233 · microsoft/TypeScript