create-digigov-app 0.4.1 → 0.6.2
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 +56 -0
- package/CHANGELOG.md +29 -1
- package/package.json +3 -3
- package/saofile.js +19 -14
- package/template/_package.json +4 -1
- package/template/_postcss.config.js +3 -0
- package/template/_tailwind.config.js +1 -0
- package/template/javascript/index.css +3 -0
- package/template/javascript/src/components/CommonLayout.js +37 -0
- package/template/javascript/src/locales/en.js +1 -1
- package/template/javascript/src/pages/404.js +5 -5
- package/template/javascript/src/pages/_app.js +4 -2
- package/template/javascript/src/pages/index.js +14 -8
- package/template/typescript/index.css +3 -0
- package/template/typescript/src/components/CommonLayout.tsx +37 -0
- package/template/typescript/src/pages/404.tsx +5 -5
- package/template/typescript/src/pages/_app.tsx +4 -2
- package/template/typescript/src/pages/index.tsx +14 -8
- package/template/javascript/src/components/Layout.js +0 -42
- package/template/typescript/src/components/Layout.tsx +0 -42
package/CHANGELOG.json
CHANGED
|
@@ -1,6 +1,62 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-digigov-app",
|
|
3
3
|
"entries": [
|
|
4
|
+
{
|
|
5
|
+
"version": "0.6.2",
|
|
6
|
+
"tag": "create-digigov-app_v0.6.2",
|
|
7
|
+
"date": "Tue, 08 Feb 2022 15:21:11 GMT",
|
|
8
|
+
"comments": {
|
|
9
|
+
"dependency": [
|
|
10
|
+
{
|
|
11
|
+
"comment": "Updating dependency \"@digigov/cli-lint\" from `0.5.26` to `0.5.27`"
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"version": "0.6.1",
|
|
18
|
+
"tag": "create-digigov-app_v0.6.1",
|
|
19
|
+
"date": "Wed, 02 Feb 2022 15:44:29 GMT",
|
|
20
|
+
"comments": {
|
|
21
|
+
"dependency": [
|
|
22
|
+
{
|
|
23
|
+
"comment": "Updating dependency \"@digigov/cli-lint\" from `0.5.25` to `0.5.26`"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"comment": "Updating dependency \"@digigov/cli-test\" from `0.5.24` to `0.5.25`"
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"version": "0.6.0",
|
|
33
|
+
"tag": "create-digigov-app_v0.6.0",
|
|
34
|
+
"date": "Mon, 31 Jan 2022 13:42:21 GMT",
|
|
35
|
+
"comments": {
|
|
36
|
+
"patch": [
|
|
37
|
+
{
|
|
38
|
+
"comment": "Add and remove css files for ts and js projects and add needed dependencies"
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
"minor": [
|
|
42
|
+
{
|
|
43
|
+
"comment": "Refactor templates to use @digigov/react-core"
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"version": "0.5.0",
|
|
50
|
+
"tag": "create-digigov-app_v0.5.0",
|
|
51
|
+
"date": "Thu, 30 Dec 2021 12:54:03 GMT",
|
|
52
|
+
"comments": {
|
|
53
|
+
"minor": [
|
|
54
|
+
{
|
|
55
|
+
"comment": "Update scaffolder's templates including @digigov/css configuration"
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
},
|
|
4
60
|
{
|
|
5
61
|
"version": "0.4.1",
|
|
6
62
|
"tag": "create-digigov-app_v0.4.1",
|
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,34 @@
|
|
|
1
1
|
# Change Log - create-digigov-app
|
|
2
2
|
|
|
3
|
-
This log was last generated on Tue,
|
|
3
|
+
This log was last generated on Tue, 08 Feb 2022 15:21:11 GMT and should not be manually modified.
|
|
4
|
+
|
|
5
|
+
## 0.6.2
|
|
6
|
+
Tue, 08 Feb 2022 15:21:11 GMT
|
|
7
|
+
|
|
8
|
+
_Version update only_
|
|
9
|
+
|
|
10
|
+
## 0.6.1
|
|
11
|
+
Wed, 02 Feb 2022 15:44:29 GMT
|
|
12
|
+
|
|
13
|
+
_Version update only_
|
|
14
|
+
|
|
15
|
+
## 0.6.0
|
|
16
|
+
Mon, 31 Jan 2022 13:42:21 GMT
|
|
17
|
+
|
|
18
|
+
### Minor changes
|
|
19
|
+
|
|
20
|
+
- Refactor templates to use @digigov/react-core
|
|
21
|
+
|
|
22
|
+
### Patches
|
|
23
|
+
|
|
24
|
+
- Add and remove css files for ts and js projects and add needed dependencies
|
|
25
|
+
|
|
26
|
+
## 0.5.0
|
|
27
|
+
Thu, 30 Dec 2021 12:54:03 GMT
|
|
28
|
+
|
|
29
|
+
### Minor changes
|
|
30
|
+
|
|
31
|
+
- Update scaffolder's templates including @digigov/css configuration
|
|
4
32
|
|
|
5
33
|
## 0.4.1
|
|
6
34
|
Tue, 02 Nov 2021 13:03:39 GMT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-digigov-app",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"description": "Create a DigiGOV App with ease",
|
|
5
5
|
"bin": "cli.js",
|
|
6
6
|
"files": [
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@digigov/cli": "0.5.25",
|
|
29
|
-
"@digigov/cli-lint": "0.5.
|
|
30
|
-
"@digigov/cli-test": "0.5.
|
|
29
|
+
"@digigov/cli-lint": "0.5.27",
|
|
30
|
+
"@digigov/cli-test": "0.5.25",
|
|
31
31
|
"typescript": "4.2.3"
|
|
32
32
|
},
|
|
33
33
|
"license": "MIT",
|
package/saofile.js
CHANGED
|
@@ -2,17 +2,20 @@ const { relative } = require('path');
|
|
|
2
2
|
const validate = require('validate-npm-package-name');
|
|
3
3
|
|
|
4
4
|
const digigovDepsDev = [
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
]
|
|
5
|
+
'@digigov/cli',
|
|
6
|
+
'@digigov/cli-lint',
|
|
7
|
+
'@digigov/cli-app',
|
|
8
|
+
'@digigov/cli-build',
|
|
9
|
+
'@digigov/cli-test',
|
|
10
|
+
];
|
|
11
11
|
|
|
12
12
|
const digigovDeps = [
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
'@digigov/ui',
|
|
14
|
+
'@digigov/nextjs',
|
|
15
|
+
'@digigov/react-core',
|
|
16
|
+
'@digigov/css',
|
|
17
|
+
'tailwindcss',
|
|
18
|
+
];
|
|
16
19
|
|
|
17
20
|
module.exports = {
|
|
18
21
|
prompts: require('./prompts'),
|
|
@@ -58,8 +61,10 @@ module.exports = {
|
|
|
58
61
|
'_package.json': 'package.json',
|
|
59
62
|
'_.prettierrc.js': '.prettierrc.js',
|
|
60
63
|
'_.eslintrc.js': '.eslintrc.js',
|
|
64
|
+
'_postcss.config.js': 'postcss.config.js',
|
|
65
|
+
'_tailwind.config.js': 'tailwind.config.js',
|
|
61
66
|
'_tsconfig.json': 'tsconfig.json',
|
|
62
|
-
|
|
67
|
+
_Dockerfile: 'Dockerfile',
|
|
63
68
|
},
|
|
64
69
|
});
|
|
65
70
|
|
|
@@ -74,13 +79,13 @@ module.exports = {
|
|
|
74
79
|
await this.npmInstall({ npmClient: this.answers.pm });
|
|
75
80
|
await this.npmInstall({
|
|
76
81
|
npmClient: this.answers.pm,
|
|
77
|
-
packages: digigovDeps
|
|
78
|
-
})
|
|
82
|
+
packages: digigovDeps,
|
|
83
|
+
});
|
|
79
84
|
await this.npmInstall({
|
|
80
85
|
npmClient: this.answers.pm,
|
|
81
86
|
packages: digigovDepsDev,
|
|
82
|
-
saveDev: true
|
|
83
|
-
})
|
|
87
|
+
saveDev: true,
|
|
88
|
+
});
|
|
84
89
|
}
|
|
85
90
|
|
|
86
91
|
const chalk = this.chalk;
|
package/template/_package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('@digigov/cli-app/tailwindrc')();
|
|
@@ -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,
|
|
4
|
-
import
|
|
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
|
-
<
|
|
8
|
+
<CommonLayout>
|
|
9
9
|
<Main>
|
|
10
10
|
<NotFound />
|
|
11
11
|
</Main>
|
|
12
|
-
<
|
|
13
|
-
</
|
|
12
|
+
<ASide></ASide>
|
|
13
|
+
</CommonLayout>
|
|
14
14
|
);
|
|
15
15
|
};
|
|
16
16
|
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import App from '@digigov/nextjs/App';
|
|
2
2
|
import initI18n from '@digigov/nextjs/i18n';
|
|
3
|
-
import el from '
|
|
4
|
-
import en from '
|
|
3
|
+
import el from '<%= name %>/locales/el';
|
|
4
|
+
import en from '<%= name %>/locales/en';
|
|
5
|
+
import 'tailwindcss/tailwind.css';
|
|
6
|
+
import '../../index.css';
|
|
5
7
|
|
|
6
8
|
initI18n({
|
|
7
9
|
el: {
|
|
@@ -1,22 +1,28 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useTranslation } from '@digigov/ui/app/i18n';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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';
|
|
7
12
|
|
|
8
13
|
const Home = () => {
|
|
9
14
|
const { t } = useTranslation();
|
|
10
15
|
return (
|
|
11
|
-
<
|
|
16
|
+
<CommonLayout>
|
|
12
17
|
<Main>
|
|
13
18
|
<PageTitle>
|
|
14
19
|
<PageTitleHeading>{t('app.name')}</PageTitleHeading>
|
|
15
20
|
</PageTitle>
|
|
16
|
-
<
|
|
21
|
+
<Paragraph>{t('app.intro_text')}</Paragraph>
|
|
22
|
+
<CallToAction href="/login">{t('button.start')}</CallToAction>
|
|
17
23
|
</Main>
|
|
18
|
-
<
|
|
19
|
-
</
|
|
24
|
+
<Aside></Aside>
|
|
25
|
+
</CommonLayout>
|
|
20
26
|
);
|
|
21
27
|
};
|
|
22
28
|
|
|
@@ -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,
|
|
4
|
-
import
|
|
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
|
-
<
|
|
8
|
+
<CommonLayout>
|
|
9
9
|
<Main>
|
|
10
10
|
<NotFound />
|
|
11
11
|
</Main>
|
|
12
|
-
<
|
|
13
|
-
</
|
|
12
|
+
<Aside></Aside>
|
|
13
|
+
</CommonLayout>
|
|
14
14
|
);
|
|
15
15
|
};
|
|
16
16
|
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import App from '@digigov/nextjs/App';
|
|
2
2
|
import initI18n from '@digigov/nextjs/i18n';
|
|
3
|
-
import el from '
|
|
4
|
-
import en from '
|
|
3
|
+
import el from '<%= name %>/locales/el';
|
|
4
|
+
import en from '<%= name %>/locales/en';
|
|
5
|
+
import 'tailwindcss/tailwind.css';
|
|
6
|
+
import '../../index.css';
|
|
5
7
|
|
|
6
8
|
initI18n({
|
|
7
9
|
el: {
|
|
@@ -1,22 +1,28 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useTranslation } from '@digigov/ui/app/i18n';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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';
|
|
7
12
|
|
|
8
13
|
const Home: React.FC = () => {
|
|
9
14
|
const { t } = useTranslation();
|
|
10
15
|
return (
|
|
11
|
-
<
|
|
16
|
+
<CommonLayout>
|
|
12
17
|
<Main>
|
|
13
18
|
<PageTitle>
|
|
14
19
|
<PageTitleHeading>{t('app.name')}</PageTitleHeading>
|
|
15
20
|
</PageTitle>
|
|
16
|
-
<
|
|
21
|
+
<Paragraph>{t('app.intro_text')}</Paragraph>
|
|
22
|
+
<CallToAction href="/login">{t('button.start')}</CallToAction>
|
|
17
23
|
</Main>
|
|
18
|
-
<
|
|
19
|
-
</
|
|
24
|
+
<Aside></Aside>
|
|
25
|
+
</CommonLayout>
|
|
20
26
|
);
|
|
21
27
|
};
|
|
22
28
|
|
|
@@ -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,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;
|