- In my previous post we have learnt about JSPM configuration.
- In this post we will learn about the supported registry by JSPM.
- JSPM supports any no of registries.However at present it supports NPM and Github. Most of the NPM modules will work without any further configuration.
- A JSPM module can be installed using JSPM install moduleName command.
- For example AngularJS can be installed using JSPM install angular command.The following screenshot shows the terminal with AngularJS installation using JSPM.
- In the preceding screenshot we can observe that JSPM is downloading the AngularJS library from Github sand saving it to jspm_packages/github directory.The following screenshot shows the updated directory structure after AngularJS installation.
- On successful installation of AngularJS a development dependencies will be added to package.json file.The following code shows the content of package.json file.
{ "name": "JSPMDemo", "version": "0.0.0", "devDependencies": { "jspm": "^0.16.2" }, "jspm": { "directories": {}, "dependencies": { "angular": "github:angular/bower-angular@^1.4.5" }, "devDependencies": { "babel": "npm:babel-core@^5.8.22", "babel-runtime": "npm:babel-runtime@^5.8.20", "core-js": "npm:core-js@^1.1.0" } } }