create-cocos-plugin
v1.0.10
Published
## Scaffolding Your First COCOS-plugin Project
Downloads
12
Maintainers
Readme
create-cocos-plugin
Scaffolding Your First COCOS-plugin Project
Compatibility Note: create-cocos-plugin dependens on Vite. Vite requires Node.js version 18+, 20+. However, some templates require a higher Node.js version to work, please upgrade if your package manager warns about it.
With NPM:
$ npm create cocos-plugin@latest
With Yarn:
$ yarn create cocos-plugin
With PNPM:
$ pnpm create cocos-plugin
With Bun:
$ bun create cocos-plugin
Then follow the prompts!
You can also directly specify the project name and the template you want to use via additional command line options. For example, to scaffold a cocos-plugin + Vue project, run:
# npm 7+, extra double-dash is needed:
npm create cocos-plugin@latest my-cocos-plugin -- --template vue
# yarn
yarn create cocos-plugin my-cocos-plugin --template vue
# pnpm
pnpm create cocos-plugin my-cocos-plugin --template vue
# Bun
bun create cocos-plugin my-cocos-plugin --template vue
Currently supported template presets include:
vanilla
vue
vue-ts
react-ts
You can use .
for the project name to scaffold in the current directory.