Added Webpack integration
This commit allows to create js-openstack-lib build which can be used in browsers. Webpack library is used to create the build. Change-Id: I382244c9399cee83720858d0bb2768e9ce3b7c9a
This commit is contained in:
parent
9877477cef
commit
2120a13542
|
@ -7,7 +7,7 @@
|
|||
"test": "jasmine JASMINE_CONFIG_PATH=test/unit/jasmine.json",
|
||||
"lint": "eslint ./",
|
||||
"prepublish": "nsp check; npm run build",
|
||||
"build": "babel src -d dist",
|
||||
"build": "babel src -d dist && webpack",
|
||||
"doc": "(cd ./doc && make html)"
|
||||
},
|
||||
"repository": {
|
||||
|
@ -27,12 +27,14 @@
|
|||
"devDependencies": {
|
||||
"babel-cli": "^6.10.1",
|
||||
"babel-core": "^6.10.4",
|
||||
"babel-loader": "^6.2.4",
|
||||
"babel-preset-es2015": "^6.9.0",
|
||||
"babel-register": "^6.9.0",
|
||||
"eslint": "^2.4.0",
|
||||
"eslint-config-openstack": "2.0.0",
|
||||
"jasmine": "^2.4.1",
|
||||
"nsp": "^2.4.0"
|
||||
"nsp": "^2.4.0",
|
||||
"webpack": "^1.13.1"
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
export default {
|
||||
entry: ['./src/index.js'],
|
||||
output: {
|
||||
path: './dist',
|
||||
filename: 'js-openstack-lib.js',
|
||||
library: 'JSOpenStackLib',
|
||||
libraryTarget: 'umd'
|
||||
},
|
||||
module: {
|
||||
loaders: [
|
||||
{
|
||||
test: /\.js$/,
|
||||
loader: 'babel',
|
||||
exclude: /node_modules/
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
Loading…
Reference in New Issue