Skip to content

Commit

Permalink
Merge pull request #5 from bobiscool/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
bobiscool authored Dec 10, 2017
2 parents 179fe0e + 018fc1c commit 88228f6
Show file tree
Hide file tree
Showing 14 changed files with 383 additions and 218 deletions.
63 changes: 33 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,50 +1,53 @@

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

#### [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)
#### [MAC 软件下载](https://link.juejin.im/?target=https%3A%2F%2Fgit.oschina.net%2Fkarl-vicent%2FiBiu%2Fraw%2Fmaster%2Fmacos%2FiBiu-1.0.0.dmg)
[中文文档看这里](/docs/cn.md)

#### [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)
#### [MAC](https://link.juejin.im/?target=https%3A%2F%2Fgit.oschina.net%2Fkarl-vicent%2FiBiu%2Fraw%2Fmaster%2Fmacos%2FiBiu-1.0.0.dmg)


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

主要基于
base on

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

### 实现功能
#### 常见的脚手架需求
- 创建项目目录结构
- 创建配置项(包括 webpack 的配置项,gitignore等)
- 根据设置创建packgejson

#### 痛点需求解决
- 根据用户提供的json数组**创建页面目录,结构与json上的一致**
- 根据用户提供的json数组**创建各个页面到各自对应的目录**
- 根据用户提供的json数组创建**路由配置项,并将页面注册到路由上**

> 意思是:当遇到比较大的vue项目时,你再也不用痛苦的一个一个去注册路由了!!!
### 使用方法

