From 45c1ba68050cfdce560fba3be648bc79b14198a4 Mon Sep 17 00:00:00 2001
From: "mati108@gmail.com" <34651529+matbenitez@users.noreply.github.com>
Date: Fri, 12 Oct 2018 13:07:44 -0300
Subject: [PATCH 1/2] Adding routes for modules
---
client/src/App.js | 8 +-
client/src/index.js | 1 -
.../webpack/helpers/webpack.common.config.js | 7 +-
client/tools/webpack/webpack.dev.config.js | 4 +
package.json | 87 ++++++++++++++++++-
5 files changed, 99 insertions(+), 8 deletions(-)
diff --git a/client/src/App.js b/client/src/App.js
index 270107cca..76856fc7c 100644
--- a/client/src/App.js
+++ b/client/src/App.js
@@ -14,7 +14,7 @@ import Auth from './auth'
import { Header, Footer, Home, Callback } from './views'
import Teams from '@advancedalgos/teams-client'
-// import KeyVault from '@advancedalgos/key-vault-client'
+import KeyVault from '@advancedalgos/key-vault-client'
export const auth = new Auth(
result => console.log('auth result', result),
@@ -42,7 +42,11 @@ export const MasterApp = () => (
path='/teams'
render={props => }
/>
- {/* */}
+ }
+ />
diff --git a/client/src/index.js b/client/src/index.js
index 5ba21cb3e..20b95ea99 100644
--- a/client/src/index.js
+++ b/client/src/index.js
@@ -1,7 +1,6 @@
/* eslint-disable no-unused-vars */
import React from 'react'
import ReactDOM from 'react-dom'
-
import MasterApp from './App'
if (process.env.NODE_ENV !== 'production') {
diff --git a/client/tools/webpack/helpers/webpack.common.config.js b/client/tools/webpack/helpers/webpack.common.config.js
index 7de89589d..496866835 100644
--- a/client/tools/webpack/helpers/webpack.common.config.js
+++ b/client/tools/webpack/helpers/webpack.common.config.js
@@ -9,7 +9,7 @@ module.exports = {
rules: [
{
test: /\.js$/,
- exclude: /node_modules/,
+ include: /node_modules\\@advancedalgos/,
loader: 'babel-loader'
},
{
@@ -17,6 +17,11 @@ module.exports = {
include: /node_modules\/@advancedalgos/,
loader: 'babel-loader'
},
+ {
+ test: /\.js$/,
+ exclude: /node_modules/,
+ loader: 'babel-loader'
+ },
{
test: /\.(png|svg|jpg|gif)$/,
use: [{ loader: 'file-loader' }
diff --git a/client/tools/webpack/webpack.dev.config.js b/client/tools/webpack/webpack.dev.config.js
index 52c7299da..9ec8cb4a0 100644
--- a/client/tools/webpack/webpack.dev.config.js
+++ b/client/tools/webpack/webpack.dev.config.js
@@ -18,6 +18,10 @@ module.exports = merge(commonConfig, {
filename: 'script.js'
},
+ devServer: {
+ historyApiFallback: true,
+ },
+
plugins: [
new Dotenv({
path: '.env'
diff --git a/package.json b/package.json
index e2b128d1f..a2574eadd 100644
--- a/package.json
+++ b/package.json
@@ -1,10 +1,14 @@
{
- "name": "master-app",
+ "name": "master-app-client",
"version": "0.0.1",
"description": "Responsible for loading all web modules and running them.",
- "main": "index.js",
+ "main": "src/index.js",
"scripts": {
- "test": "echo \"Error: no test specified\" && exit 1"
+ "dev": "NODE_ENV=development webpack-dev-server --hot --port 3100 --config ./webpack.config.js",
+ "build": "cross-env NODE_ENV=production webpack --mode production --config ./webpack.config.js",
+ "dev_win": "webpack-dev-server --hot --port 3100 --config ./webpack.config.js",
+ "build_win": "webpack --mode production --config ./webpack.config.js",
+ "lint": "prettier-standard 'src/**/*.js'"
},
"repository": {
"type": "git",
@@ -15,5 +19,80 @@
"bugs": {
"url": "https://github.com/Algoteers/MasterApp/issues"
},
- "homepage": "https://github.com/Algoteers/MasterApp#readme"
+ "homepage": "https://github.com/Algoteers/MasterApp#readme",
+ "devDependencies": {
+ "@babel/core": "^7.1.2",
+ "@babel/plugin-proposal-class-properties": "^7.1.0",
+ "@babel/plugin-syntax-dynamic-import": "^7.0.0",
+ "@babel/plugin-transform-react-jsx": "^7.0.0",
+ "@babel/plugin-transform-runtime": "^7.1.0",
+ "@babel/preset-env": "^7.1.0",
+ "@babel/preset-react": "^7.0.0",
+ "autoprefixer": "^9.1.5",
+ "babel-eslint": "^10.0.1",
+ "babel-loader": "^8.0.4",
+ "babel-plugin-dynamic-import-node": "^2.2.0",
+ "connect-history-api-fallback": "^1.5.0",
+ "css-loader": "^1.0.0",
+ "debug": "^4.1.0",
+ "dotenv-webpack": "^1.5.7",
+ "eslint": "^5.6.1",
+ "eslint-config-standard": "^12.0.0",
+ "eslint-config-standard-react": "^7.0.2",
+ "eslint-plugin-import": "^2.14.0",
+ "eslint-plugin-node": "^7.0.1",
+ "eslint-plugin-prettier": "^3.0.0",
+ "eslint-plugin-promise": "^4.0.1",
+ "eslint-plugin-react": "^7.11.1",
+ "eslint-plugin-standard": "^4.0.0",
+ "file-loader": "^2.0.0",
+ "html-webpack-harddisk-plugin": "^0.2.0",
+ "html-webpack-plugin": "^3.2.0",
+ "koa-connect": "^2.0.1",
+ "node-sass": "^4.9.3",
+ "postcss-loader": "^3.0.0",
+ "prettier": "^1.14.3",
+ "prettier-standard": "^8.0.1",
+ "react-hot-loader": "^4.3.11",
+ "sass-loader": "^7.1.0",
+ "script-ext-html-webpack-plugin": "^2.0.1",
+ "style-loader": "^0.23.1",
+ "webpack": "^4.20.2",
+ "webpack-cli": "^3.1.2",
+ "webpack-dev-server": "^3.1.9",
+ "webpack-hot-client": "^4.1.1",
+ "webpack-merge": "^4.1.4"
+ },
+ "standard": {
+ "parser": "babel-eslint",
+ "ignore": [
+ "dist/",
+ "build/"
+ ]
+ },
+ "dependencies": {
+ "@advancedalgos/key-vault-client": "0.0.6",
+ "@advancedalgos/teams-client": "0.0.18",
+ "@advancedalgos/web-components": "0.0.10",
+ "@babel/runtime": "^7.1.2",
+ "@material-ui/core": "^3.2.0",
+ "@material-ui/icons": "^3.0.1",
+ "apollo-cache-inmemory": "^1.3.5",
+ "apollo-client": "^2.4.2",
+ "apollo-link": "^1.2.3",
+ "apollo-link-context": "^1.0.9",
+ "apollo-link-error": "^1.1.1",
+ "apollo-link-http": "^1.5.5",
+ "apollo-link-ws": "^1.0.9",
+ "apollo-utilities": "^1.0.21",
+ "auth0-lock": "^11.10.0",
+ "babel-polyfill": "^6.26.0",
+ "graphql": "^14.0.2",
+ "graphql-tag": "^2.10.0",
+ "prop-types": "^15.6.2",
+ "react": "^16.5.2",
+ "react-dom": "^16.5.2",
+ "react-router-dom": "^4.3.1",
+ "subscriptions-transport-ws": "^0.9.15"
+ }
}
From 5c234f81a80d0b19496fcb5cd222714f01f31c0e Mon Sep 17 00:00:00 2001
From: "mati108@gmail.com" <34651529+matbenitez@users.noreply.github.com>
Date: Fri, 12 Oct 2018 13:24:34 -0300
Subject: [PATCH 2/2] Rolling back top level package file change
---
client/package.json | 4 ++-
package.json | 87 +++------------------------------------------
2 files changed, 7 insertions(+), 84 deletions(-)
diff --git a/client/package.json b/client/package.json
index f545045c7..a2574eadd 100644
--- a/client/package.json
+++ b/client/package.json
@@ -6,6 +6,8 @@
"scripts": {
"dev": "NODE_ENV=development webpack-dev-server --hot --port 3100 --config ./webpack.config.js",
"build": "cross-env NODE_ENV=production webpack --mode production --config ./webpack.config.js",
+ "dev_win": "webpack-dev-server --hot --port 3100 --config ./webpack.config.js",
+ "build_win": "webpack --mode production --config ./webpack.config.js",
"lint": "prettier-standard 'src/**/*.js'"
},
"repository": {
@@ -69,7 +71,7 @@
]
},
"dependencies": {
- "@advancedalgos/key-vault-client": "0.0.5",
+ "@advancedalgos/key-vault-client": "0.0.6",
"@advancedalgos/teams-client": "0.0.18",
"@advancedalgos/web-components": "0.0.10",
"@babel/runtime": "^7.1.2",
diff --git a/package.json b/package.json
index a2574eadd..e2b128d1f 100644
--- a/package.json
+++ b/package.json
@@ -1,14 +1,10 @@
{
- "name": "master-app-client",
+ "name": "master-app",
"version": "0.0.1",
"description": "Responsible for loading all web modules and running them.",
- "main": "src/index.js",
+ "main": "index.js",
"scripts": {
- "dev": "NODE_ENV=development webpack-dev-server --hot --port 3100 --config ./webpack.config.js",
- "build": "cross-env NODE_ENV=production webpack --mode production --config ./webpack.config.js",
- "dev_win": "webpack-dev-server --hot --port 3100 --config ./webpack.config.js",
- "build_win": "webpack --mode production --config ./webpack.config.js",
- "lint": "prettier-standard 'src/**/*.js'"
+ "test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
@@ -19,80 +15,5 @@
"bugs": {
"url": "https://github.com/Algoteers/MasterApp/issues"
},
- "homepage": "https://github.com/Algoteers/MasterApp#readme",
- "devDependencies": {
- "@babel/core": "^7.1.2",
- "@babel/plugin-proposal-class-properties": "^7.1.0",
- "@babel/plugin-syntax-dynamic-import": "^7.0.0",
- "@babel/plugin-transform-react-jsx": "^7.0.0",
- "@babel/plugin-transform-runtime": "^7.1.0",
- "@babel/preset-env": "^7.1.0",
- "@babel/preset-react": "^7.0.0",
- "autoprefixer": "^9.1.5",
- "babel-eslint": "^10.0.1",
- "babel-loader": "^8.0.4",
- "babel-plugin-dynamic-import-node": "^2.2.0",
- "connect-history-api-fallback": "^1.5.0",
- "css-loader": "^1.0.0",
- "debug": "^4.1.0",
- "dotenv-webpack": "^1.5.7",
- "eslint": "^5.6.1",
- "eslint-config-standard": "^12.0.0",
- "eslint-config-standard-react": "^7.0.2",
- "eslint-plugin-import": "^2.14.0",
- "eslint-plugin-node": "^7.0.1",
- "eslint-plugin-prettier": "^3.0.0",
- "eslint-plugin-promise": "^4.0.1",
- "eslint-plugin-react": "^7.11.1",
- "eslint-plugin-standard": "^4.0.0",
- "file-loader": "^2.0.0",
- "html-webpack-harddisk-plugin": "^0.2.0",
- "html-webpack-plugin": "^3.2.0",
- "koa-connect": "^2.0.1",
- "node-sass": "^4.9.3",
- "postcss-loader": "^3.0.0",
- "prettier": "^1.14.3",
- "prettier-standard": "^8.0.1",
- "react-hot-loader": "^4.3.11",
- "sass-loader": "^7.1.0",
- "script-ext-html-webpack-plugin": "^2.0.1",
- "style-loader": "^0.23.1",
- "webpack": "^4.20.2",
- "webpack-cli": "^3.1.2",
- "webpack-dev-server": "^3.1.9",
- "webpack-hot-client": "^4.1.1",
- "webpack-merge": "^4.1.4"
- },
- "standard": {
- "parser": "babel-eslint",
- "ignore": [
- "dist/",
- "build/"
- ]
- },
- "dependencies": {
- "@advancedalgos/key-vault-client": "0.0.6",
- "@advancedalgos/teams-client": "0.0.18",
- "@advancedalgos/web-components": "0.0.10",
- "@babel/runtime": "^7.1.2",
- "@material-ui/core": "^3.2.0",
- "@material-ui/icons": "^3.0.1",
- "apollo-cache-inmemory": "^1.3.5",
- "apollo-client": "^2.4.2",
- "apollo-link": "^1.2.3",
- "apollo-link-context": "^1.0.9",
- "apollo-link-error": "^1.1.1",
- "apollo-link-http": "^1.5.5",
- "apollo-link-ws": "^1.0.9",
- "apollo-utilities": "^1.0.21",
- "auth0-lock": "^11.10.0",
- "babel-polyfill": "^6.26.0",
- "graphql": "^14.0.2",
- "graphql-tag": "^2.10.0",
- "prop-types": "^15.6.2",
- "react": "^16.5.2",
- "react-dom": "^16.5.2",
- "react-router-dom": "^4.3.1",
- "subscriptions-transport-ws": "^0.9.15"
- }
+ "homepage": "https://github.com/Algoteers/MasterApp#readme"
}