create-digigov-app 0.5.0 → 0.6.0

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/CHANGELOG.json CHANGED
@@ -1,6 +1,23 @@
1
1
  {
2
2
  "name": "create-digigov-app",
3
3
  "entries": [
4
+ {
5
+ "version": "0.6.0",
6
+ "tag": "create-digigov-app_v0.6.0",
7
+ "date": "Mon, 31 Jan 2022 13:42:21 GMT",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "comment": "Add and remove css files for ts and js projects and add needed dependencies"
12
+ }
13
+ ],
14
+ "minor": [
15
+ {
16
+ "comment": "Refactor templates to use @digigov/react-core"
17
+ }
18
+ ]
19
+ }
20
+ },
4
21
  {
5
22
  "version": "0.5.0",
6
23
  "tag": "create-digigov-app_v0.5.0",
package/CHANGELOG.md CHANGED
@@ -1,6 +1,17 @@
1
1
  # Change Log - create-digigov-app
2
2
 
3
- This log was last generated on Thu, 30 Dec 2021 12:54:03 GMT and should not be manually modified.
3
+ This log was last generated on Mon, 31 Jan 2022 13:42:21 GMT and should not be manually modified.
4
+
5
+ ## 0.6.0
6
+ Mon, 31 Jan 2022 13:42:21 GMT
7
+
8
+ ### Minor changes
9
+
10
+ - Refactor templates to use @digigov/react-core
11
+
12
+ ### Patches
13
+
14
+ - Add and remove css files for ts and js projects and add needed dependencies
4
15
 
5
16
  ## 0.5.0
6
17
  Thu, 30 Dec 2021 12:54:03 GMT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-digigov-app",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "Create a DigiGOV App with ease",
5
5
  "bin": "cli.js",
6
6
  "files": [
@@ -31,6 +31,9 @@
31
31
  "@types/enzyme-adapter-react-16": "^1.0.5",
32
32
  "@types/jest": "^26.0.15",
33
33
  "eslint": "^7.27.0",
34
- "prettier": "^2.3.0"
34
+ "prettier": "^2.3.0",
35
+ "autoprefixer": "10.0.4",
36
+ "postcss": "8.2.6",
37
+ "tailwindcss": "2.2.4"
35
38
  }
36
39
  }
@@ -1,4 +1,3 @@
1
-
2
- @import "./base.css";
3
- @import "./components.css";
4
- @import './utilities.css';
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
@@ -0,0 +1,37 @@
1
+ import React from 'react';
2
+ import Head from 'next/head';
3
+ import { useTranslation } from '@digigov/ui/app/i18n';
4
+ import {
5
+ Layout,
6
+ Top,
7
+ Container,
8
+ Bottom,
9
+ Header,
10
+ GovGRFooter,
11
+ GovGRLogo,
12
+ } from '@digigov/react-core';
13
+
14
+ const CommonLayout = ({ children }) => {
15
+ const { t } = useTranslation();
16
+ return (
17
+ <Layout>
18
+ <Head>
19
+ <title>{t('app.name')}</title>
20
+ </Head>
21
+ <Top>
22
+ <Header>
23
+ <GovGRLogo />
24
+ {/* <HeaderTitle>
25
+ {t('app.name')}
26
+ </HeaderTitle> */}
27
+ </Header>
28
+ </Top>
29
+ <Container>{children}</Container>
30
+ <Bottom>
31
+ <GovGRFooter />
32
+ </Bottom>
33
+ </Layout>
34
+ );
35
+ };
36
+
37
+ export default CommonLayout;
@@ -1,16 +1,16 @@
1
1
  import React from 'react';
2
2
  import NotFound from '@digigov/ui/app/NotFound';
3
- import { Main, Side } from '@digigov/ui/layouts/Basic';
4
- import Layout from '<%= name %>/components/Layout';
3
+ import { Main, ASide } from '@digigov/react-core'
4
+ import CommonLayout from '<%= name %>/components/CommonLayout';
5
5
 
6
6
  const NotFoundPage = () => {
7
7
  return (
8
- <Layout>
8
+ <CommonLayout>
9
9
  <Main>
10
10
  <NotFound />
11
11
  </Main>
12
- <Side></Side>
13
- </Layout>
12
+ <ASide></ASide>
13
+ </CommonLayout>
14
14
  );
15
15
  };
16
16
 
@@ -1,15 +1,19 @@
1
1
  import React from 'react';
2
2
  import { useTranslation } from '@digigov/ui/app/i18n';
