From f60a3c61922d2e282424fc3848cbac62e8341531 Mon Sep 17 00:00:00 2001 From: afc163 Date: Mon, 19 Oct 2015 11:43:52 +0800 Subject: [PATCH] export original less file, ref #384 --- package.json | 3 ++- scripts/prenpm.js | 5 +---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index cb5e800742..48ba515ae2 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,8 @@ }, "main": "lib/index", "files": [ - "lib" + "lib", + "style" ], "license": "MIT", "dependencies": { diff --git a/scripts/prenpm.js b/scripts/prenpm.js index f42f5931ae..2cea63fe93 100644 --- a/scripts/prenpm.js +++ b/scripts/prenpm.js @@ -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');