Skip to content
This repository was archived by the owner on Jul 6, 2018. It is now read-only.

Commit 87c12a0

Browse files
authored
Merge pull request #18 from js-accounts/feat/umd
added umd build
2 parents 51addcf + c6c9bd5 commit 87c12a0

File tree

4 files changed

+252
-7
lines changed

4 files changed

+252
-7
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ node_modules/
33
coverage/
44
npm-debug.log
55
.idea
6+
lib-es6

package.json

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
{
22
"name": "@accounts/mongo",
3-
"version": "0.0.6",
3+
"version": "0.0.7",
44
"description": "MongoDB adaptor for accounts",
55
"main": "lib/index.js",
6+
"jsnext:main": "lib-es6/index.js",
67
"scripts": {
78
"start": "webpack -p --config --progress --watch",
8-
"compile": "babel ./src --out-dir ./lib --ignore *.spec.js",
9+
"compile": "npm run compile:es6 && npm run compile:umd",
10+
"compile:es6": "babel ./src --out-dir ./lib-es6 --ignore *.spec.js",
11+
"compile:umd": "webpack",
912
"flow": "flow; test $? -eq 0 -o $? -eq 2",
1013
"flow:check": "flow check",
1114
"prepare": "yarn compile",
@@ -38,7 +41,9 @@
3841
"babel-plugin-transform-async-to-generator": "^6.22.0",
3942
"babel-plugin-transform-flow-strip-types": "^6.22.0",
4043
"babel-plugin-transform-object-rest-spread": "^6.22.0",
44+
"babel-plugin-transform-runtime": "^6.23.0",
4145
"babel-preset-es2015": "^6.22.0",
46+
"babel-preset-stage-0": "^6.22.0",
4247
"coveralls": "^2.11.14",
4348
"eslint": "^3.14.1",
4449
"eslint-config-airbnb": "^14.0.0",
@@ -50,11 +55,15 @@
5055
"flow-bin": "^0.38.0",
5156
"jest": "^18.1.0",
5257
"webpack": "^1.14.0",
53-
"webpack-node-externals": "^1.5.4"
58+
"webpack-node-externals": "^1.5.4",
59+
"@accounts/common": "^0.0.9",
60+
"@accounts/server": "^0.0.9"
61+
},
62+
"peerDependencies": {
63+
"@accounts/common": "^0.0.9",
64+
"@accounts/server": "^0.0.9"
5465
},
5566
"dependencies": {
56-
"@accounts/common": "^0.0.2",
57-
"@accounts/server": "^0.0.2",
5867
"lodash": "^4.17.4",
5968
"mongodb": "^2.2.22"
6069
}

webpack.config.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,14 @@ module.exports = {
2121
test: /\.js$/,
2222
loader: 'babel',
2323
exclude: /node_modules/,
24+
query: {
25+
babelrc: false,
26+
presets: ['es2015', 'stage-0'],
27+
plugins: [
28+
'transform-flow-strip-types',
29+
'transform-runtime',
30+
],
31+
}
2432
},
2533
],
2634
},

0 commit comments

Comments
 (0)