8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
插件的构建和 seajs 本身是不同的,因为插件本身是 cmd 模块。
加载插件一共有三种方式,可以总结为嵌入 script 和 preload。
define('seajs-text', [], function() {}); seajs.require('seajs-text');
在标准 cmd 构建后还需要添加 require 的代码 (seajs 2.2.0 才支持) ,使用 seatools build 已处理。
seatools build
s�eajs 的插件已独立成库,但仍需要在官网统一测试,因为官网的测试页会由外部用户在不同的浏览器上进行测试,还是比较可靠的。
在 seajs 的 package 中添加 seajs-plugin 字段,publish 站点的时候会把这些插件的用例添加到 seajs 中。
https://github.com/seajs/seajs/blob/470fc43de7084f0ee7c93b09ed3f264e7983efb8/package.json#L27
插件测试用例 必须存在 ./tests/spec/test.html 这个页面 ,作为用例页面。可供插件的 runner 调用,也可供 seajs 的 runner 调用。
在开发或写用例的时候,如果依赖到本模块以外的代码需要指定路径,如 seajs-flush 使用到了 seajs-combo,需要指定 seajs-combo 路径。
http://assets.spmjs.org/seajs/seajs-combo/1.0.0/seajs-combo.js
The text was updated successfully, but these errors were encountered:
No branches or pull requests
插件构建
插件的构建和 seajs 本身是不同的,因为插件本身是 cmd 模块。
加载插件一共有三种方式,可以总结为嵌入 script 和 preload。
在标准 cmd 构建后还需要添加 require 的代码 (seajs 2.2.0 才支持) ,使用
seatools build
已处理。seajs 官方测试用例
s�eajs 的插件已独立成库,但仍需要在官网统一测试,因为官网的测试页会由外部用户在不同的浏览器上进行测试,还是比较可靠的。
在 seajs 的 package 中添加 seajs-plugin 字段,publish 站点的时候会把这些插件的用例添加到 seajs 中。
https://github.com/seajs/seajs/blob/470fc43de7084f0ee7c93b09ed3f264e7983efb8/package.json#L27
插件测试用例 必须存在 ./tests/spec/test.html 这个页面 ,作为用例页面。可供插件的 runner 调用,也可供 seajs 的 runner 调用。
依赖
在开发或写用例的时候,如果依赖到本模块以外的代码需要指定路径,如 seajs-flush 使用到了 seajs-combo,需要指定 seajs-combo 路径。
http://assets.spmjs.org/seajs/seajs-combo/1.0.0/seajs-combo.js
The text was updated successfully, but these errors were encountered: