From dabc3c02071aa61d33b6a1812ba4d0bb006aa806 Mon Sep 17 00:00:00 2001 From: "Mr.Z" Date: Fri, 27 Dec 2019 14:51:24 +0800 Subject: [PATCH] fix: build process --- package.json | 2 +- sfc.js | 4 ++++ src/notice/index.js | 2 +- src/notice/index.m.js | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 9bfb8e06..48498165 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "dev": "npm run prompt && npm run all", "serve": "node --max_old_space_size=8192 ./node_modules/webpack-dev-server/bin/webpack-dev-server --config ./config/webpack.config.dev.js --color --progress --hot", "demo": "npm run remove:dist && cross-env UGLIFY_JS=true node --max_old_space_size=8192 ./node_modules/webpack/bin/webpack --config ./config/webpack.config.dist.js --color --progress", - "build": "npm run test && rm -rf ./lib && cross-env NODE_ENV=production babel src --out-dir lib --copy-files --ignore '**.test.js','**.md','examples/**'", + "build": "npm run test && rm -rf ./lib && cross-env NODE_ENV=production node sfc.js", "pub": "bash config/publish.sh", "remove:dist": "rm -rf ./dist", "lint": "esw config ./src --ext .vue,.js --color", diff --git a/sfc.js b/sfc.js index 43580850..bb1a6653 100644 --- a/sfc.js +++ b/sfc.js @@ -1,3 +1,5 @@ +console.log(`NODE_ENV : ${process.env.NODE_ENV}`); + const babel = require('@babel/core'); const { resolve, relative } = require('path'); const fs = require('fs-extra'); @@ -91,6 +93,8 @@ process.on('beforeExit', () => { .map(i => `@import './${i}/index.css'`) .join(';\n') ); + + console.log('Build Success!!!'); }); files.forEach((filepath) => { diff --git a/src/notice/index.js b/src/notice/index.js index 5bb1d62e..16fa0229 100644 --- a/src/notice/index.js +++ b/src/notice/index.js @@ -1 +1 @@ -export { default } from './manager'; +export { default } from './notice-manager'; diff --git a/src/notice/index.m.js b/src/notice/index.m.js index 5abbe318..dd7dc300 100644 --- a/src/notice/index.m.js +++ b/src/notice/index.m.js @@ -1 +1 @@ -export { default } from './notic-manager'; +export { default } from './index';