create-digigov-app 0.6.3 → 0.7.1

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,47 @@
1
1
  {
2
2
  "name": "create-digigov-app",
3
3
  "entries": [
4
+ {
5
+ "version": "0.7.1",
6
+ "tag": "create-digigov-app_v0.7.1",
7
+ "date": "Thu, 24 Feb 2022 14:51:06 GMT",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "comment": "Add tests for typescript template"
12
+ }
13
+ ],
14
+ "dependency": [
15
+ {
16
+ "comment": "Updating dependency \"@digigov/cli-test\" from `0.5.26` to `0.6.0`"
17
+ }
18
+ ]
19
+ }
20
+ },
21
+ {
22
+ "version": "0.7.0",
23
+ "tag": "create-digigov-app_v0.7.0",
24
+ "date": "Mon, 14 Feb 2022 11:53:09 GMT",
25
+ "comments": {
26
+ "minor": [
27
+ {
28
+ "comment": "Eeplace @digigov/react-core with @digigov/ui"
29
+ }
30
+ ]
31
+ }
32
+ },
33
+ {
34
+ "version": "0.6.4",
35
+ "tag": "create-digigov-app_v0.6.4",
36
+ "date": "Mon, 14 Feb 2022 09:56:29 GMT",
37
+ "comments": {
38
+ "dependency": [
39
+ {
40
+ "comment": "Updating dependency \"@digigov/cli\" from `0.5.26` to `0.5.27`"
41
+ }
42
+ ]
43
+ }
44
+ },
4
45
  {
5
46
  "version": "0.6.3",
6
47
  "tag": "create-digigov-app_v0.6.3",
package/CHANGELOG.md CHANGED
@@ -1,6 +1,25 @@
1
1
  # Change Log - create-digigov-app
2
2
 
3
- This log was last generated on Thu, 10 Feb 2022 13:45:56 GMT and should not be manually modified.
3
+ This log was last generated on Thu, 24 Feb 2022 14:51:06 GMT and should not be manually modified.
4
+
5
+ ## 0.7.1
6
+ Thu, 24 Feb 2022 14:51:06 GMT
7
+
8
+ ### Patches
9
+
10
+ - Add tests for typescript template
11
+
12
+ ## 0.7.0
13
+ Mon, 14 Feb 2022 11:53:09 GMT
14
+
15
+ ### Minor changes
16
+
17
+ - Eeplace @digigov/react-core with @digigov/ui
18
+
19
+ ## 0.6.4
20
+ Mon, 14 Feb 2022 09:56:29 GMT
21
+
22
+ _Version update only_
4
23
 
5
24
  ## 0.6.3
6
25
  Thu, 10 Feb 2022 13:45:56 GMT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-digigov-app",
3
- "version": "0.6.3",
3
+ "version": "0.7.1",
4
4
  "description": "Create a DigiGOV App with ease",
5
5
  "bin": "cli.js",
6
6
  "files": [
@@ -25,9 +25,9 @@
25
25
  "validate-npm-package-name": "3.0.0"
26
26
  },
27
27
  "devDependencies": {
28
- "@digigov/cli": "0.5.26",
28
+ "@digigov/cli": "0.5.27",
29
29
  "@digigov/cli-lint": "0.5.28",
30
- "@digigov/cli-test": "0.5.26",
30
+ "@digigov/cli-test": "0.6.0",
31
31
  "typescript": "4.2.3"
32
32
  },
33
33
  "license": "MIT",
@@ -1,36 +1,44 @@
1
1
  import React from 'react';
2
2
  import Head from 'next/head';
3
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';
4
+ import { useRouter } from 'next/router';
5
+ import BasicLayout, { Top, Content, Bottom } from '@digigov/ui/layouts/Basic';
6
+ import Header, {
7
+ HeaderTitle,
8
+ HeaderContent,
9
+ HeaderSection,
10
+ } from '@digigov/ui/app/Header';
11
+ import GovGRLogo from '@digigov/ui/govgr/Logo';
12
+ import GovGRFooter from '@digigov/ui/govgr/Footer';
13
13
 
14
14
  const CommonLayout = ({ children }) => {
15
+ const router = useRouter();
16
+ const notHome = router.asPath !== '/';
15
17
  const { t } = useTranslation();
16
18
  return (
17
- <Layout>
19
+ <BasicLayout>
18
20
  <Head>
19
21
  <title>{t('app.name')}</title>
20
22
  </Head>
21
23
  <Top>
22
24
  <Header>
23
- <GovGRLogo />
24
- {/* <HeaderTitle>
25
- {t('app.name')}
26
- </HeaderTitle> */}
25
+ <HeaderSection>
26
+ <HeaderContent>
27
+ <GovGRLogo />
28
+ {notHome && (
29
+ <>
30
+ <HeaderTitle>{t('app.name')}</HeaderTitle>
31
+ </>
32
+ )}
33
+ </HeaderContent>
34
+ </HeaderSection>
27
35
  </Header>
28
36
  </Top>
29
- <Container>{children}</Container>
37
+ <Content>{children}</Content>
30
38
  <Bottom>
31
39
  <GovGRFooter />
32
40
  </Bottom>
33
- </Layout>
41
+ </BasicLayout>
34
42
  );
35
43
  };
36
44
 
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import NotFound from '@digigov/ui/app/NotFound';
3
- import { Main, ASide } from '@digigov/react-core'
3
+ import { Main, Side } from '@digigov/ui/layouts/Basic';
4
4
  import CommonLayout from '<%= name %>/components/CommonLayout';
5
5
 
6
6
  const NotFoundPage = () => {
@@ -9,7 +9,7 @@ const NotFoundPage = () => {
9
9
  <Main>
10
10
  <NotFound />
11
11
  </Main>
12
- <ASide></ASide>
12
+ <Side></Side>
13
13
  </CommonLayout>
14
14
  );
15
15
  };
@@ -1,13 +1,10 @@
1
1
  import React from 'react';
2
2
  import { useTranslation } from '@digigov/ui/app/i18n';
3
- import {
4
- Main,
5
- Aside,
6
- PageTitle,
7
- PageTitleHeading,
8
- CallToAction,
9
- Paragraph,
10
- } from '@digigov/react-core';
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
+
11
8
  import CommonLayout from '<%= name %>/components/CommonLayout';
12
9
 
13
10
  const Home = () => {
@@ -21,7 +18,7 @@ const Home = () => {
21
18
  <Paragraph>{t('app.intro_text')}</Paragraph>
22
19
  <CallToAction href="/login">{t('button.start')}</CallToAction>
23
20
  </Main>
24
- <Aside></Aside>
21
+ <Side></Side>
25
22
  </CommonLayout>
26
23
  );
27
24
  };
@@ -1,36 +1,44 @@
1
1
  import React from 'react';
2
2
  import Head from 'next/head';
3
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';
4
+ import { useRouter } from 'next/router';
5
+ import BasicLayout, { Top, Content, Bottom } from '@digigov/ui/layouts/Basic';
6
+ import Header, {
7
+ HeaderTitle,
8
+ HeaderContent,
9
+ HeaderSection,
10
+ } from '@digigov/ui/app/Header';
11
+ import GovGRLogo from '@digigov/ui/govgr/Logo';
12
+ import GovGRFooter from '@digigov/ui/govgr/Footer';
13
13
 
14
14
  const CommonLayout: React.FC = ({ children }) => {
15
+ const router = useRouter();
16
+ const notHome = router.asPath !== '/';
15
17
  const { t } = useTranslation();
16
18
  return (
17
- <Layout>
19
+ <BasicLayout>
18
20
  <Head>
19
21
  <title>{t('app.name')}</title>
20
22
  </Head>
21
23
  <Top>
22
24
  <Header>
23
- <GovGRLogo />
24
- {/* <HeaderTitle>
25
- {t('app.name')}
26
- </HeaderTitle> */}
25
+ <HeaderSection>
26
+ <HeaderContent>
27
+ <GovGRLogo />
28
+ {notHome && (
29
+ <>
30
+ <HeaderTitle>{t('app.name')}</HeaderTitle>
31
+ </>
32
+ )}
33
+ </HeaderContent>
34
+ </HeaderSection>
27
35
  </Header>
28
36
  </Top>
29
- <Container>{children}</Container>
37
+ <Content>{children}</Content>
30
38
  <Bottom>
31
39
  <GovGRFooter />
32
40
  </Bottom>
33
- </Layout>
41
+ </BasicLayout>
34
42
  );
35
43
  };
36
44
 
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import NotFound from '@digigov/ui/app/NotFound';
3
- import { Main, Aside } from '@digigov/react-core'
3
+ import { Main, Side } from '@digigov/ui/layouts/Basic';
4
4
  import CommonLayout from '<%= name %>/components/CommonLayout';
5
5
 
6
6
  const NotFoundPage: React.FC = () => {
@@ -9,10 +9,9 @@ const NotFoundPage: React.FC = () => {
9
9
  <Main>
10
10
  <NotFound />
11
11
  </Main>
12
- <Aside></Aside>
12
+ <Side></Side>
13
13
  </CommonLayout>
14
14
  );
15
15
  };
16
16
 
17
17
  export default NotFoundPage;
18
-
@@ -1,13 +1,10 @@
1
1
  import React from 'react';
2
2
  import { useTranslation } from '@digigov/ui/app/i18n';
3
- import {
4
- Main,
5
- Aside,
6
- PageTitle,
7
- PageTitleHeading,
8
- CallToAction,
9
- Paragraph,
10
- } from '@digigov/react-core';
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
+
11
8
  import CommonLayout from '<%= name %>/components/CommonLayout';
12
9
 
13
10
  const Home: React.FC = () => {
@@ -21,7 +18,7 @@ const Home: React.FC = () => {
21
18
  <Paragraph>{t('app.intro_text')}</Paragraph>
22
19
  <CallToAction href="/login">{t('button.start')}</CallToAction>
23
20
  </Main>
24
- <Aside></Aside>
21
+ <Side></Side>
25
22
  </CommonLayout>
26
23
  );
27
24
  };