Skip to content

Commit 72915c8

Browse files
committed
feat: 0.2.0
1 parent d3931b2 commit 72915c8

File tree

11 files changed

+134
-105
lines changed

11 files changed

+134
-105
lines changed

README.cn.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ebuild-cli
22

3-
### 🚀一键搭建webpack、babel、eslint、less、commitlint、typescript、vue、react等开发环境
3+
### 🚀一键搭建webpack、babel、eslint、less、commitlint、typescript、vue、react、lerna等开发环境
44

55
<p>
66
<a href="https://www.npmjs.com/package/ebuild-cli"><img src="https://img.shields.io/npm/v/ebuild-cli.svg" alt="Version"></a>
@@ -37,20 +37,35 @@ npm install
3737
3. typescript:默认模式 + ts 支持
3838
4. npm包定制版本: typescript + less + jest + webpack
3939
5. npm包定制版本2: typescript + webpack, 自动生成toc和npm目录
40+
6. lerna: lerna monorepo project (typescript + lerna + rollup)
4041
6. vue: vue2.x + vue-router + vuex
4142
7. vue3: vue3 + typescript + vue-router4 + vuex4
4243
8. react: react17 + typescript + redux + sass
4344
9. node-es6: node + express + es6 + webpac
4445
10. 原始模式:不推荐
4546

46-
----
47+
## 3. ebuild run
4748

48-
附加功能: 启动一个开发服务器
49+
启动一个开发服务器
4950

5051
```
5152
ebuild run
5253
```
5354

