Thomas Luzat
Thomas Luzat

Reputation: 740

How do I use the current Angular 2 version from Git (with npm)?

I am currently following Angular 2 development, which means that I am using dependencies such as

"@angular/common": "2.0.0-rc.4",
"@angular/compiler": "2.0.0-rc.4",
…

in package.json. Given that there are some helpful fixes in Git already I would like to install the most recent version (or some specific commit) from Git. What is the easiest way to achieve this?

It would be preferable to avoid having to build Angular locally, but if necessary this would be acceptable, too.

Upvotes: 0

Views: 55

Answers (1)

You could reference angular cdn from your systemJs config. something like:
@angular: 'https://npmcdn.com/angular2'

then removing the dependency from the package.json

there is an example in this plunker

//map tells the System loader where to look for things
var  map = {
  'app':                        'app',
  '@angular':                   'https://npmcdn.com/@angular', // sufficient if we didn't pin the version
};

the version is specified in a variable but maybe there is something like /latest

Upvotes: 1

Related Questions