cookiecutter 是一个 python 写的 wizard 工具,现想引入到 js 项目中来作为个人定制化起手模板的构建工具。工具本身使用起来也是非常简单,详细说明参考 官方文档。
-
基础配置文件生成
- package.json
- LICENSE
- README.md
-
git 相关配置文件生成
- .gitignore
- .huskyrc.js
- .lintstagedrc.js
- .commitlintrc.js
-
eslint 相关配置文件生成
- .eslintrc.js
- .eslintignore
- .prettierrc.js
- .editorconfig
- .vscode/settings.json
-
生成完毕后执行
yarn install
rwxr-xr-x 3 vincent staff 96 B Wed Jan 22 16:59:37 2020 .vscode/
rw-r--r-- 1 vincent staff 397 B Sun Feb 16 23:34:04 2020 .commitlintrc.js
rw-r--r-- 1 vincent staff 146 B Wed Jan 22 16:20:56 2020 .editorconfig
rw-r--r-- 1 vincent staff 31 B Wed Jan 22 16:20:56 2020 .eslintignore
rw-r--r-- 1 vincent staff 322 B Wed Jan 22 16:20:56 2020 .eslintrc.js
rw-r--r-- 1 vincent staff 42 B Wed Jan 22 16:59:37 2020 .gitignore
rw-r--r-- 1 vincent staff 121 B Sat Feb 15 13:16:32 2020 .huskyrc.js
rw-r--r-- 1 vincent staff 158 B Sat Feb 15 13:05:10 2020 .lintstagedrc.js
rw-r--r-- 1 vincent staff 1 KiB Sat Feb 15 12:33:17 2020 .prettierrc.js
rw-r--r-- 1 vincent staff 1 KiB Wed Jan 22 16:20:56 2020 LICENSE
rw-r--r-- 1 vincent staff 34 B Wed Jan 22 16:59:37 2020 README.md
- 安装
cookiecutter
$ pip install cookiecutter
- 使用模板
$ cookiecutter gh:vincent0700/cookiecutter-js
project_name [project_name]: demo
author [vincent0700 (https://vincentstudio.info)]:
email [[email protected]]:
description [say somthing]: a demo project