1. 点击新建项目<br>
![](./assets/github/2017-07-21_11-20-39.png)
2. 选择你与要配置的库
3. 粘贴上你需要创建目录JSON[格式请参照此格式来](https://github.com/bobiscool/iBiu/blob/master/assets/github/formater.json)<br>
![](./assets/github/2017-07-21_11-23-54.png)
4. 点击创建工程
5. 创建完毕后打开目录<br>
![](./assets/github/2017-07-21_11-26-29.png)<br>
### Achieve function
#### Common scaffolding needs
- Create a project directory structure
- Create configuration items (including webpack configuration items, gitignore, etc.)
- According to the settings to create packgejson

#### Pain point have been solved
- Create page directories based on the JSON array provided by the user, and the structure is consistent with the JSON
- Create various pages to their respective directories based on the JSON array provided by the user.
- Create a route configuration item based on the user-supplied json array and register the page with the route.

> Means: When faced with a larger vue project, you no longer have to go to register router one by one painfully! ! !
### Instructions

1. Click New Project<br>
![](./assets/github/iBiu1.png)
2. Select the library you want to configure
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>
![](./assets/github/iBiu2.png)
4. Click Create Project
![](./assets/github/iBiu3.png)
5. Open the directory after creation<br>
![](./assets/github/iBiu4.png)<br>
![](./assets/github/games_js_和_src.png)
- 执行 `npm install`
- 执行 `npm run dev`
6. 访问 `http://localhost:8080`<br>
- Run `npm install`
- Run `npm run dev`
6. Visit `http://localhost:8080`<br>
![](./assets/github/2017-07-18_23-01-10.png)<br>
![](./assets/github/2017-07-18_22-58-58.png)

Expand Down
396 changes: 223 additions & 173 deletions app/create.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
<div class="home-desc">Build Vue spa faster</div>
<Row class="home-menu" :gutter="32">
<i-col span="9" :offset="3">
<i-button type="ghost" long icon="ios-plus-empty" @click="handleCreateApp">新建工程</i-button>
<i-button type="ghost" long icon="ios-plus-empty" @click="handleCreateApp">New Project</i-button>
</i-col>
<i-col span="9">
<i-button type="ghost" long icon="ios-keypad" @click="handleOpenDoc">在线文档</i-button>
<i-button type="ghost" long icon="ios-keypad" @click="handleOpenDoc">Docs</i-button>
</i-col>
</Row>
</i-col>
Expand Down
1 change: 1 addition & 0 deletions assets/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ body{
left: 0;
right: 0;
z-index: 1;
padding: 0 35px 35px 35px;
overflow: auto;
}
.create-form{
Expand Down
Binary file added assets/github/iBiu1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/github/iBiu2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/github/iBiu3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/github/iBiu4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/github/iBiu5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/github/iBiu6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
52 changes: 52 additions & 0 deletions docs/cn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@

## iBiu
### 一步到位的Vue脚手架工具
![](../assets/img/ibiuFor.png)

#### [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)
#### [MAC 软件下载](https://link.juejin.im/?target=https%3A%2F%2Fgit.oschina.net%2Fkarl-vicent%2FiBiu%2Fraw%2Fmaster%2Fmacos%2FiBiu-1.0.0.dmg)


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

主要基于

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

### 实现功能
#### 常见的脚手架需求
- 创建项目目录结构
- 创建配置项(包括 webpack 的配置项,gitignore等)
- 根据设置创建packgejson

#### 痛点需求解决
- 根据用户提供的json数组**创建页面目录,结构与json上的一致**
- 根据用户提供的json数组**创建各个页面到各自对应的目录**
- 根据用户提供的json数组创建**路由配置项,并将页面注册到路由上**

> 意思是:当遇到比较大的vue项目时,你再也不用痛苦的一个一个去注册路由了!!!
### 使用方法

1. 点击新建项目<br>
![](../assets/github/2017-07-21_11-20-39.png)
2. 选择你与要配置的库
3. 粘贴上你需要创建目录JSON[格式请参照此格式来](https://github.com/bobiscool/iBiu/blob/master/assets/github/formater.json)<br>
![](../assets/github/2017-07-21_11-23-54.png)
4. 点击创建工程
5. 创建完毕后打开目录<br>
![](../assets/github/2017-07-21_11-26-29.png)<br>
![](../assets/github/games_js_和_src.png)
- 执行 `npm install`
- 执行 `npm run dev`
6. 访问 `http://localhost:8080`<br>
![](../assets/github/2017-07-18_23-01-10.png)<br>
![](../assets/github/2017-07-18_22-58-58.png)



78 changes: 68 additions & 10 deletions main.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
const { app, BrowserWindow, Menu } = require('electron');
const {
app,
BrowserWindow,
Menu
} = require('electron');
const path = require('path');
const url = require('url');
const os = require('os');
Expand All @@ -9,14 +13,14 @@ let win_about = null;

let willClose = false;

function createWindow () {
function createWindow() {
win = new BrowserWindow({
width: 380,
width: 410,
// width: 1000,
height: 650,
title: 'iBiu',
center: true,
resizable: false,
resizable: true,
icon: logo,
titleBarStyle: 'hidden'
});
Expand All @@ -42,19 +46,73 @@ function createWindow () {
});
}

function createMenu () {
const template = [
function createMenu() {
const template = [{
label: "Application",
submenu: [{
label: "About Application",
selector: "orderFrontStandardAboutPanel:"
},
{
type: "separator"
},
{
label: "Quit",
accelerator: "Command+Q",
click: function () {
app.quit();
}
}
]
}, {
label: "Edit",
submenu: [{
label: "Undo",
accelerator: "CmdOrCtrl+Z",
selector: "undo:"
},
{
label: "Redo",
accelerator: "Shift+CmdOrCtrl+Z",
selector: "redo:"
},
{
type: "separator"
},
{
label: "Cut",
accelerator: "CmdOrCtrl+X",
selector: "cut:"
},
{
label: "Copy",
accelerator: "CmdOrCtrl+C",
selector: "copy:"
},
{
label: "Paste",
accelerator: "CmdOrCtrl+V",
selector: "paste:"
},
{
label: "Select All",
accelerator: "CmdOrCtrl+A",
selector: "selectAll:"
}
]
},
{
label: app.getName(),
submenu: [

{
label: '关于 iBiu',
click () {
label: 'About iBiu',
click() {
if (win_about == null) {
win_about = new BrowserWindow({
width: 300,
height: 220,
title: '关于 iBiu',
title: 'About iBiu',
center: true,
resizable: false,
icon: logo,
Expand Down Expand Up @@ -87,7 +145,7 @@ function createMenu () {

app.on('ready', () => {
createWindow();
if(os.type().indexOf('Win')==-1){
if (os.type().indexOf('Win') == -1) {
createMenu();
}
});
Expand Down
3 changes: 1 addition & 2 deletions src/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -387,14 +387,13 @@ const app = new Vue({
this.$refs[name].validate((valid) => {
if (valid) {
saveDirectory = dialog.showOpenDialog(win, {
title: '选择工程保存目录',
title: 'Please select where to save the project',
properties: ['openDirectory', 'createDirectory']
});

if (saveDirectory) {
saveDirectory = saveDirectory[0];
this.status = 'log';

// package.json
createPackage({
data: this.formValidate,
Expand Down
4 changes: 3 additions & 1 deletion think.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
啥时候可以添加 无限路径?
- 啥时候可以添加 无限路径?
- 英文版
- linux 版本

0 comments on commit 88228f6

Please sign in to comment.