create-catalyst-app-internal 0.0.1-beta.16 → 0.0.1-beta.18

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/Readme.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Creating a Catalyst App
2
2
 
3
- Scaffold your Catalyst app swiftly with `create-catalyst-app`. This tool expedites the process by initializing your project with predefined configurations. To kickstart your project, execute the following command:
3
+ Scaffold your Catalyst app swiftly with `create-catalyst-app`. This tool expedites the process by initializing your project with predefined configurations. To kickstart your project, execute the following command:
4
4
 
5
5
  ```bash
6
6
  npx create-catalyst-app@latest
@@ -24,6 +24,7 @@ Next, select your preferred state management tool from the provided options.
24
24
  Following your selection, a default template will be cloned into the directory, and all necessary packages will be installed.
25
25
 
26
26
  ## Getting Started
27
+
27
28
  Commence development by initiating the application in development mode with the following commands:
28
29
 
29
30
  Navigate into the directory
@@ -31,7 +32,9 @@ Navigate into the directory
31
32
  ```bash
32
33
  cd my-app
33
34
  ```
35
+
34
36
  For running the application in development mode, run:
37
+
35
38
  ```bash
36
39
  npm run start
37
40
  ```
@@ -49,4 +52,5 @@ npm run serve
49
52
  ```
50
53
 
51
54
  ## Documentation
55
+
52
56
  Explore the complete documentation at [https://catalyst.1mg.com](https://catalyst.1mg.com).
package/package.json CHANGED
@@ -1,12 +1,8 @@
1
1
  {
2
2
  "name": "create-catalyst-app-internal",
3
3
  "bin": "scripts/cli.cjs",
4
- "version": "0.0.1-beta.16",
4
+ "version": "0.0.1-beta.18",
5
5
  "description": "cli package to scaffold Catalyst application",
6
- "main": "index.js",
7
- "scripts": {
8
- "start": "node index.js"
9
- },
10
6
  "dependencies": {
11
7
  "commander": "^8.2.0",
12
8
  "fs": "^0.0.1-security",
@@ -1,6 +1,6 @@
1
1
  ## Getting Started
2
2
 
3
- Commence development by initiating the the following commands:
3
+ Commence development by initiating the the following commands:
4
4
 
5
5
  For running the application in development mode, run:
6
6
 
@@ -24,4 +24,4 @@ const apiInstance = () => {
24
24
  put: fetchFunction,
25
25
  }
26
26
  }
27
- export default apiInstance
27
+ export default apiInstance
@@ -8,5 +8,5 @@
8
8
  "PUBLIC_STATIC_ASSET_URL": "http://localhost:3005",
9
9
  "API_URL": "",
10
10
  "ANALYZE_BUNDLE": false,
11
- "CLIENT_ENV_VARIABLES": [ "API_URL" ]
11
+ "CLIENT_ENV_VARIABLES": ["API_URL"]
12
12
  }
@@ -4,8 +4,7 @@ import { Head, Body } from "catalyst-core-internal"
4
4
  function Document(props) {
5
5
  return (
6
6
  <html lang="en">
7
- <Head {...props}>
8
- </Head>
7
+ <Head {...props}></Head>
9
8
  <Body {...props} />
10
9
  </html>
11
10
  )
@@ -8,10 +8,4 @@ const routes = [
8
8
  },
9
9
  ]
10
10
 
11
- /**
12
- * Making the routes array compatible with the format accepted by createBrowserRouter
13
- * API on the client side
14
- * https://reactrouter.com/en/main/routers/create-browser-router
15
- */
16
-
17
11
  export default routes
@@ -19,14 +19,12 @@
19
19
  },
20
20
  "dependencies": {
21
21
  "@loadable/component": "^5.16.3",
22
- "@tata1mg/router": "^0.0.2-alpha.1",
23
- "catalyst-core-internal": "^0.0.1-beta.9"
22
+ "@tata1mg/router": "^0.0.2-alpha.7",
23
+ "catalyst-core-internal": "^0.0.1-beta.11"
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
  }
