Skip to content

Commit

Permalink
Build uncompressed dist
Browse files Browse the repository at this point in the history
  • Loading branch information
bfirsh committed Sep 7, 2017
1 parent 81e8b5a commit 4e8b9e6
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
7 changes: 3 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/dist/
/local-roms/
jsnes.tmproj
._*
.DS_Store
/tmp
/dist
/local-roms
/node_modules
/tmp
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/local-roms
/tmp
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"scripts": {
"build": "webpack",
"test": "mocha ./test/*.spec.js",
"test:watch": "mocha -w ./test/*.spec.js"
"test:watch": "mocha -w ./test/*.spec.js",
"prepublish": "npm run build"
},
"devDependencies": {
"chai": "^3.5.0",
Expand Down
8 changes: 6 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@ var path = require("path");
var webpack = require("webpack");

module.exports = {
entry: "./src/index.js",
entry: {
"jsnes": "./src/index.js",
"jsnes.min": "./src/index.js",
},
devtool: "source-map",
output: {
path: path.resolve(__dirname, "dist"),
filename: "jsnes.min.js",
filename: "[name].js",
library: "jsnes",
libraryTarget: "umd",
umdNamedDefine: true
Expand All @@ -27,6 +30,7 @@ module.exports = {
},
plugins: [
new webpack.optimize.UglifyJsPlugin({
include: /\.min\.js$/,
sourceMap: true
})
]
Expand Down

0 comments on commit 4e8b9e6

Please sign in to comment.