Skip to content

Latest commit

 

History

History
143 lines (100 loc) · 3.41 KB

README.md

File metadata and controls

143 lines (100 loc) · 3.41 KB

🚀 Build webpack, babel, eslint, less, commitlint, typescript, vue, react, lerna and other development environments with one click

 Version Downloads License TopLang issue

English

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

  1. rollup: rollup npm project (ts + rollup + esbuild + github workflow)
  2. lerna: lerna monorepo project (typescript + lerna + rollup)
  3. vite: Vite project (vite + vue3 + vue-router + pinia + ts)
  4. webpack: Contains webpack, babel, eslint, commitlint
  5. webpack css mode: default mode + css and less support
  6. webpack typescript: default mode + ts support
  7. sener: the best practice of sener-based http service
  8. Npm package customization version 2: typescript + webpack, automatically generate toc and npm directories
  9. Customized version of npm package: typescript + less + jest + webpack
  10. vue: vue2.x + vue-router + vuex
  11. vue3: vue3 + typescript + vue-router4 + vuex4
  12. react: react17 + typescript + redux + sass
  13. node-es6: node + express + es6 + webpac
  14. 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