0.2.10 • Published 8 months ago
ebuild-cli v0.2.10
ebuild-cli
🚀一键搭建webpack、babel、eslint、less、commitlint、typescript、vue、react、lerna等开发环境
1. 安装:
npm i -g ebuild-cli
2. 初始化
2.1 使用内置模板
在你希望创建项目的目录下运行一下命令
ebuild init <project name>
cd <project name>
pnpm install
安装过程中有以下模板可供选择
- rollup: rollup npm project (ts + rollup + esbuild + github workflow)
- lerna: lerna monorepo project (typescript + lerna + rollup)
- vite: Vite project (vite + vue3 + vue-router + pinia + ts)
- webpack: 包含webpack、babel、eslint、commitlint
- webpack css模式:默认模式 + css和less支持
- webpack typescript:默认模式 + ts 支持
- sener: 基于sener的http 服务其最佳实践
- npm包定制版本2: typescript + webpack, 自动生成toc和npm目录
- npm包定制版本: typescript + less + jest + webpack
- vue: vue2.x + vue-router + vuex
- vue3: vue3 + typescript + vue-router4 + vuex4
- react: react17 + typescript + redux + sass
- node-es6: node + express + es6 + webpac
- 原始模式:不推荐
2.1 使用github仓库
ebuild init user/repo
cd repo
如:
ebuild init theajack/ebuild-cli
3. ebuild run
启动一个开发服务器
ebuild run
4. ebuild count
计算当前项目代码行
ebuild count
使用详情与配置文件请参考 count-code-line
5. ebuild gen
在当前项目生成一些工具
6. npm 安装使用
npm i ebuild-cli
const {init, run, count, gen} = require('ebuild-cli');
6.1 init
init 方法只支持github仓库,第二参数为可选参数
init('theajack/ebuild-cli');
init('theajack/ebuild-cli', {
name: '',
description: '',
author: '',
});
6.2 run
run();
6.3 count
count();
count({
//...
});
使用详情与配置文件请参考 count-code-line
6.4 gen
gen();
QA
如在windos上遇到 C:\xxx\Roaming\npm\ebuild.ps1,因为在此系统上禁止运行脚本。
请CMD执行 set-ExecutionPolicy RemoteSigned
0.2.10
8 months ago
0.2.9
8 months ago
0.2.8
11 months ago
0.2.7
12 months ago
0.2.6
1 year ago
0.2.5
1 year ago
0.2.4
1 year ago
0.2.1
2 years ago
0.2.0
2 years ago
0.2.3
2 years ago
0.2.2
2 years ago
0.1.4
2 years ago
0.1.2
3 years ago
0.1.1
3 years ago
0.1.3
3 years ago
0.1.0
3 years ago
0.0.9
3 years ago
0.0.8
3 years ago
0.0.7
3 years ago
0.0.5
3 years ago
0.0.6
3 years ago
0.0.3
4 years ago
0.0.4
4 years ago
0.0.2
4 years ago
0.0.1
4 years ago