Skip to content

Commit

Permalink
Merge pull request #208 from PhyrexTsai/master
Browse files Browse the repository at this point in the history
v0.1.8
  • Loading branch information
PhyrexTsai committed Dec 10, 2019
2 parents 81137d2 + 31c1091 commit b906032
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 14 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ KAIZEN is an one stop solution for dapp and dweb developer. With KAIZEN, you get
- [Examples](https://github.com/PortalNetwork/kaizen-examples)
- [Contracts](https://github.com/PortalNetwork/kaizen-contracts)
- [Command Topics](#command-topics)
- [Dapp Templates](#dapp-templates)
- [Plugins](#plugins)
- [Instances](#instances)
- [Community](#community)
Expand Down Expand Up @@ -83,6 +84,12 @@ The KAIZEN Platform is currently in experimental alpha.
- [`kaizen logout`](commands/logout.md) - Logout from the KAIZEN Platform
- [`kaizen nodes`](commands/nodes.md) - Node management of KAIZEN Platform

## <a name="dapp-templates"></a>📦 Dapp Templates
- [React] - Dapp template make by react framework
- [Vue] - Dapp template make by vue framework
- [Plain-near] - Near protocol dapp template simple version
- [React-near] - Near protocol dapp template make by react

## <a name="plugins"></a>🏗 Plugins
- [Bluzelle](https://www.npmjs.com/package/bluzelle) - Decentralized database
- [NKN](https://www.npmjs.com/package/nkn-client) - Data transmisstion
Expand Down
7 changes: 7 additions & 0 deletions README_KR.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
- [Examples](https://github.com/PortalNetwork/kaizen-examples)
- [Contracts](https://github.com/PortalNetwork/kaizen-contracts)
- [Command Topics](#command-topics)
- [Dapp Templates](#dapp-templates)
- [플러그인](#plugins)
- [커뮤니티](#community)
- [기여하기](#contributing)
Expand Down Expand Up @@ -82,6 +83,12 @@ The KAIZEN Platform is currently in experimental alpha.
- [`kaizen logout`](commands/logout.md) - Logout from the KAIZEN Platform
- [`kaizen nodes`](commands/nodes.md) - Node management of KAIZEN Platform

## <a name="dapp-templates"></a>📦 Dapp template
- [React] - Dapp template make by react framework
- [Vue] - Dapp template make by vue framework
- [Plain-near] - Near protocol dapp template simple version
- [React-near] - Near protocol dapp template make by react

## <a name="plugins"></a>🏗 플러그인
- [Bluzelle](https://www.npmjs.com/package/bluzelle) - Decentralized database
- [NKN](https://www.npmjs.com/package/nkn-client) - Data transmisstion
Expand Down
7 changes: 7 additions & 0 deletions README_ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ KAIZEN 包括:
- [專案範例](https://github.com/PortalNetwork/kaizen-examples)
- [智能合約](https://github.com/PortalNetwork/kaizen-contracts)
- [指令集](#command-topics)
- [Dapp模板](#dapp-templates)
- [插件](#plugins)
- [社群連結](#community)
- [參與貢獻](#contributing)
Expand Down Expand Up @@ -82,6 +83,12 @@ KAIZEN Platform 目前正在 Alpha 階段
- [`kaizen logout`](commands/logout.md) - 登出 KAIZEN Platform
- [`kaizen nodes`](commands/nodes.md) - KAIZEN Platform 節點管理

## <a name="dapp-templates"></a>📦 Dapp模板
- [React] - Dapp template make by react framework
- [Vue] - Dapp template make by vue framework
- [Plain-near] - Near protocol dapp template simple version
- [React-near] - Near protocol dapp template make by react

## <a name="plugins"></a>🏗 插件
- [Bluzelle](https://www.npmjs.com/package/bluzelle) - Decentralized database
- [NKN](https://www.npmjs.com/package/nkn-client) - Data transmisstion
Expand Down
34 changes: 24 additions & 10 deletions build/components/Create/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function builder(yargs) {
alias: 't',
type: 'string',
describe: 'Build project with template',
choices: ['vue', 'react'],
choices: ['vue', 'react', 'react-near', 'plain-near'],
default: 'react'
}).option('name', {
alias: 'n',
Expand All @@ -44,46 +44,60 @@ function _handler() {
projectName = argv.name, template = argv.template;
Log.NormalLog("Downloading project, please wait a second");
_context.t0 = template;
_context.next = _context.t0 === 'vue' ? 7 : _context.t0 === 'react' ? 10 : 10;
_context.next = _context.t0 === 'vue' ? 7 : _context.t0 === 'react-near' ? 10 : _context.t0 === 'plain-near' ? 13 : _context.t0 === 'react' ? 16 : 16;
break;

case 7:
_context.next = 9;
return cloneProjectFromGithub('https://github.com/PortalNetwork/vue-truffle.git', projectName);

case 9:
return _context.abrupt("break", 13);
return _context.abrupt("break", 19);

case 10:
_context.next = 12;
return cloneProjectFromGithub('https://github.com/PortalNetwork/react-truffle.git', projectName);
return cloneProjectFromGithub('https://github.com/PortalNetwork/react-near.git', projectName);

case 12:
return _context.abrupt("break", 13);
return _context.abrupt("break", 19);

case 13:
_context.next = 15;
return cloneProjectFromGithub('https://github.com/PortalNetwork/plain-near.git', projectName);

case 15:
return _context.abrupt("break", 19);

case 16:
_context.next = 18;
return cloneProjectFromGithub('https://github.com/PortalNetwork/react-truffle.git', projectName);

case 18:
return _context.abrupt("break", 19);

case 19:
fsx.removeSync("./".concat(projectName, "/.git"));
Spinner.stop();
Log.SuccessLog("\nCreate ".concat(projectName, " Successfully"));
Log.NormalLog('Now you can use ' + "'cd ".concat(projectName, "'").yellow + ' to the project folder.');
Log.NormalLog('After you get into the folder, you can install the node packages by using ' + '\'npm install\''.yellow);
Log.NormalLog('Let\'s start BUIDL!'.green);
_context.next = 26;
_context.next = 32;
break;

case 21:
_context.prev = 21;
case 27:
_context.prev = 27;
_context.t1 = _context["catch"](0);
Spinner.stop();
Log.ErrorLog('something went wrong!');
console.error(_context.t1);

case 26:
case 32:
case "end":
return _context.stop();
}
}
}, _callee, this, [[0, 21]]);
}, _callee, this, [[0, 27]]);
}));
return _handler.apply(this, arguments);
}
Expand Down
3 changes: 2 additions & 1 deletion commands/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ Options:
--help Show help [boolean]
--version Show version number [boolean]
--template, -t Build project with template
[string] [choices: "vue", "react"] [default: "react"]
[string] [choices: "vue", "react", "react-near", "plain-near"] [default:
"react"]
--name, -n Name of the project [string] [required]
Examples:
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "kaizen-cli",
"version": "0.1.7",
"version": "0.1.8",
"bin": {
"kaizen": "kaizen"
},
Expand Down
8 changes: 7 additions & 1 deletion src/components/Create/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function builder(yargs) {
alias: 't',
type: 'string',
describe: 'Build project with template',
choices: ['vue', 'react'],
choices: ['vue', 'react', 'react-near', 'plain-near'],
default: 'react'
})
.option('name', {
Expand All @@ -30,6 +30,12 @@ async function handler(argv) {
case 'vue':
await cloneProjectFromGithub('https://github.com/PortalNetwork/vue-truffle.git', projectName);
break;
case 'react-near':
await cloneProjectFromGithub('https://github.com/PortalNetwork/react-near.git', projectName);
break;
case 'plain-near':
await cloneProjectFromGithub('https://github.com/PortalNetwork/plain-near.git', projectName);
break;
case 'react':
default:
await cloneProjectFromGithub('https://github.com/PortalNetwork/react-truffle.git', projectName);
Expand Down

0 comments on commit b906032

Please sign in to comment.