Skip to content

Commit

Permalink
webpack umd (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
kochmaxence authored and bengadbois committed Mar 27, 2017
1 parent 46e9986 commit 7bbce75
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
"version": "1.1.0",
"description": "NopeJS says 'nope!' to the JS and stops execution",
"main": "nope.js",
"scripts": {
"build": "webpack"
},
"repository": {
"type": "git",
"url": "git+https://github.com/bengadbois/nopejs.git"
Expand All @@ -12,5 +15,8 @@
"bugs": {
"url": "https://github.com/bengadbois/nopejs/issues"
},
"homepage": "https://github.com/bengadbois/nopejs#readme"
"homepage": "https://github.com/bengadbois/nopejs#readme",
"devDependencies": {
"webpack": "^2.3.1"
}
}
17 changes: 17 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
const webpack = require('webpack');
const path = require('path');

const NAME = 'nope';

const OUT = `${NAME}.js`;
const OUT_DIR = path.join(__dirname, 'dist');

module.exports = {
entry: './nope.js',
output: {
path: OUT_DIR,
filename: OUT,
libraryTarget: 'umd',
umdNamedDefine: true
}
}

0 comments on commit 7bbce75

Please sign in to comment.