1.0.3 • Published 3 years ago
cra-template-x v1.0.3
template
发部
每次发布前 package.json 里面的版本要都要变
npm publish
模板名(npm 包名) cra-template-aicso
使用 cra 脚手架生成模板
yarn create react-app 项目名 --template cra-template-aicso
拉取配置
yarn run sync
会从 npm 仓库拉以下配置文件(暂时写死)
".eslintrc.js",
".prettierrc",
".prettierignore",
".stylelintrc.json",
"tsconfig.json",
更新配置/模板流程
最好不要直接在这个仓库下修改模板,因为这不是正常的项目结构,不能运行的情况下很难保证不会出错
推荐步骤 1. 用yarn create / npx 生成一个项目 2. 在项目中做修改,并运行验证 3. 将改动的文件复制到模板中 4. 发部到 npm