npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

cocos-tb

v2.0.6

Published

minimist creator adapts taobao

Downloads

279

Readme

Cocos Creator 平台适配

安装

npm install

使用

2.4.6 适配

使用方式:

  1. Cocos 里构建好支付宝版本
  2. cocos2.ts 最上面修改 BUILD_PATH 路径
  3. node .\index.js c2
  4. dist/cocos2 查收

3.3.2 适配 (TODO)

  1. Cocos 里构建好支付宝版本
  2. cocos3.ts 最上面修改 BUILD_PATH 路径
  3. node .\index.js c2
  4. dist/cocos3 查收

生成 2.4.6 adapter.js

  1. 编辑处理好 templates/cocos2-adapter-modified
  2. 若要构建为压缩混淆后的最小版本,则修改 webpack.config.js 配置为mode: "production"
  3. npm run adapter2,然后查收 templates/cocos2/adapter.js

目录说明

  • dist 能运行在淘宝平台的发布版本 (可修改)
    • laya Laya 构建出的版本,可在淘宝平台运行
    • egret 白鹭构建出的版本,可在淘宝平台运行
    • cocos2 Cocos 2.4.6 项目适配后的目标位置
    • cocos3 Cocos 3.3.2 项目适配后的目标位置
  • build Cocos 直接构建的版本 (勿修改)
    • cocos2 Cocos 2.4.6 官方示例项目
    • cocos3 Cocos 3.3.2 官方示例项目
  • libs 一些可能会用到的脚本,TypeScript 开发 (可修改)
    • processGlobalVar.ts 处理全局变量,将所有全局变量放在 $global 下
  • templates 适配过程用到的模板文件,无侵入式修改
    • cocos2 从 Cocos 2.4.6 引擎中提取的淘宝平台项目模板 (可修改)
    • cocos2-adapter 从 Cocos 2.4.6 引擎中提取的淘宝平台的 adapter,入口点是 cocos2-adapter/platforms/taobao/index.js,其中的模块化写法淘宝平台不完全支持,需要 rollupwebpack 打包 (勿修改)
    • cocos2-adapter-modified 我修改了一丢丢的 adapter (可修改)

需求

将 Cocos Creator 2.x & 3.x 适配至指定平台,期望的使用过程如下:

  1. 在 Cocos 中构建,将构建结果直接复制到 build 目录下。
  2. 根据 Cocos 版本,执行 npm run c2npm run c3
  3. 适配后的游戏包,自动创建至 dist/cocos2dist/cocos3

开发过程注意

  1. 要考虑到未来引擎版本升级,采取无侵入式的适配方案。
  2. 尽量以 NodeJS 脚本方式实现,而非 Cocos 插件。