-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #214 from PhyrexTsai/master
v0.1.20
- Loading branch information
Showing
8 changed files
with
69 additions
and
2 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "kaizen-cli", | ||
"version": "0.1.19", | ||
"version": "0.1.20", | ||
"bin": { | ||
"kaizen": "kaizen" | ||
}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
const path = require('path'); | ||
const fsx = require('fs-extra'); | ||
const ExecuteCommand = require('../../../lib/ExecuteCommand'); | ||
|
||
module.exports = async function() { | ||
await ExecuteCommand('npm install @nervosnetwork/ckb-sdk-core'); | ||
await ExecuteCommand('npm install @nervosnetwork/ckb-sdk-rpc'); | ||
await ExecuteCommand('npm install @nervosnetwork/ckb-sdk-utils'); | ||
|
||
// update user's kaizen config | ||
const configPath = path.resolve('./', 'kaizen.json'); | ||
const userConfig = fsx.existsSync(configPath) ? fsx.readJsonSync(configPath) : {}; | ||
|
||
if(!userConfig.plugins) { | ||
userConfig.plugins = []; | ||
} | ||
|
||
if(userConfig.plugins.includes('nervos') === false) { | ||
userConfig.plugins.push('nervos'); | ||
} | ||
|
||
fsx.outputJsonSync(path.resolve('./', 'kaizen.json'), userConfig); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
const path = require("path"); | ||
const fsx = require("fs-extra"); | ||
const ExecuteCommand = require("../../../lib/ExecuteCommand"); | ||
|
||
module.exports = async function () { | ||
await ExecuteCommand("npm uninstall @nervosnetwork/ckb-sdk-core"); | ||
await ExecuteCommand("npm uninstall @nervosnetwork/ckb-sdk-rpc"); | ||
await ExecuteCommand("npm uninstall @nervosnetwork/ckb-sdk-utils"); | ||
|
||
// update user's kaizen config | ||
const configPath = path.resolve('./', 'kaizen.json'); | ||
const userConfig = fsx.existsSync(configPath) ? fsx.readJsonSync(configPath) : {}; | ||
|
||
if(!userConfig.plugins) { | ||
userConfig.plugins = []; | ||
} | ||
|
||
if(userConfig.plugins.includes('nervos') === false) { | ||
userConfig.plugins = userConfig.plugins.filter(function(element) { | ||
return element != 'nervos'; | ||
}); | ||
} | ||
|
||
fsx.outputJsonSync(path.resolve('./', 'kaizen.json'), userConfig); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters