@areslabs/ares-jsbundle-commonpack

Ares Core Common Pack

Usage no npm install needed!

<script type="module">
  import areslabsAresJsbundleCommonpack from 'https://cdn.skypack.dev/@areslabs/ares-jsbundle-commonpack';
</script>

README

Ares Core Common Pack

拆分包需要依赖 common 包的构建结果进行拆包,因此本项目在每次构建出 common 包之后,需要发布到在 npm 服务器上,因此 package.jsonname 字段应是 npm 服务器上不存在包。

common包构建

auto-build-commonpack.sh 脚本中木有只包含构建 common 包和发布当前项目至 npm 服务器的功能。而将构建结果推送到客户端代码仓库的功能,需要自行编写。

安卓

androidcommon包:

./auto-build-commonpack.sh android

构建结果: outputBundle-android

ios

./auto-build-commonpack.sh ios

构建结果: outputBundle-ios

同时构建 ios 和 android 的common包

./auto-build-commonpack.sh all

拆分包

拆包使用 make-business-jsbundles.sh 脚本。

注: 拆包的代码也需推送至客户端代码仓库。

安卓:

./scripts/make-business-jsbundles.sh -p ios -m [项目模块名] -s [packageName]

ios:

./scripts/make-business-jsbundles.sh -p ios -m [项目模块名] -s [packageName]

packageName: common包所对应项目的包名,如 ares-jsbundle-commonpack