systemjs 最小系统加载工具开源项目

我要开发同款
匿名用户2015年04月15日
94阅读

技术信息

开源地址
https://github.com/adamsanderson/qwandry
授权协议
MIT

作品详情

systemjs是一个最小系统加载工具,用来创建插件来处理可替代的场景加载过程,包括加载CSS场景和图片,主要运行在浏览器和NodeJS中。它是ES6浏览器加载程序的的扩展,将应用在本地浏览器中。通常创建的插件名称是模块本身,要是没有特意指定用途,则默认插件名是模块的扩展名称。

通常它支持创建的插件种类有:

CSSSystem.import('my/file.css!')

ImageSystem.import('some/image.pg!image')

JSONSystem.import('some/data.jso!').the(fuctio(jso){})

MarkdowSystem.import('app/some/project/README.md!').the(fuctio(html){})

TextSystem.import('some/text.txt!text').the(fuctio(text){})

WebFotSystem.import('googlePortLligatSlab,DroidSas!fot')

示例:

System.formats = ['amd', 'cjs', 'myformat', 'global'];  System.format.myformat = {    detect: fuctio(source, load) {      if (!source.match(formatRegEx))        retur false;      // retur the array of depedecies      retur getDeps(source);    },    execute: fuctio(load, depMap, global, execute) {      // provide ay globals      global.myFormatGlobal = fuctio(dep) {        retur depMap[dep];      }      // alter the source before executio      load.source = '(fuctio() {' + load.source + '}();';      // execute source code      execute();      // clea up ay globals      delete global.myFormatGlobal;      // retur the defied module object      retur global.module;    }  }

功能介绍

systemjs 是一个最小系统加载工具,用来创建插件来处理可替代的场景加载过程,包括加载 CSS 场景和图片,主要运行在浏览器和 NodeJS 中。它是 ES6 浏览器加载程序的的扩展,将应用...

声明:本文仅代表作者观点,不代表本站立场。如果侵犯到您的合法权益,请联系我们删除侵权资源!如果遇到资源链接失效,请您通过评论或工单的方式通知管理员。未经允许,不得转载,本站所有资源文章禁止商业使用运营!
下载安装【程序员客栈】APP
实时对接需求、及时收发消息、丰富的开放项目需求、随时随地查看项目状态

评论