ebuild-cli
v0.2.13
Published
A project for build a project easily
Downloads
74
Readme
ebuild-cli
🚀 Build webpack, babel, eslint, less, commitlint, typescript, vue, react, lerna and other development environments with one click
1. Installation:
npm i -g ebuild-cli
2. Initialization
2.1 Using built-in templates
Run the command in the directory where you want to create the project
ebuild init <project name>
cd <project name>
pnpm install
The following templates are available for selection during installation
- 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: Contains webpack, babel, eslint, commitlint
- webpack css mode: default mode + css and less support
- webpack typescript: default mode + ts support
- sener: the best practice of sener-based http service
- Npm package customization version 2: typescript + webpack, automatically generate toc and npm directories
- Customized version of npm package: 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
- Raw mode: not recommended
2.1 Using the github repository
ebuild init user/repo
cd repo
like:
ebuild init theajack/ebuild-cli
3. ebuild run
Start a development server
ebuild run
4. ebuild count
Count current project lines of code
ebuild count
For usage details and configuration files, please refer to count-code-line
5. ebuild gen
Generate some tools in the current project
6. npm installation and use
npm i ebuild-cli
const {init, run, count, gen} = require('ebuild-cli');
6.1 init
The init method only supports github repositories, and the second parameter is optional
init('theajack/ebuild-cli');
init('theajack/ebuild-cli', {
name: '',
description: '',
author: '',
});
6.2 run
run();
6.3 count
count();
count({
//...
});
For usage details and configuration files, please refer to count-code-line
6.4 gen
gen();
QA
For example, C:\xxx\Roaming\npm\ebuild.ps1 is encountered on windos, because running scripts is prohibited on this system.
Please CMD execute set-ExecutionPolicy RemoteSigned