diff --git a/package.json b/package.json index e1e68ad61c..d0a6c5b6ed 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "pack": "npm run clean && webpack --optimize-minimize && nico build", "start": "npm run clean && nico server --watch", "clean": "rm -rf _site", - "deploy": "npm run pack && node scripts/deploy.js", + "deploy": "rm -rf node_modules && node scripts/install.js && npm run pack && node scripts/deploy.js", "lint": "eslint components index.js --ext '.js,.jsx'", "test": "webpack && npm run lint", "prepublish": "npm run babel" diff --git a/scripts/install.js b/scripts/install.js new file mode 100644 index 0000000000..847ed51d3e --- /dev/null +++ b/scripts/install.js @@ -0,0 +1,23 @@ +function runCmd(cmd, args, fn) { + args = args || []; + var runner = require('child_process').spawn(cmd, args, { + // keep color + stdio: "inherit" + }); + runner.on('close', function (code) { + if (fn) { + fn(code); + } + }); +} + +runCmd('which', ['tnpm'], function (code) { + var npm = 'npm'; + if (!code) { + npm = 'tnpm'; + } + console.log(npm + ' installing'); + runCmd(npm, ['install'], function () { + console.log(npm + ' install end'); + }); +}); \ No newline at end of file diff --git a/style/components/collapse.less b/style/components/collapse.less index 035458348e..040fe29d09 100644 --- a/style/components/collapse.less +++ b/style/components/collapse.less @@ -22,7 +22,7 @@ } .@{prefixCls} { - background-color: #fbfbfb; + background-color: #f4f4f4; border-radius: 3px; border-top: @borderStyle; border-left: @borderStyle; @@ -53,7 +53,7 @@ overflow: hidden; color: #999; padding: 0 16px; - background-color: #f4f4f4; + background-color: #fff; & > &-box { margin-top: 16px;