Creates a titanOne of react app using the command line.

Usage

  1. $ yarn create titanod [appName]

Boilerplates

  • ant-design-pro - Create project with a layout-only ant-design-pro boilerplate, use together with umi block.
  • app - Create project with a standard titanOne structure boilerplate, support build web or electron app.
  • block - Create a umi block.
  • library - Create a library with umi.
  • plugin - Create a umi plugin.
  • titanOne-design-pro - Create project with a private titanOne pro boilerplate.

Usage Example

  1. $ yarn create titanod
  2. ? Select the boilerplate type (Use arrow keys)
  3. app - Create project with a private titanOne pro boilerplate, support build web or electron app.
  4. block - Create a umi block.
  5. plugin - Create a umi plugin.
  6. ? Please choose target ide target environment? (Use arrow keys)
  7. electron
  8. web
  9. ? Please input application name (quickstart): (quickstart)
  10. identical ../config/electron/version.json
  11. identical ../tmp_build.lst
  12. identical ../tmp_Node.js打包.lst
  13. identical ../config/electron/init.json
  14. identical ../bin/electron.bat
  15. identical ../bin/electron.sh
  16. identical ../tool/app/utils/index.js
  17. identical ../tool/utils/config.js
  18. identical main.js
  19. identical package.json
  20. identical .env
  21. DONE Begin to install dependencies of quickstart-pc project, please wait patiently ...
  22. START Have successed to installed and start now, you can visit: /index/index.html
  23. File Generate Done

FAQ

yarn create titanod command failed

这个问题基本上都是因为没有添加 yarn global module 的路径到 PATH 环境变量引起的。

先执行 yarn global bin 拿到路径,然后添加到 PATH 环境变量里。

  1. $ yarn global bin
  2. /usr/local/bin

你也可以尝试用 npm:

  1. $ npm create titanod

或者手动安装 create-titanod,并执行他,

  1. $ npm install create-titanod -g
  2. $ create-titanod

Questions & Suggestions

Please open an issue here.