create-catalyst-app-internal 0.0.1-beta.15 → 0.0.1-beta.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/templates/common/.eslintrc +3 -13
- package/templates/common/src/js/routes/index.js +0 -6
- package/templates/none-js/package.json +2 -4
- package/templates/none-js/src/js/routes/utils.js +6 -0
- package/templates/redux-js/package.json +2 -4
- package/templates/redux-js/src/js/routes/utils.js +6 -0
- package/templates/rtk-js/package.json +2 -4
- package/templates/rtk-js/src/js/routes/utils.js +6 -0
- package/templates/common/.babelrc +0 -26
package/package.json
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"parser": "@babel/eslint-parser",
|
|
3
2
|
"rules": {
|
|
4
3
|
"react-hooks/exhaustive-deps": "error" // Checks effect dependencies
|
|
5
4
|
},
|
|
@@ -10,27 +9,18 @@
|
|
|
10
9
|
},
|
|
11
10
|
"extends": [
|
|
12
11
|
"eslint:recommended",
|
|
13
|
-
"plugin:react/recommended"
|
|
12
|
+
"plugin:react/recommended",
|
|
14
13
|
],
|
|
15
14
|
"parserOptions": {
|
|
16
15
|
"sourceType": "module",
|
|
17
|
-
"
|
|
18
|
-
"experimentalObjectRestSpread": true,
|
|
19
|
-
"jsx": true
|
|
20
|
-
},
|
|
21
|
-
"babelOptions": {
|
|
22
|
-
"configFile": "./.babelrc"
|
|
23
|
-
},
|
|
24
|
-
"ecmaVersion": 6
|
|
16
|
+
"ecmaVersion": "latest"
|
|
25
17
|
},
|
|
26
18
|
"plugins": [
|
|
27
|
-
"babel",
|
|
28
19
|
"react",
|
|
29
20
|
"react-hooks"
|
|
30
21
|
],
|
|
31
|
-
|
|
22
|
+
"settings": {
|
|
32
23
|
"react": {
|
|
33
|
-
"createClass": "createReactClass",
|
|
34
24
|
"pragma": "React",
|
|
35
25
|
"version": "detect"
|
|
36
26
|
}
|
|
@@ -19,14 +19,12 @@
|
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@loadable/component": "^5.16.3",
|
|
22
|
-
"@tata1mg/router": "^0.0.2-alpha.
|
|
23
|
-
"catalyst-core-internal": "^0.0.1-beta.
|
|
22
|
+
"@tata1mg/router": "^0.0.2-alpha.2",
|
|
23
|
+
"catalyst-core-internal": "^0.0.1-beta.10"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"eslint": "^8.26.0",
|
|
27
|
-
"eslint-plugin-babel": "^5.3.1",
|
|
28
27
|
"eslint-plugin-react": "^7.34.1",
|
|
29
|
-
"@babel/eslint-parser": "^7.19.1",
|
|
30
28
|
"eslint-plugin-react-hooks": "^4.6.0"
|
|
31
29
|
}
|
|
32
30
|
}
|
|
@@ -3,6 +3,12 @@ import { RouterDataProvider, MetaTag } from "@tata1mg/router";
|
|
|
3
3
|
import App from "@containers/App";
|
|
4
4
|
import routes from "./index.js";
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* Making the routes array compatible with the format accepted by createBrowserRouter
|
|
8
|
+
* API on the client side
|
|
9
|
+
* https://reactrouter.com/en/main/routers/create-browser-router
|
|
10
|
+
*/
|
|
11
|
+
|
|
6
12
|
export const preparedRoutes = ({ routerInitialState }) => {
|
|
7
13
|
const getPreparedRoutes = (routes) => {
|
|
8
14
|
return routes.map((route, index) => {
|
|
@@ -20,16 +20,14 @@
|
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@loadable/component": "^5.16.3",
|
|
23
|
-
"@tata1mg/router": "^0.0.2-alpha.
|
|
24
|
-
"catalyst-core-internal": "^0.0.1-beta.
|
|
23
|
+
"@tata1mg/router": "^0.0.2-alpha.2",
|
|
24
|
+
"catalyst-core-internal": "^0.0.1-beta.10",
|
|
25
25
|
"@reduxjs/toolkit": "1.9.3",
|
|
26
26
|
"react-redux": "^8.1.3"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"eslint": "^8.26.0",
|
|
30
|
-
"eslint-plugin-babel": "^5.3.1",
|
|
31
30
|
"eslint-plugin-react": "^7.34.1",
|
|
32
|
-
"@babel/eslint-parser": "^7.19.1",
|
|
33
31
|
"eslint-plugin-react-hooks": "^4.6.0"
|
|
34
32
|
}
|
|
35
33
|
}
|
|
@@ -3,6 +3,12 @@ import { RouterDataProvider, MetaTag } from "@tata1mg/router";
|
|
|
3
3
|
import App from "@containers/App";
|
|
4
4
|
import routes from "./index.js";
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* Making the routes array compatible with the format accepted by createBrowserRouter
|
|
8
|
+
* API on the client side
|
|
9
|
+
* https://reactrouter.com/en/main/routers/create-browser-router
|
|
10
|
+
*/
|
|
11
|
+
|
|
6
12
|
export const preparedRoutes = ({ store, routerInitialState }) => {
|
|
7
13
|
const getPreparedRoutes = (routes) => {
|
|
8
14
|
return routes.map((route, index) => {
|
|
@@ -20,16 +20,14 @@
|
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@loadable/component": "^5.16.3",
|
|
23
|
-
"@tata1mg/router": "^0.0.2-alpha.
|
|
24
|
-
"catalyst-core-internal": "^0.0.1-beta.
|
|
23
|
+
"@tata1mg/router": "^0.0.2-alpha.2",
|
|
24
|
+
"catalyst-core-internal": "^0.0.1-beta.10",
|
|
25
25
|
"@reduxjs/toolkit": "1.9.3",
|
|
26
26
|
"react-redux": "^8.1.3"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"eslint": "^8.26.0",
|
|
30
|
-
"eslint-plugin-babel": "^5.3.1",
|
|
31
30
|
"eslint-plugin-react": "^7.34.1",
|
|
32
|
-
"@babel/eslint-parser": "^7.19.1",
|
|
33
31
|
"eslint-plugin-react-hooks": "^4.6.0"
|
|
34
32
|
}
|
|
35
33
|
}
|
|
@@ -3,6 +3,12 @@ import { RouterDataProvider, MetaTag } from "@tata1mg/router";
|
|
|
3
3
|
import App from "@containers/App";
|
|
4
4
|
import routes from "./index.js";
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* Making the routes array compatible with the format accepted by createBrowserRouter
|
|
8
|
+
* API on the client side
|
|
9
|
+
* https://reactrouter.com/en/main/routers/create-browser-router
|
|
10
|
+
*/
|
|
11
|
+
|
|
6
12
|
export const preparedRoutes = ({ store, routerInitialState }) => {
|
|
7
13
|
const getPreparedRoutes = (routes) => {
|
|
8
14
|
return routes.map((route, index) => {
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"presets": [
|
|
3
|
-
[
|
|
4
|
-
"@babel/preset-env",
|
|
5
|
-
{
|
|
6
|
-
"targets": {
|
|
7
|
-
"node": "current"
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
],
|
|
11
|
-
"@babel/preset-react"
|
|
12
|
-
],
|
|
13
|
-
"plugins": [
|
|
14
|
-
"@babel/plugin-proposal-object-rest-spread",
|
|
15
|
-
"transform-es2015-modules-commonjs",
|
|
16
|
-
"transform-class-properties",
|
|
17
|
-
"dynamic-import-node",
|
|
18
|
-
"@loadable/babel-plugin"
|
|
19
|
-
],
|
|
20
|
-
"env": {
|
|
21
|
-
"test": {
|
|
22
|
-
"presets": ["@babel/preset-react"]
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
"ignore": ["__TEST__"]
|
|
26
|
-
}
|