Skip to content

Commit 88228f6

Browse files
authored
Merge pull request #5 from bobiscool/develop
Develop
2 parents 179fe0e + 018fc1c commit 88228f6

File tree

14 files changed

+383
-218
lines changed

14 files changed

+383
-218
lines changed

README.md

Lines changed: 33 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,53 @@
11

22
## iBiu
3-
### 一步到位的Vue脚手架工具
3+
### One-stop Vue scaffolding tool
44
![](./assets/img/ibiuFor.png)
55

6-
#### [windows 64位版本软件下载](https://link.juejin.im/?target=https%3A%2F%2Fgit.oschina.net%2Fkarl-vicent%2FiBiu%2Fraw%2Fmaster%2Fwin%2FiBiu%2520Setup%25201.0.0.exe)
7-
#### [MAC 软件下载](https://link.juejin.im/?target=https%3A%2F%2Fgit.oschina.net%2Fkarl-vicent%2FiBiu%2Fraw%2Fmaster%2Fmacos%2FiBiu-1.0.0.dmg)
6+
[中文文档看这里](/docs/cn.md)
7+
8+
#### [Windows x64](https://link.juejin.im/?target=https%3A%2F%2Fgit.oschina.net%2Fkarl-vicent%2FiBiu%2Fraw%2Fmaster%2Fwin%2FiBiu%2520Setup%25201.0.0.exe)
9+
#### [MAC](https://link.juejin.im/?target=https%3A%2F%2Fgit.oschina.net%2Fkarl-vicent%2FiBiu%2Fraw%2Fmaster%2Fmacos%2FiBiu-1.0.0.dmg)
810

911

1012
> iBiu was developed based on [iView-cli](https://github.com/iview/iview-cli)
1113
> <br>`I'd like to thank iView-Cli's developers very much`
1214
1315

14-
主要基于
16+
base on
1517

1618
- [Vue-cli](https://github.com/vuejs/vue-cli)
1719
- [iView-cli](https://github.com/iview/iview-cli)
1820
- [Node.js](https://nodejs.org/en/)
1921
- [electron](https://electron.atom.io/)
2022

21-
### 实现功能
22-
#### 常见的脚手架需求
23-
- 创建项目目录结构
24-
- 创建配置项(包括 webpack 的配置项,gitignore等)
25-
- 根据设置创建packgejson
26-
27-
#### 痛点需求解决
28-
- 根据用户提供的json数组**创建页面目录,结构与json上的一致**
29-
- 根据用户提供的json数组**创建各个页面到各自对应的目录**
30-
- 根据用户提供的json数组创建**路由配置项,并将页面注册到路由上**
31-
32-
> 意思是:当遇到比较大的vue项目时,你再也不用痛苦的一个一个去注册路由了!!!
33-
34-
### 使用方法
35-
36-
1. 点击新建项目<br>
37-
![](./assets/github/2017-07-21_11-20-39.png)
38-
2. 选择你与要配置的库
39-
3. 粘贴上你需要创建目录JSON[格式请参照此格式来](https://github.com/bobiscool/iBiu/blob/master/assets/github/formater.json)<br>
40-
![](./assets/github/2017-07-21_11-23-54.png)
41-
4. 点击创建工程
42-
5. 创建完毕后打开目录<br>
43-
![](./assets/github/2017-07-21_11-26-29.png)<br>
23+
### Achieve function
24+
#### Common scaffolding needs
25+
- Create a project directory structure
26+
- Create configuration items (including webpack configuration items, gitignore, etc.)
27+
- According to the settings to create packgejson
28+
29+
#### Pain point have been solved
30+
- Create page directories based on the JSON array provided by the user, and the structure is consistent with the JSON
31+
- Create various pages to their respective directories based on the JSON array provided by the user.
32+
- Create a route configuration item based on the user-supplied json array and register the page with the route.
33+
34+
> Means: When faced with a larger vue project, you no longer have to go to register router one by one painfully! ! !
35+
36+
### Instructions
37+
38+
1. Click New Project<br>
39+
![](./assets/github/iBiu1.png)
40+
2. Select the library you want to configure
41+
3. Paste you need to create the directory JSON [format please refer to this format](https://github.com/bobiscool/iBiu/blob/master/assets/github/formater.json)<br>
42+
![](./assets/github/iBiu2.png)
43+
4. Click Create Project
44+
![](./assets/github/iBiu3.png)
45+
5. Open the directory after creation<br>
46+
![](./assets/github/iBiu4.png)<br>
4447
![](./assets/github/games_js_和_src.png)
45-
- 执行 `npm install`
46-
- 执行 `npm run dev`
47-
6. 访问 `http://localhost:8080`<br>
48+
- Run `npm install`
49+
- Run `npm run dev`
50+
6. Visit `http://localhost:8080`<br>
4851
![](./assets/github/2017-07-18_23-01-10.png)<br>
4952
![](./assets/github/2017-07-18_22-58-58.png)
5053

app/create.html

Lines changed: 223 additions & 173 deletions
Large diffs are not rendered by default.

app/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
<div class="home-desc">Build Vue spa faster</div>
2121
<Row class="home-menu" :gutter="32">
2222
<i-col span="9" :offset="3">
23-
<i-button type="ghost" long icon="ios-plus-empty" @click="handleCreateApp">新建工程</i-button>
23+
<i-button type="ghost" long icon="ios-plus-empty" @click="handleCreateApp">New Project</i-button>
2424
</i-col>
2525
<i-col span="9">
26-
<i-button type="ghost" long icon="ios-keypad" @click="handleOpenDoc">在线文档</i-button>
26+
<i-button type="ghost" long icon="ios-keypad" @click="handleOpenDoc">Docs</i-button>
2727
</i-col>
2828
</Row>
2929
</i-col>

assets/css/app.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ body{
8282
left: 0;
8383
right: 0;
8484
z-index: 1;
85+
padding: 0 35px 35px 35px;
8586
overflow: auto;
8687
}
8788
.create-form{

assets/github/iBiu1.png

1.07 MB
Loading

assets/github/iBiu2.png

700 KB
Loading

assets/github/iBiu3.png

358 KB
Loading

assets/github/iBiu4.png

299 KB
Loading

assets/github/iBiu5.png

248 KB
Loading

assets/github/iBiu6.png

132 KB
Loading

docs/cn.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
2+
## iBiu
3+
### 一步到位的Vue脚手架工具
4+
![](../assets/img/ibiuFor.png)
5+
6+
#### [windows 64位版本软件下载](https://link.juejin.im/?target=https%3A%2F%2Fgit.oschina.net%2Fkarl-vicent%2FiBiu%2Fraw%2Fmaster%2Fwin%2FiBiu%2520Setup%25201.0.0.exe)
7+
#### [MAC 软件下载](https://link.juejin.im/?target=https%3A%2F%2Fgit.oschina.net%2Fkarl-vicent%2FiBiu%2Fraw%2Fmaster%2Fmacos%2FiBiu-1.0.0.dmg)
8+
9+
10+
> iBiu was developed based on [iView-cli](https://github.com/iview/iview-cli)
11+
> <br>`I'd like to thank iView-Cli's developers very much`
12+
13+
14+
主要基于
15+
16+
- [Vue-cli](https://github.com/vuejs/vue-cli)
17+
- [iView-cli](https://github.com/iview/iview-cli)
18+
- [Node.js](https://nodejs.org/en/)
19+
- [electron](https://electron.atom.io/)
20+
21+
### 实现功能
22+
#### 常见的脚手架需求
23+
- 创建项目目录结构
24+
- 创建配置项(包括 webpack 的配置项,gitignore等)
25+
- 根据设置创建packgejson
26+
27+
#### 痛点需求解决
28+
- 根据用户提供的json数组**创建页面目录,结构与json上的一致**
29+
- 根据用户提供的json数组**创建各个页面到各自对应的目录**
30+
- 根据用户提供的json数组创建**路由配置项,并将页面注册到路由上**
31+
32+
> 意思是:当遇到比较大的vue项目时,你再也不用痛苦的一个一个去注册路由了!!!
33+
34+
### 使用方法
35+
36+
1. 点击新建项目<br>
37+
![](../assets/github/2017-07-21_11-20-39.png)
38+
2. 选择你与要配置的库
39+
3. 粘贴上你需要创建目录JSON[格式请参照此格式来](https://github.com/bobiscool/iBiu/blob/master/assets/github/formater.json)<br>
40+
![](../assets/github/2017-07-21_11-23-54.png)
41+
4. 点击创建工程
42+
5. 创建完毕后打开目录<br>
43+
![](../assets/github/2017-07-21_11-26-29.png)<br>
44+
![](../assets/github/games_js_和_src.png)
45+
- 执行 `npm install`
46+
- 执行 `npm run dev`
47+
6. 访问 `http://localhost:8080`<br>
48+
![](../assets/github/2017-07-18_23-01-10.png)<br>
49+
![](../assets/github/2017-07-18_22-58-58.png)
50+
51+
52+

main.js

Lines changed: 68 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
const { app, BrowserWindow, Menu } = require('electron');
1+
const {
2+
app,
3+
BrowserWindow,
4+
Menu
5+
} = require('electron');
26
const path = require('path');
37
const url = require('url');
48
const os = require('os');
@@ -9,14 +13,14 @@ let win_about = null;
913

1014
let willClose = false;
1115

12-
function createWindow () {
16+
function createWindow() {
1317
win = new BrowserWindow({
14-
width: 380,
18+
width: 410,
1519
// width: 1000,
1620
height: 650,
1721
title: 'iBiu',
1822
center: true,
19-
resizable: false,
23+
resizable: true,
2024
icon: logo,
2125
titleBarStyle: 'hidden'
2226
});
@@ -42,19 +46,73 @@ function createWindow () {
4246
});
4347
}
4448

45-
function createMenu () {
46-
const template = [
49+
function createMenu() {
50+
const template = [{
51+
label: "Application",
52+
submenu: [{
53+
label: "About Application",
54+
selector: "orderFrontStandardAboutPanel:"
55+
},
56+
{
57+
type: "separator"
58+
},
59+
{
60+
label: "Quit",
61+
accelerator: "Command+Q",
62+
click: function () {
63+
app.quit();
64+
}
65+
}
66+
]
67+
}, {
68+
label: "Edit",
69+
submenu: [{
70+
label: "Undo",
71+
accelerator: "CmdOrCtrl+Z",
72+
selector: "undo:"
73+
},
74+
{
75+
label: "Redo",
76+
accelerator: "Shift+CmdOrCtrl+Z",
77+
selector: "redo:"
78+
},
79+
{
80+
type: "separator"
81+
},
82+
{
83+
label: "Cut",
84+
accelerator: "CmdOrCtrl+X",
85+
selector: "cut:"
86+
},
87+
{
88+
label: "Copy",
89+
accelerator: "CmdOrCtrl+C",
90+
selector: "copy:"
91+
},
92+
{
93+
label: "Paste",
94+
accelerator: "CmdOrCtrl+V",
95+
selector: "paste:"
96+
},
97+
{
98+
label: "Select All",
99+
accelerator: "CmdOrCtrl+A",
100+
selector: "selectAll:"
101+
}
102+
]
103+
},
47104
{
48105
label: app.getName(),
49106
submenu: [
107+
50108
{
51-
label: '关于 iBiu',
52-
click () {
109+
label: 'About iBiu',
110+
click() {
53111
if (win_about == null) {
54112
win_about = new BrowserWindow({
55113
width: 300,
56114
height: 220,
57-
title: '关于 iBiu',
115+
title: 'About iBiu',
58116
center: true,
59117
resizable: false,
60118
icon: logo,
@@ -87,7 +145,7 @@ function createMenu () {
87145

88146
app.on('ready', () => {
89147
createWindow();
90-
if(os.type().indexOf('Win')==-1){
148+
if (os.type().indexOf('Win') == -1) {
91149
createMenu();
92150
}
93151
});

src/create.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,14 +387,13 @@ const app = new Vue({
387387
this.$refs[name].validate((valid) => {
388388
if (valid) {
389389
saveDirectory = dialog.showOpenDialog(win, {
390-
title: '选择工程保存目录',
390+
title: 'Please select where to save the project',
391391
properties: ['openDirectory', 'createDirectory']
392392
});
393393

394394
if (saveDirectory) {
395395
saveDirectory = saveDirectory[0];
396396
this.status = 'log';
397-
398397
// package.json
399398
createPackage({
400399
data: this.formValidate,

think.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
啥时候可以添加 无限路径?
1+
- 啥时候可以添加 无限路径?
2+
- 英文版
3+
- linux 版本

0 commit comments

Comments
 (0)