1. 安装
yarn  global add jspm  or npm install -g jspm
2. 创建项目使用
mkdir appdmeo
jspm init
3. 安装依赖
jspm install npm:lodash-node
jspm install github:components/jquery
jspm install jquery
jspm install myname=npm:underscore
4. 编写代码
lib/bootstrap.js
    import _ from 'lodash-node/modern/lang/isEqual.js';
    import $ from 'jquery';
    import underscore from 'myname';

    export function bootstrap() {
      // bootstrap code here
    }
    
lib/main.js
    import {bootstrap} from './bootstrap.js';
    bootstrap();

index.html
  <!doctype html>
  <script src="jspm_packages/system.js"></script>
  <script src="config.js"></script>
  <script>
    System.import('lib/main.js');
  </script>
5. 运行
 jspm bundle lib/main --inject
6. 效果
jspm 安装试用
 
jspm 安装试用
 
7. 插件使用
jspm install  css json
使用方式,结尾添加!
import "../css/demo.css!"
import "../json/app.json!"
8. 参考资料
https://jspm.io/
 
 
 
 

相关文章:

  • 2021-08-31
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-04-22
  • 2022-12-23
  • 2021-11-08
  • 2022-12-23
  • 2021-12-12
  • 2021-06-19
相关资源
相似解决方案