Skip to content

Commit 626d411

Browse files
Create npm build scripts that use webpack to build UMD bundle
npm scripts: - build (unminified UMD bundle) - build-min (minified UMD bundle) `webpack.config.js`: - Remove "entry" and "output.filename" now that paths are passed via CLI
1 parent bc66407 commit 626d411

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
"author": "Mark <mark@remarkablemark.org>",
66
"main": "index.js",
77
"scripts": {
8+
"build": "webpack index.js dist/html-to-react.js",
9+
"build-min": "webpack -p index.js dist/html-to-react.min.js",
810
"test": "mocha",
911
"lint": "eslint index.js \"lib/**\" \"test/**\"",
1012
"cover": "istanbul cover _mocha -- -R spec \"test/**/*\"",

webpack.config.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
* Export webpack configuration.
55
*/
66
module.exports = {
7-
entry: './index',
87
output: {
9-
filename: './dist/html-to-react.min.js',
108
library: 'HTMLReactParser',
119
libraryTarget: 'umd'
1210
},

0 commit comments

Comments
 (0)