@2-bit/umd 中文文档教程
@2-bit/umd
用于发布为 umd 的简单 JavaScript 项目的简单汇总捆绑器配置。 此包演示了克隆此模板并构建您自己的包以进行发布的最终结果。
Setup
纱线
纱线构建
Development & Testing
- From this project run
yarn link
- From a separate, external project, run `yarn link @2-bit/umd
- You can now import this package and use the
greet()
function.
import greet from '@2-bit/umd';
...
<p>{greet()}</p>
@2-bit/umd
A simple rollup bundler configuration for simple JavaScript projects intended for publishing as umd. This package demonstrates the end result of cloning this template and building your own package for publishing.
Setup
yarn
yarn build
Development & Testing
- From this project run
yarn link
- From a separate, external project, run `yarn link @2-bit/umd
- You can now import this package and use the
greet()
function.
import greet from '@2-bit/umd';
...
<p>{greet()}</p>