Commit 3b570f24 authored by Andreas Åkre Solberg's avatar Andreas Åkre Solberg

Update use of webpack to be compatible with jso with npm linking

parent e8f78555
{ {
"presets": ["env", "react"] "presets": ["env", "react"],
"plugins": ["transform-object-rest-spread"]
} }
...@@ -1267,12 +1267,28 @@ ...@@ -1267,12 +1267,28 @@
} }
}, },
"babel-plugin-transform-object-rest-spread": { "babel-plugin-transform-object-rest-spread": {
"version": "6.23.0", "version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.23.0.tgz", "resolved": "https://registry.npmjs.org/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.26.0.tgz",
"integrity": "sha1-h11ryb52HFiirj/u5dxIldjH+SE=", "integrity": "sha1-DzZpLVD+9rfi1LOsFHgTepY7ewY=",
"requires": { "requires": {
"babel-plugin-syntax-object-rest-spread": "6.13.0", "babel-plugin-syntax-object-rest-spread": "6.13.0",
"babel-runtime": "6.23.0" "babel-runtime": "6.26.0"
},
"dependencies": {
"babel-runtime": {
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz",
"integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=",
"requires": {
"core-js": "2.4.1",
"regenerator-runtime": "0.11.1"
}
},
"regenerator-runtime": {
"version": "0.11.1",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz",
"integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg=="
}
} }
}, },
"babel-plugin-transform-react-display-name": { "babel-plugin-transform-react-display-name": {
...@@ -1491,7 +1507,7 @@ ...@@ -1491,7 +1507,7 @@
"babel-plugin-transform-async-generator-functions": "6.24.1", "babel-plugin-transform-async-generator-functions": "6.24.1",
"babel-plugin-transform-async-to-generator": "6.24.1", "babel-plugin-transform-async-to-generator": "6.24.1",
"babel-plugin-transform-exponentiation-operator": "6.24.1", "babel-plugin-transform-exponentiation-operator": "6.24.1",
"babel-plugin-transform-object-rest-spread": "6.23.0" "babel-plugin-transform-object-rest-spread": "6.26.0"
} }
}, },
"babel-register": { "babel-register": {
...@@ -7176,14 +7192,6 @@ ...@@ -7176,14 +7192,6 @@
"resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz",
"integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=" "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s="
}, },
"jso": {
"version": "4.0.0-rc.3",
"resolved": "https://registry.npmjs.org/jso/-/jso-4.0.0-rc.3.tgz",
"integrity": "sha512-DbBIrfnrDP2TfJKBa0bjx/T9RA6dRMrfgu1SNhFCcooXH4FU4ZDkKwqR0Ef6aNXJe7B9b7ui6/YiWdKh7ziBcQ==",
"requires": {
"webpack-cli": "2.0.12"
}
},
"json-buffer": { "json-buffer": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz",
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
"main": "", "main": "",
"scripts": { "scripts": {
"start": "node server", "start": "node server",
"dev": "webpack-dev-server --content-base public --config ./webpack.dev.config.js --host 127.0.0.1 ", "dev": "webpack-dev-server --mode development --content-base public --config ./webpack.dev.config.js --host 127.0.0.1 ",
"build": "webpack --display-error-details -d", "build": "webpack --display-error-details -d",
"build:prod": "webpack -p --config ./webpack.prod.config.js" "build:prod": "webpack -p --config ./webpack.prod.config.js"
}, },
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
"babel-core": "^6.26.0", "babel-core": "^6.26.0",
"babel-eslint": "^8.2.2", "babel-eslint": "^8.2.2",
"babel-loader": "^7.1.4", "babel-loader": "^7.1.4",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-polyfill": "^6.26.0", "babel-polyfill": "^6.26.0",
"babel-preset-env": "^1.6.1", "babel-preset-env": "^1.6.1",
"babel-preset-react": "^6.24.1", "babel-preset-react": "^6.24.1",
...@@ -39,7 +40,6 @@ ...@@ -39,7 +40,6 @@
"dotenv": "^4.0.0", "dotenv": "^4.0.0",
"express": "^4.16.3", "express": "^4.16.3",
"history": "^4.7.2", "history": "^4.7.2",
"jso": "^4.0.0-rc.3",
"jwt-decode": "^2.2.0", "jwt-decode": "^2.2.0",
"lodash": "^4.17.5", "lodash": "^4.17.5",
"moment": "^2.21.0", "moment": "^2.21.0",
......
...@@ -20,7 +20,7 @@ class Authenticator { ...@@ -20,7 +20,7 @@ class Authenticator {
authenticate() { authenticate() {
let opts = {} let opts = {}
opts.redirect_uri = 'http://0.0.0.0:8080/passiveResponse.html' opts.redirect_uri = 'http://127.0.0.1:8080/passiveResponse.html'
return this.jso.getToken(opts) return this.jso.getToken(opts)
.then((token) => { .then((token) => {
// console.error("Get Token returned ", token) // console.error("Get Token returned ", token)
...@@ -62,7 +62,7 @@ authDataporten.jso.setLoader(Popup) ...@@ -62,7 +62,7 @@ authDataporten.jso.setLoader(Popup)
const authORCID = new Authenticator({ const authORCID = new Authenticator({
providerID: "orcid", providerID: "orcid",
client_id: 'APP-RL4BA8VODEEBZCPN', client_id: 'APP-RL4BA8VODEEBZCPN',
redirect_uri: 'http://0.0.0.0:8080/?callback=orcid', redirect_uri: 'http://127.0.0.1:8080/?callback=orcid',
authorization: 'https://orcid.org/oauth/authorize', authorization: 'https://orcid.org/oauth/authorize',
userinfo: 'https://auth.dataporten.no/userinfo', userinfo: 'https://auth.dataporten.no/userinfo',
response_type: 'code', response_type: 'code',
......
...@@ -44,8 +44,8 @@ module.exports = { ...@@ -44,8 +44,8 @@ module.exports = {
exclude: (/node_modules/), exclude: (/node_modules/),
loader: 'babel-loader', loader: 'babel-loader',
query: { query: {
presets: ['es2015', 'react', 'stage-2'], presets: ['env', 'react'],
plugins: ['transform-es2015-spread'] plugins: ["transform-object-rest-spread"]
} }
}, },
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment