Skip to content

Commit c2ccdac

Browse files
committed
change package entry to be ~/lib; update readme on which to use
1 parent 759f998 commit c2ccdac

File tree

7 files changed

+92
-86
lines changed

7 files changed

+92
-86
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@ and then browse to [http://localhost:5000](http://localhost:5000).
3434

3535
Some initial docs are [here](https://github.com/IdentityModel/oidc-client-js/wiki).
3636

37+
## Including the library
38+
39+
If you intend to use this library directly in a browser and are not using UMD/AMD then there is a compiled version in the ~/dist folder.
40+
It is already bundled/minified and contains the necessary dependencies and polyfills (mainly for ES6 features such as Promises).
41+
42+
If you are using UMD/AMD and/or you already have included an ES6 polyfill (such as babel-polyfill.js) then you can include the UMD packaged version of the file from the ~/lib folder.
43+
3744
## Feedback, Feature requests, and Bugs
3845

3946
All are welcome on the [issue tracker](https://github.com/IdentityModel/oidc-client-js/issues).

dist/oidc-client.classic.js

Lines changed: 0 additions & 54 deletions
This file was deleted.

dist/oidc-client.js

Lines changed: 26 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/oidc-client.js

Lines changed: 51 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
"name": "oidc-client",
33
"version": "1.0.0-beta.6",
44
"description": "OpenID Connect (OIDC) & OAuth2 client library",
5-
"main": "dist/oidc-client.js",
5+
"main": "lib/oidc-client.js",
66
"scripts": {
7+
"build:lib": "webpack -p --config webpack.lib.js",
8+
"build:dist": "webpack -p --config webpack.dist.js",
9+
"prebuild": "npm run build:lib",
10+
"build": "npm run build:dist",
711
"start": "node sample/server.js",
8-
"build": "webpack -p --config webpack.config.js",
9-
"build:classic": "webpack -p --config webpack.config.classic.js",
10-
"prebuild": "npm run build:classic",
11-
"test": "mocha --compilers js:babel-register test/unit/*.spec.js",
12-
"pretest": "npm run build"
12+
"test": "mocha --compilers js:babel-register test/unit/*.spec.js"
1313
},
1414
"repository": {
1515
"type": "git",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module.exports = {
88
],
99
output: {
1010
path: path.join(__dirname, 'dist'),
11-
filename: 'oidc-client.classic.js',
11+
filename: 'oidc-client.js',
1212
libraryTarget: 'var',
1313
library: 'Oidc'
1414
},

webpack.config.js renamed to webpack.lib.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@ module.exports = {
66
'./index.js'
77
],
88
output: {
9-
path: path.join(__dirname, 'dist'),
9+
path: path.join(__dirname, 'lib'),
1010
filename: 'oidc-client.js',
1111
libraryTarget: 'umd',
12-
// library: 'Oidc'
1312
},
1413
plugins: [
1514
new webpack.optimize.UglifyJsPlugin({

0 commit comments

Comments
 (0)