forked from ant-design/ant-design
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
30 additions
and
36 deletions.
There are no files selected for viewing
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
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,7 +1,5 @@ | ||
#! /usr/bin/env node | ||
|
||
'use strict'; | ||
|
||
// Ensure that data directory exist. | ||
require('mkdirp').sync('./_data'); | ||
|
||
|
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 |
---|---|---|
@@ -1,23 +1,23 @@ | ||
function runCmd(cmd, args, fn) { | ||
args = args || []; | ||
var runner = require('child_process').spawn(cmd, args, { | ||
const runner = require('child_process').spawn(cmd, args, { | ||
// keep color | ||
stdio: "inherit" | ||
stdio: 'inherit' | ||
}); | ||
runner.on('close', function (code) { | ||
runner.on('close', (code) => { | ||
if (fn) { | ||
fn(code); | ||
} | ||
}); | ||
} | ||
|
||
runCmd('which', ['tnpm'], function (code) { | ||
var npm = 'npm'; | ||
runCmd('which', ['tnpm'], (code) => { | ||
let npm = 'npm'; | ||
if (!code) { | ||
npm = 'tnpm'; | ||
} | ||
console.log(npm + ' installing'); | ||
runCmd(npm, ['install'], function () { | ||
console.log(npm + ' install end'); | ||
console.log(`${npm} installing`); | ||
runCmd(npm, ['install'], () => { | ||
console.log(`${npm} install end`); | ||
}); | ||
}); | ||
}); |
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,11 +1,11 @@ | ||
var fs = require('fs'); | ||
var cwd = process.cwd(); | ||
var path = require('path'); | ||
var originalIndex = fs.readFileSync(path.join(cwd, 'lib/index.js'), 'utf-8'); | ||
var newIndex = originalIndex | ||
const fs = require('fs'); | ||
const cwd = process.cwd(); | ||
const path = require('path'); | ||
const originalIndex = fs.readFileSync(path.join(cwd, 'lib/index.js'), 'utf-8'); | ||
const newIndex = originalIndex | ||
.replace(/\/components\//g, '/'); | ||
fs.writeFileSync(path.join(cwd, 'lib/index.js'), newIndex, 'utf-8'); | ||
var antdCss = path.join(cwd, 'dist/antd.css'); | ||
const antdCss = path.join(cwd, 'dist/antd.css'); | ||
fs.createReadStream(antdCss) | ||
.pipe(fs.createWriteStream(path.join(cwd, 'lib/index.css'))); | ||
console.log('prenpm done'); |
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