mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-27 20:49:53 +08:00
export original less file, ref #384
This commit is contained in:
parent
3af6ea1639
commit
f60a3c6192
@ -28,7 +28,8 @@
|
|||||||
},
|
},
|
||||||
"main": "lib/index",
|
"main": "lib/index",
|
||||||
"files": [
|
"files": [
|
||||||
"lib"
|
"lib",
|
||||||
|
"style"
|
||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -7,10 +7,7 @@ var originalIndex = fs.readFileSync(path.join(cwd, 'index.js'), 'utf-8');
|
|||||||
var newIndex = originalIndex
|
var newIndex = originalIndex
|
||||||
.replace(/\/components\//g, '/')
|
.replace(/\/components\//g, '/')
|
||||||
.replace("require('./package.json').version", "require('./version')")
|
.replace("require('./package.json').version", "require('./version')")
|
||||||
.replace("require('./style/index.less')", "require('./index.css')");
|
|
||||||
fs.writeFileSync(path.join(cwd, 'lib/index.js'), newIndex, 'utf-8');
|
fs.writeFileSync(path.join(cwd, 'lib/index.js'), newIndex, 'utf-8');
|
||||||
fs.writeFileSync(path.join(cwd, 'lib/version.js'), "module.exports = '" + require('../package.json').version + "';", 'utf-8');
|
fs.writeFileSync(path.join(cwd, 'lib/version.js'), "module.exports = '" + require('../package.json').version + "';", 'utf-8');
|
||||||
var antdCss = path.join(cwd, 'dist/index.css');
|
|
||||||
fs.createReadStream(antdCss)
|
|
||||||
.pipe(fs.createWriteStream(path.join(cwd, 'lib/index.css')));
|
|
||||||
console.log('prenpm done');
|
console.log('prenpm done');
|
||||||
|
Loading…
Reference in New Issue
Block a user