- JSPM is next generation of package manager for Browser.
- JSPM is developed around SystemJS a universal module loader.
- SystemJS is capable of loading ESM,CommonJS,AMD,global and register formats.
- JSPM can be installed globally using npm install jspm –g command.The following screenshot shows the installation of JSPM.
- JSPM ca be installed locally and it is recommended.It ensure upgrades to the global jspm will not alter the behavior of your application.
- JSPM can be installed locally using NPM.We can initialize NPM using npm init command.The following screenshot shows the terminal with npm initialization to create package.json file.
- The following screenshot shows the updated directory structure.
- Once package.json file generated we can install JSPM locally in the application using npm install jspm –save-dev command.The following screenshot shows the terminal with local installation of JSPM.
- Now we can created a JSPM project configuration using jspm init command.This process asks few questions to the developer for initializing JSPM.The following screenshots shows the terminal with JSPM initialization.
- On successful execution of JSPM initialization it creates config.js file and jspm_packages directory in the application.The following screenshot shows the updated directory structure.
- We will learn more about JSPM in my next blog post. Up to this point the demo code is available in the following URL.
https://github.com/saan1984/JSPMDemo