3
- import { Main, Side } from '@digigov/ui/layouts/Basic';
4
- import PageTitle, { PageTitleHeading } from '@digigov/ui/app/PageTitle';
5
- import CallToAction from '@digigov/ui/core/Button/CallToAction';
6
- import Paragraph from '@digigov/ui/typography/Paragraph';
7
- import Layout from '<%= name %>/components/Layout';
3
+ import {
4
+ Main,
5
+ Aside,
6
+ PageTitle,
7
+ PageTitleHeading,
8
+ CallToAction,
9
+ Paragraph,
10
+ } from '@digigov/react-core';
11
+ import CommonLayout from '<%= name %>/components/CommonLayout';
8
12
 
9
13
  const Home = () => {
10
14
  const { t } = useTranslation();
11
15
  return (
12
- <Layout>
16
+ <CommonLayout>
13
17
  <Main>
14
18
  <PageTitle>
15
19
  <PageTitleHeading>{t('app.name')}</PageTitleHeading>
@@ -17,8 +21,8 @@ const Home = () => {
17
21
  <Paragraph>{t('app.intro_text')}</Paragraph>
18
22
  <CallToAction href="/login">{t('button.start')}</CallToAction>
19
23
  </Main>
20
- <Side></Side>
21
- </Layout>
24
+ <Aside></Aside>
25
+ </CommonLayout>
22
26
  );
23
27
  };
24
28
 
@@ -0,0 +1,3 @@
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
@@ -0,0 +1,37 @@
1
+ import React from 'react';
2
+ import Head from 'next/head';
3
+ import { useTranslation } from '@digigov/ui/app/i18n';
4
+ import {
5
+ Layout,
6
+ Top,
7
+ Container,
8
+ Bottom,
9
+ Header,
10
+ GovGRFooter,
11
+ GovGRLogo,
12
+ } from '@digigov/react-core';
13
+
14
+ const CommonLayout: React.FC = ({ children }) => {
15
+ const { t } = useTranslation();
16
+ return (
17
+ <Layout>
18
+ <Head>
19
+ <title>{t('app.name')}</title>
20
+ </Head>
21
+ <Top>
22
+ <Header>
23
+ <GovGRLogo />
24
+ {/* <HeaderTitle>
25
+ {t('app.name')}
26
+ </HeaderTitle> */}
27
+ </Header>
28
+ </Top>
29
+ <Container>{children}</Container>
30
+ <Bottom>
31
+ <GovGRFooter />
32
+ </Bottom>
33
+ </Layout>
34
+ );
35
+ };
36
+
37
+ export default CommonLayout;
@@ -1,16 +1,16 @@
1
1
  import React from 'react';
2
2
  import NotFound from '@digigov/ui/app/NotFound';
3
- import { Main, Side } from '@digigov/ui/layouts/Basic';
4
- import Layout from '<%= name %>/components/Layout';
3
+ import { Main, Aside } from '@digigov/react-core'
4
+ import CommonLayout from '<%= name %>/components/CommonLayout';
5
5
 
6
6
  const NotFoundPage: React.FC = () => {
7
7
  return (
8
- <Layout>
8
+ <CommonLayout>
9
9
  <Main>
10
10
  <NotFound />
11
11
  </Main>
12
- <Side></Side>
13
- </Layout>
12
+ <Aside></Aside>
13
+ </CommonLayout>
14
14
  );
15
15
  };
16
16
 
@@ -1,15 +1,19 @@
1
1
  import React from 'react';
2
2
  import { useTranslation } from '@digigov/ui/app/i18n';
3
- import { Main, Side } from '@digigov/ui/layouts/Basic';
4
- import PageTitle, { PageTitleHeading } from '@digigov/ui/app/PageTitle';
5
- import CallToAction from '@digigov/ui/core/Button/CallToAction';
6
- import Paragraph from '@digigov/ui/typography/Paragraph';
7
- import Layout from '<%= name %>/components/Layout';
3
+ import {
4
+ Main,
5
+ Aside,
6
+ PageTitle,
7
+ PageTitleHeading,
8
+ CallToAction,
9
+ Paragraph,
10
+ } from '@digigov/react-core';
11
+ import CommonLayout from '<%= name %>/components/CommonLayout';
8
12
 
9
13
  const Home: React.FC = () => {
10
14
  const { t } = useTranslation();
11
15
  return (
12
- <Layout>
16
+ <CommonLayout>
13
17
  <Main>
14
18
  <PageTitle>
15
19
  <PageTitleHeading>{t('app.name')}</PageTitleHeading>
@@ -17,8 +21,8 @@ const Home: React.FC = () => {
17
21
  <Paragraph>{t('app.intro_text')}</Paragraph>
18
22
  <CallToAction href="/login">{t('button.start')}</CallToAction>
19
23
  </Main>
20
- <Side></Side>
21
- </Layout>
24
+ <Aside></Aside>
25
+ </CommonLayout>
22
26
  );
23
27
  };
24
28
 
@@ -1,4 +0,0 @@
1
- @tailwind base;
2
- @layer base {
3
- @import "@digigov/css/src/base/base.css";
4
- };
@@ -1,15 +0,0 @@
1
- @tailwind components;
2
- @layer components {
3
- @import "@digigov/css/src/components/accordion.css";
4
- @import "@digigov/css/src/components/button.css";
5
- @import "@digigov/css/src/components/components.css";
6
- @import "@digigov/css/src/components/form.css";
7
- @import "@digigov/css/src/components/checkboxes.css";
8
- @import "@digigov/css/src/components/radios.css";
9
- @import "@digigov/css/src/components/general.css";
10
- @import "@digigov/css/src/components/header.css";
11
- @import "@digigov/css/src/components/footer.css";
12
- @import "@digigov/css/src/components/layout.css";
13
- @import "@digigov/css/src/components/nav.css";
14
- @import "@digigov/css/src/components/typography.css";
15
- };
@@ -1,42 +0,0 @@
1
- import React from 'react';
2
- import Head from 'next/head';
3
- import { useTranslation } from '@digigov/ui/app/i18n';
4
-
5
- import BasicLayout, {
6
- Top,
7
- Content,
8
- Bottom,
9
- } from '@digigov/ui/layouts/Basic';
10
- import Header /* , { HeaderTitle } */ from '@digigov/ui/app/Header';
11
- /* import ServiceBadge from '@digigov/ui/core/ServiceBadge'; */
12
- import GovGRLogo from '@digigov/ui/govgr/Logo';
13
- import GovGRFooter from '@digigov/ui/govgr/Footer';
14
-
15
- const Layout = ({ children }) => {
16
- const { t } = useTranslation();
17
- return (
18
- <BasicLayout>
19
- <Head>
20
- <title>{t('app.name')}</title>
21
- </Head>
22
- <Top>
23
- <Header>
24
- <GovGRLogo />
25
- {/* Use the HeaderTitle with a service name if your service is more than 5 pages long - this can help users understand which service they are using. */}
26
- {/* <HeaderTitle>
27
- {t('app.name')}
28
- <ServiceBadge label="ALPHA" />
29
- </HeaderTitle> */}
30
- </Header>
31
- </Top>
32
- <Content>
33
- {children}
34
- </Content>
35
- <Bottom>
36
- <GovGRFooter />
37
- </Bottom>
38
- </BasicLayout>
39
- );
40
- };
41
-
42
- export default Layout;
@@ -1,4 +0,0 @@
1
- @tailwind utilities;
2
- @layer utilities {
3
- @import "@digigov/css/src/utilities/utilities.css";
4
- };
@@ -1,42 +0,0 @@
1
- import React from 'react';
2
- import Head from 'next/head';
3
- import { useTranslation } from '@digigov/ui/app/i18n';
4
-
5
- import BasicLayout, {
6
- Top,
7
- Content,
8
- Bottom,
9
- } from '@digigov/ui/layouts/Basic';
10
- import Header /* , { HeaderTitle } */ from '@digigov/ui/app/Header';
11
- /* import ServiceBadge from '@digigov/ui/core/ServiceBadge'; */
12
- import GovGRLogo from '@digigov/ui/govgr/Logo';
13
- import GovGRFooter from '@digigov/ui/govgr/Footer';
14
-
15
- const Layout: React.FC = ({ children }) => {
16
- const { t } = useTranslation();
17
- return (
18
- <BasicLayout>
19
- <Head>
20
- <title>{t('app.name')}</title>
21
- </Head>
22
- <Top>
23
- <Header>
24
- <GovGRLogo />
25
- {/* Use the HeaderTitle with a service name if your service is more than 5 pages long - this can help users understand which service they are using. */}
26
- {/* <HeaderTitle>
27
- {t('app.name')}
28
- <ServiceBadge label="ALPHA" />
29
- </HeaderTitle> */}
30
- </Header>
31
- </Top>
32
- <Content>
33
- {children}
34
- </Content>
35
- <Bottom>
36
- <GovGRFooter />
37
- </Bottom>
38
- </BasicLayout>
39
- );
40
- };
41
-
42
- export default Layout;