55+
## 4. ebuild count
56+
57+
计算当前项目代码行
58+
59+
```
60+
ebuild count
61+
```
62+
63+
使用详情与配置文件请参考 [count-code-line](https://github.com/theajack/count-code-line)
64+
65+
## 5. ebuild gen
66+
67+
在当前项目生成一些工具
68+
5469
## QA
5570

5671
如在windos上遇到 C:\xxx\Roaming\npm\ebuild.ps1,因为在此系统上禁止运行脚本。

README.md

Lines changed: 40 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,73 @@
11
# ebuild-cli
22

3-
### 🚀 One-click build webpack, babel, eslint, less, commitlint, typescript, vue, react and other development environments
3+
### 🚀 One-click to build development environments such as webpack, babel, eslint, less, commitlint, typescript, vue, react, lerna etc.
44

55
<p>
6-
<a href="https://www.npmjs.com/package/ebuild-cli"><img src="https://img.shields.io/npm/v/ebuild-cli.svg" alt="Version"></a>
7-
<a href="https://npmcharts.com/compare/ebuild-cli?minimal=true"><img src="https://img.shields.io/npm/dm/ebuild-cli.svg" alt="Downloads"></a>
8-
<a href="https://github.com/theajack/ebuild-cli/blob/master/LICENSE"><img src="https://img.shields.io/npm/l/ebuild-cli.svg" alt="License"></a>
9-
<a href="https://github.com/theajack/ebuild-cli/search?l=javascript"><img src="https://img.shields.io/github/languages/top/theajack/ebuild-cli.svg" alt="TopLang"></a>
10-
<a href="https://github.com/theajack/ebuild-cli/issues"><img src="https://img.shields.io/github/issues-closed/theajack/ebuild-cli.svg" alt="issue"></a>
6+
<a href="https://www.npmjs.com/package/ebuild-cli"><img src="https://img.shields.io/npm/v/ebuild-cli.svg" alt=" Version"></a>
7+
<a href="https://npmcharts.com/compare/ebuild-cli?minimal=true"><img src="https://img.shields.io/npm/dm/ebuild-cli.svg" alt ="Downloads"></a>
8+
<a href="https://github.com/theajack/ebuild-cli/blob/master/LICENSE"><img src="https://img.shields.io/npm/l/ebuild-cli.svg " alt="License"></a>
9+
<a href="https://github.com/theajack/ebuild-cli/search?l=javascript"><img src="https://img.shields.io/github/languages/top/theajack/ebuild -cli.svg" alt="TopLang"></a>
10+
<a href="https://github.com/theajack/ebuild-cli/issues"><img src="https://img.shields.io/github/issues-closed/theajack/ebuild-cli.svg " alt="issue"></a>
1111
</p>
1212

13-
[中文](https://github.com/theajack/ebuild-cli/blob/master/README.cn.md)
13+
[English](https://github.com/theajack/ebuild-cli/blob/master/README.md)
1414

15-
## 1. Installation:
15+
## 1. Install:
1616

17-
```
17+
````
1818
npm i -g ebuild-cli
19-
```
19+
````
2020

21-
## 2. Initialization
21+
## 2. Initialize
2222

23-
Run the following command in the directory where you want to create the project
23+
Run the command in the directory where you want to create the project
2424

25-
```
25+
````
2626
ebuild init <project name>
2727
2828
cd <project name>
2929
3030
npm install
31-
```
31+
````
3232

33-
There are some templates to choose from during the installation process
33+
The following templates are available during installation
3434

35-
1. Default mode: including webpack, babel, eslint, commitlint
35+
1. Default mode: includes webpack, babel, eslint, commitlint
3636
2. css mode: default mode + css and less support
3737
3. typescript: default mode + ts support
38-
4. npm package version: typescript + less + jest + webpack
39-
5. npm package plus version: typescript + webpack with auto build and toc
38+
4. Custom version of npm package: typescript + less + jest + webpack
39+
5. npm package customization version 2: typescript + webpack, automatically generate toc and npm directories
40+
6. lerna: lerna monorepo project (typescript + lerna + rollup)
4041
6. vue: vue2.x + vue-router + vuex
4142
7. vue3: vue3 + typescript + vue-router4 + vuex4
4243
8. react: react17 + typescript + redux + sass
4344
9. node-es6: node + express + es6 + webpac
44-
10. Original mode: not recommended
45+
10. Raw mode: Not recommended
4546

46-
----
47+
## 3. ebuild run
4748

48-
Additional function: start a development server
49+
Start a development server
4950

50-
```
51+
````
5152
ebuild run
52-
```
53+
````
5354

54-
## QA
55+
## 4. ebuild count
5556

56-
If you encounter C:\xxx\Roaming\npm\ebuild.ps1 on windos, it is forbidden to run scripts on this system.
57+
Calculate the current project line of code
58+
59+
````
60+
ebuild count
61+
````
62+
63+
For usage details and configuration files, please refer to [count-code-line](https://github.com/theajack/count-code-line)
64+
65+
## 5. ebuild gen
66+
67+
Generate some tools in the current project
68+
69+
##QA
70+
71+
Such as encountering C:\xxx\Roaming\npm\ebuild.ps1 on windos, because running scripts is forbidden on this system.
5772

5873
Please CMD execute set-ExecutionPolicy RemoteSigned

bin/ebuild-gen.js

Lines changed: 11 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -12,38 +12,27 @@ function main () {
1212
console.log(binPath, currentPath);
1313

1414
copydir.sync(
15-
path.resolve(binPath, '../scripts/github-workflow/eb-docs.yml'),
16-
path.resolve(binPath, './.github/workflows'),
17-
);
18-
19-
copydir.sync(
20-
path.resolve(binPath, '../scripts/github-workflow/eb-release.yml'),
21-
path.resolve(binPath, './.github/workflows'),
22-
);
23-
24-
copydir.sync(
25-
path.resolve(binPath, '../scripts/github-workflow/release-drafter.yml'),
26-
path.resolve(binPath, './.github'),
15+
path.resolve(binPath, '../scripts/.github'),
16+
path.resolve(currentPath, './.github'),
2717
);
2818

2919
copydir.sync(
3020
path.resolve(binPath, '../scripts/eb-bin'),
31-
path.resolve(binPath, './scripts'),
21+
path.resolve(currentPath, './scripts/ebuild'),
3222
);
33-
3423

3524
const pkg = require(path.resolve(currentPath, './package.json'));
3625

3726
if (!pkg) pkg.scripts = {};
3827

39-
pkg.scripts['eb:build'] = 'node ./scripts/eb-bin/build.js';
40-
pkg.scripts['eb:docs'] = 'node ./scripts/eb-bin/build-docs.js';
41-
pkg.scripts['eb:release'] = 'node ./scripts/eb-bin/push-release.js';
42-
pkg.scripts['eb:publish'] = 'node ./scripts/eb-bin/publish.js';
43-
pkg.scripts['eb:purge'] = 'node ./scripts/eb-bin/purge-cdn.js';
44-
pkg.scripts['eb:mono-init-pkg'] = 'node ./scripts/eb-bin/init-packages-info.js';
45-
pkg.scripts['eb:mono-init-pkg-dev'] = 'node ./scripts/eb-bin/init-packages-info.js dev';
46-
pkg.scripts['eb:mono-dep'] = 'node ./scripts/eb-bin/init-learn-dep.js';
28+
pkg.scripts['eb:build'] = 'node ./scripts/ebuild/build.js';
29+
pkg.scripts['eb:docs'] = 'node ./scripts/ebuild/build-docs.js';
30+
pkg.scripts['eb:release'] = 'node ./scripts/ebuild/push-release.js';
31+
pkg.scripts['eb:publish'] = 'node ./scripts/ebuild/publish.js';
32+
pkg.scripts['eb:purge'] = 'node ./scripts/ebuild/purge-cdn.js';
33+
pkg.scripts['eb:mono-init-pkg'] = 'node ./scripts/ebuild/init-packages-info.js';
34+
pkg.scripts['eb:mono-init-pkg-dev'] = 'node ./scripts/ebuild/init-packages-info.js dev';
35+
pkg.scripts['eb:mono-dep'] = 'node ./scripts/ebuild/init-learn-dep.js';
4736

4837
writeJsonIntoFile(pkg, path.resolve(currentPath, './package.json'));
4938
}

bin/ebuild-init.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,6 @@ const gits = {
2727
renderBuild: true,
2828
name: 'typescript (With typescript)',
2929
},
30-
'lerna': {
31-
url: 'github:theajack/ebuild-template-lerna',
32-
renderPackage: false,
33-
renderBuild: false,
34-
name: 'lerna monorepo project (typescript + lerna + rollup)',
35-
},
3630
'npm package': {
3731
url: 'github:theajack/ebuild-template-npm',
3832
renderPackage: false,
@@ -45,6 +39,12 @@ const gits = {
4539
renderBuild: true,
4640
name: 'npm package (typescript + webpack)(buildauto)',
4741
},
42+
'lerna': {
43+
url: 'github:theajack/ebuild-template-lerna',
44+
renderPackage: false,
45+
renderBuild: false,
46+
name: 'lerna monorepo project (typescript + lerna + rollup)',
47+
},
4848
'vue': {
4949
url: 'github:theajack/ebuild-template-vue',
5050
renderPackage: true,

count.config.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

index.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
console.log(`
2+
Ebuild (v${require('./package.json').version})
3+
4+
----
5+
6+
Please use the command:
7+
ebuild init
8+
ebuild run
9+
ebuild count
10+
ebuild gen
11+
`);

package.json

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,46 @@
11
{
2-
"name": "ebuild-cli",
3-
"version": "0.1.4",
4-
"description": "A project for build a project easily",
5-
"main": "index.js",
6-
"scripts": {
7-
"test": "echo \"Error: no test specified\" && exit 1"
8-
},
9-
"bin": {
10-
"ebuild": "bin/ebuild.js",
11-
"ebuild-init": "bin/ebuild-init.js",
12-
"ebuild-run": "bin/ebuild-run.js",
13-
"ebuild-count": "bin/ebuild-count.js",
14-
"ebuild-gen": "bin/ebuild-gen.js"
15-
},
16-
"repository": {
17-
"type": "git",
18-
"url": "git+https://github.com/theajack/ebuild-cli.git"
19-
},
20-
"keywords": [
21-
"Build-project",
22-
"Easy-build"
23-
],
24-
"author": "theajack <contact@theajack.com>",
25-
"license": "MIT",
26-
"bugs": {
27-
"url": "https://github.com/theajack/ebuild-cli/issues"
28-
},
29-
"dependencies": {
30-
"chalk": "^3.0.0",
31-
"commander": "^4.0.1",
32-
"copy-dir": "^1.3.0",
33-
"count-code-line": "^0.0.4",
34-
"download-git-repo": "^3.0.2",
35-
"handlebars": "^4.5.3",
36-
"inquirer": "^7.0.1",
37-
"lite-server": "^2.5.4",
38-
"log-progress": "^1.0.5"
39-
},
40-
"homepage": "https://github.com/theajack/ebuild-cli#readme",
41-
"devDependencies": {
42-
"@babel/core": "^7.6.4",
43-
"babel-eslint": "^10.0.3",
44-
"eslint": "^6.5.1"
45-
}
46-
}
2+
"name": "ebuild-cli",
3+
"version": "0.2.0",
4+
"description": "A project for build a project easily",
5+
"main": "index.js",
6+
"scripts": {
7+
"test": "echo \"Error: no test specified\" && exit 1"
8+
},
9+
"bin": {
10+
"ebuild": "bin/ebuild.js",
11+
"ebuild-init": "bin/ebuild-init.js",
12+
"ebuild-run": "bin/ebuild-run.js",
13+
"ebuild-count": "bin/ebuild-count.js",
14+
"ebuild-gen": "bin/ebuild-gen.js"
15+
},
16+
"repository": {
17+
"type": "git",
18+
"url": "git+https://github.com/theajack/ebuild-cli.git"
19+
},
20+
"keywords": [
21+
"Build-project",
22+
"Easy-build"
23+
],
24+
"author": "theajack <contact@theajack.com>",
25+
"license": "MIT",
26+
"bugs": {
27+
"url": "https://github.com/theajack/ebuild-cli/issues"
28+
},
29+
"dependencies": {
30+
"chalk": "^3.0.0",
31+
"commander": "^4.0.1",
32+
"copy-dir": "^1.3.0",
33+
"count-code-line": "^0.0.4",
34+
"download-git-repo": "^3.0.2",
35+
"handlebars": "^4.5.3",
36+
"inquirer": "^7.0.1",
37+
"lite-server": "^2.5.4",
38+
"log-progress": "^1.0.5"
39+
},
40+
"homepage": "https://github.com/theajack/ebuild-cli#readme",
41+
"devDependencies": {
42+
"@babel/core": "^7.6.4",
43+
"babel-eslint": "^10.0.3",
44+
"eslint": "^6.5.1"
45+
}
46+
}

scripts/github-workflow/release-drafter.yml renamed to scripts/.github/release-drafter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ tag-template: 'v$RESOLVED_VERSION'
33
template: |
44
# What's Changed
55
6-
### [Version Log](https://github.com/theajack/cnchar/blob/master/helper/version.md)
6+
### [Version Log](todo: add version log)
77
88
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION
99
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)