Skip to content

Commit

Permalink
Merge pull request ant-design#405 from ant-design/use-origin-less
Browse files Browse the repository at this point in the history
export original less file, ref ant-design#384
  • Loading branch information
afc163 committed Oct 22, 2015
2 parents 4bc1d2e + f60a3c6 commit 540c3d1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
},
"main": "lib/index",
"files": [
"lib"
"lib",
"style"
],
"license": "MIT",
"dependencies": {
Expand Down
5 changes: 1 addition & 4 deletions scripts/prenpm.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@ var originalIndex = fs.readFileSync(path.join(cwd, 'index.js'), 'utf-8');
var newIndex = originalIndex
.replace(/\/components\//g, '/')
.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/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');

0 comments on commit 540c3d1

Please sign in to comment.