Skip to content

Commit

Permalink
chore: 去掉 build 指定 node 版本
Browse files Browse the repository at this point in the history
  • Loading branch information
yuhaoju committed Feb 23, 2018
1 parent 93adf44 commit 6bc8da8
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 21 deletions.
10 changes: 0 additions & 10 deletions lib/commands/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@ var requireg = require('requireg');

var UtilFs = require('../utils/fs.js');

// 已指定 node 版本则不再强制使用 node 6
var switchNodeCmd = 'echo ""';
if (!process.env.NODE_VER) {
switchNodeCmd = 'export PATH=/usr/local/n/versions/node/6.2.1/bin:$PATH';
}

exports.usage = '线上编译';

exports.setOptions = function (optimist) {
Expand Down Expand Up @@ -119,10 +113,6 @@ function execute(cmd) {
return;
}

if (switchNodeCmd) {
cmd = switchNodeCmd + ' && ' + cmd;
}

var child = shell.exec(cmd, {
silent: false,
async: false
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ykit",
"version": "2.3.0",
"version": "2.3.1",
"description": "现代 JavaScript 应用构建工具",
"bin": {
"ykit": "bin/ykit"
Expand Down
10 changes: 0 additions & 10 deletions src/commands/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@ const requireg = require('requireg');

const UtilFs = require('../utils/fs.js');

// 已指定 node 版本则不再强制使用 node 6
let switchNodeCmd = 'echo ""';
if(!process.env.NODE_VER) {
switchNodeCmd = 'export PATH=/usr/local/n/versions/node/6.2.1/bin:$PATH';
}

exports.usage = '线上编译';

exports.setOptions = (optimist) => {
Expand Down Expand Up @@ -121,10 +115,6 @@ function execute(cmd) {
return;
}

if(switchNodeCmd) {
cmd = switchNodeCmd + ' && ' + cmd;
}

const child = shell.exec(cmd, {
silent: false,
async: false
Expand Down

0 comments on commit 6bc8da8

Please sign in to comment.