@@ -1,41 +1,42 @@
1
- import React from "react";
2
- import { RouterDataProvider, MetaTag } from "@tata1mg/router";
3
- import App from "@containers/App";
4
- import routes from "./index.js";
1
+ import React from "react"
2
+ import { RouterDataProvider, MetaTag } from "@tata1mg/router"
3
+ import App from "@containers/App"
4
+ import routes from "./index.js"
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
+ */
5
11
 
6
12
  export const preparedRoutes = ({ routerInitialState }) => {
7
- const getPreparedRoutes = (routes) => {
8
- return routes.map((route, index) => {
9
- const Component = route.component;
10
- const routeToRender = {
11
- ...route,
12
- element: (
13
- <Component key={index} />
14
- ),
15
- };
16
- if (route.children) {
17
- routeToRender.children = getPreparedRoutes(route.children);
18
- }
19
- return routeToRender;
20
- });
21
- };
13
+ const getPreparedRoutes = (routes) => {
14
+ return routes.map((route, index) => {
15
+ const Component = route.component
16
+ const routeToRender = {
17
+ ...route,
18
+ element: <Component key={index} />,
19
+ }
20
+ if (route.children) {
21
+ routeToRender.children = getPreparedRoutes(route.children)
22
+ }
23
+ return routeToRender
24
+ })
25
+ }
22
26
 
23
- return [
24
- {
25
- element: (
26
- <RouterDataProvider
27
- config={{}}
28
- initialState={routerInitialState}
29
- >
30
- <MetaTag />
31
- <App />
32
- </RouterDataProvider>
33
- ),
34
- children: getPreparedRoutes(routes),
35
- },
36
- ];
37
- };
27
+ return [
28
+ {
29
+ element: (
30
+ <RouterDataProvider config={{}} initialState={routerInitialState}>
31
+ <MetaTag />
32
+ <App />
33
+ </RouterDataProvider>
34
+ ),
35
+ children: getPreparedRoutes(routes),
36
+ },
37
+ ]
38
+ }
38
39
 
39
40
  export const getRoutes = () => {
40
- return routes;
41
- };
41
+ return routes
42
+ }
@@ -20,16 +20,14 @@
20
20
  },
21
21
  "dependencies": {
22
22
  "@loadable/component": "^5.16.3",
23
- "@tata1mg/router": "^0.0.2-alpha.1",
24
- "catalyst-core-internal": "^0.0.1-beta.9",
23
+ "@tata1mg/router": "^0.0.2-alpha.7",
24
+ "catalyst-core-internal": "^0.0.1-beta.11",
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
  }
@@ -17,4 +17,3 @@ export const shellReducer = (state = defaultState, action) => {
17
17
  return state
18
18
  }
19
19
  }
20
-
@@ -1,42 +1,42 @@
1
- import React from "react";
2
- import { RouterDataProvider, MetaTag } from "@tata1mg/router";
3
- import App from "@containers/App";
4
- import routes from "./index.js";
1
+ import React from "react"
2
+ import { RouterDataProvider, MetaTag } from "@tata1mg/router"
3
+ import App from "@containers/App"
4
+ import routes from "./index.js"
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
+ */
5
11
 
6
12
  export const preparedRoutes = ({ store, routerInitialState }) => {
7
- const getPreparedRoutes = (routes) => {
8
- return routes.map((route, index) => {
9
- const Component = route.component;
10
- const routeToRender = {
11
- ...route,
12
- element: (
13
- <Component key={index} />
14
- ),
15
- };
16
- if (route.children) {
17
- routeToRender.children = getPreparedRoutes(route.children);
18
- }
19
- return routeToRender;
20
- });
21
- };
13
+ const getPreparedRoutes = (routes) => {
14
+ return routes.map((route, index) => {
15
+ const Component = route.component
16
+ const routeToRender = {
17
+ ...route,
18
+ element: <Component key={index} />,
19
+ }
20
+ if (route.children) {
21
+ routeToRender.children = getPreparedRoutes(route.children)
22
+ }
23
+ return routeToRender
24
+ })
25
+ }
22
26
 
23
- return [
24
- {
25
- element: (
26
- <RouterDataProvider
27
- config={{}}
28
- initialState={routerInitialState}
29
- fetcherArgs={{ store }}
30
- >
31
- <MetaTag />
32
- <App />
33
- </RouterDataProvider>
34
- ),
35
- children: getPreparedRoutes(routes),
36
- },
37
- ];
38
- };
27
+ return [
28
+ {
29
+ element: (
30
+ <RouterDataProvider config={{}} initialState={routerInitialState} fetcherArgs={{ store }}>
31
+ <MetaTag />
32
+ <App />
33
+ </RouterDataProvider>
34
+ ),
35
+ children: getPreparedRoutes(routes),
36
+ },
37
+ ]
38
+ }
39
39
 
40
40
  export const getRoutes = () => {
41
- return routes;
42
- };
41
+ return routes
42
+ }
@@ -20,16 +20,14 @@
20
20
  },
21
21
  "dependencies": {
22
22
  "@loadable/component": "^5.16.3",
23
- "@tata1mg/router": "^0.0.2-alpha.1",
24
- "catalyst-core-internal": "^0.0.1-beta.9",
23
+ "@tata1mg/router": "^0.0.2-alpha.7",
24
+ "catalyst-core-internal": "^0.0.1-beta.11",
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
  }
@@ -1,42 +1,42 @@
1
- import React from "react";
2
- import { RouterDataProvider, MetaTag } from "@tata1mg/router";
3
- import App from "@containers/App";
4
- import routes from "./index.js";
1
+ import React from "react"
2
+ import { RouterDataProvider, MetaTag } from "@tata1mg/router"
3
+ import App from "@containers/App"
4
+ import routes from "./index.js"
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
+ */
5
11
 
6
12
  export const preparedRoutes = ({ store, routerInitialState }) => {
7
- const getPreparedRoutes = (routes) => {
8
- return routes.map((route, index) => {
9
- const Component = route.component;
10
- const routeToRender = {
11
- ...route,
12
- element: (
13
- <Component key={index} />
14
- ),
15
- };
16
- if (route.children) {
17
- routeToRender.children = getPreparedRoutes(route.children);
18
- }
19
- return routeToRender;
20
- });
21
- };
13
+ const getPreparedRoutes = (routes) => {
14
+ return routes.map((route, index) => {
15
+ const Component = route.component
16
+ const routeToRender = {
17
+ ...route,
18
+ element: <Component key={index} />,
19
+ }
20
+ if (route.children) {
21
+ routeToRender.children = getPreparedRoutes(route.children)
22
+ }
23
+ return routeToRender
24
+ })
25
+ }
22
26
 
23
- return [
24
- {
25
- element: (
26
- <RouterDataProvider
27
- config={{}}
28
- initialState={routerInitialState}
29
- fetcherArgs={{ store }}
30
- >
31
- <MetaTag />
32
- <App />
33
- </RouterDataProvider>
34
- ),
35
- children: getPreparedRoutes(routes),
36
- },
37
- ];
38
- };
27
+ return [
28
+ {
29
+ element: (
30
+ <RouterDataProvider config={{}} initialState={routerInitialState} fetcherArgs={{ store }}>
31
+ <MetaTag />
32
+ <App />
33
+ </RouterDataProvider>
34
+ ),
35
+ children: getPreparedRoutes(routes),
36
+ },
37
+ ]
38
+ }
39
39
 
40
40
  export const getRoutes = () => {
41
- return routes;
42
- };
41
+ return routes
42
+ }