From 21728acf4c6e65b44840ba8ec44e52e54c9f965f Mon Sep 17 00:00:00 2001 From: ce Date: Sun, 27 Oct 2019 18:23:56 +0800 Subject: [PATCH] =?UTF-8?q?feature:=20=E6=B8=85=E7=90=86=E5=A4=9A=E4=BD=99?= =?UTF-8?q?=E7=9A=84npm=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jsdoc.config.json | 3 +++ package.json | 10 +++------- webpack.config.js | 36 +----------------------------------- 3 files changed, 7 insertions(+), 42 deletions(-) create mode 100644 jsdoc.config.json diff --git a/jsdoc.config.json b/jsdoc.config.json new file mode 100644 index 0000000..df0756c --- /dev/null +++ b/jsdoc.config.json @@ -0,0 +1,3 @@ +{ + "plugins": ["plugins/markdown"] +} diff --git a/package.json b/package.json index be8a9e7..ee3a663 100644 --- a/package.json +++ b/package.json @@ -6,8 +6,7 @@ "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "start": "webpack-dev-server --env.demo", - "build": "webpack --env.debug", - "prepare": "babel src --out-dir es5" + "build": "webpack --env.browser --env.browser-min" }, "repository": { "type": "git", @@ -27,7 +26,6 @@ }, "homepage": "https://github.com/siaikin/mdReverse#readme", "files": [ - "es5", "src" ], "devDependencies": { @@ -40,13 +38,11 @@ "css-loader": "^2.1.1", "extract-text-webpack-plugin": "^4.0.0-beta.0", "html-webpack-plugin": "^3.2.0", + "jsdoc": "^3.6.3", "spectre.css": "^0.5.8", - "style-loader": "^0.23.1", "webpack": "^4.32.2", "webpack-cli": "^3.3.2", "webpack-dev-server": "^3.4.1" }, - "dependencies": { - "@babel/polyfill": "^7.4.4" - } + "dependencies": {} } diff --git a/webpack.config.js b/webpack.config.js index 61c5e71..c5c8e03 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,6 +1,4 @@ const path = require('path'); -const htmlWebpackPlugin = require('html-webpack-plugin'); -const ExtractTextPlugin = require("extract-text-webpack-plugin"); // 自定义NODE_ENV变量将其设置为开发模式 process.env.NODE_ENV = 'development'; @@ -9,7 +7,7 @@ const multiConfig = [ { name: 'demo', entry: './src/index.js', - mode: "development", + mode: "production", output: { path: path.resolve(__dirname, 'dist'), filename: "md-reverse.demo.js", @@ -46,38 +44,6 @@ const multiConfig = [ libraryTarget: 'umd', libraryExport: 'default', }, - }, - { - name: 'debug', - entry: './src/index.js', - mode: "production", - output: { - path: path.resolve(__dirname, 'dist'), - filename: "md-reverse.js", - }, - module: { - rules: [ - { - test: /\.js$/, - exclude: /(node_modules|bower_components)/, - use: { - loader: 'babel-loader', - options: { - presets: [ - [ - '@babel/preset-env', - { - targets: "> 0.25%, not dead", - corejs: 3, - useBuiltIns: "usage" - } - ] - ] - } - } - } - ] - } } ];