@eeacms/volto-bise-policy 1.0.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/.coverage.babel.config.js +9 -0
- package/.i18n.babel.config.js +1 -0
- package/.project.eslintrc.js +47 -0
- package/.release-it.json +17 -0
- package/CHANGELOG.md +27 -0
- package/DEVELOP.md +53 -0
- package/LICENSE.md +9 -0
- package/README.md +84 -0
- package/RELEASE.md +74 -0
- package/babel.config.js +17 -0
- package/bootstrap +41 -0
- package/cypress.config.js +27 -0
- package/jest-addon.config.js +36 -0
- package/locales/bg/LC_MESSAGES/volto.po +14 -0
- package/locales/bg.json +1 -0
- package/locales/bs/LC_MESSAGES/volto.po +14 -0
- package/locales/bs.json +1 -0
- package/locales/cs/LC_MESSAGES/volto.po +14 -0
- package/locales/cs.json +1 -0
- package/locales/da/LC_MESSAGES/volto.po +14 -0
- package/locales/da.json +1 -0
- package/locales/de/LC_MESSAGES/volto.po +29 -0
- package/locales/de.json +1 -0
- package/locales/el/LC_MESSAGES/volto.po +14 -0
- package/locales/el.json +1 -0
- package/locales/en/LC_MESSAGES/volto.po +14 -0
- package/locales/en.json +1 -0
- package/locales/es/LC_MESSAGES/volto.po +24 -0
- package/locales/es.json +1 -0
- package/locales/et/LC_MESSAGES/volto.po +14 -0
- package/locales/et.json +1 -0
- package/locales/eu/LC_MESSAGES/volto.po +19 -0
- package/locales/eu.json +1 -0
- package/locales/fi/LC_MESSAGES/volto.po +14 -0
- package/locales/fi.json +1 -0
- package/locales/fr/LC_MESSAGES/volto.po +29 -0
- package/locales/fr.json +1 -0
- package/locales/ga/LC_MESSAGES/volto.po +14 -0
- package/locales/ga.json +1 -0
- package/locales/hr/LC_MESSAGES/volto.po +14 -0
- package/locales/hr.json +1 -0
- package/locales/hu/LC_MESSAGES/volto.po +14 -0
- package/locales/hu.json +1 -0
- package/locales/is/LC_MESSAGES/volto.po +14 -0
- package/locales/is.json +1 -0
- package/locales/it/LC_MESSAGES/volto.po +14 -0
- package/locales/it.json +1 -0
- package/locales/ja/LC_MESSAGES/volto.po +21 -0
- package/locales/ja.json +1 -0
- package/locales/lt/LC_MESSAGES/volto.po +14 -0
- package/locales/lt.json +1 -0
- package/locales/lv/LC_MESSAGES/volto.po +14 -0
- package/locales/lv.json +1 -0
- package/locales/mk/LC_MESSAGES/volto.po +14 -0
- package/locales/mk.json +1 -0
- package/locales/mt/LC_MESSAGES/volto.po +14 -0
- package/locales/mt.json +1 -0
- package/locales/nl/LC_MESSAGES/volto.po +33 -0
- package/locales/nl.json +1 -0
- package/locales/no/LC_MESSAGES/volto.po +14 -0
- package/locales/no.json +1 -0
- package/locales/pl/LC_MESSAGES/volto.po +14 -0
- package/locales/pl.json +1 -0
- package/locales/pt/LC_MESSAGES/volto.po +22 -0
- package/locales/pt.json +1 -0
- package/locales/pt_BR/LC_MESSAGES/volto.po +20 -0
- package/locales/pt_BR.json +1 -0
- package/locales/ro/LC_MESSAGES/volto.po +20 -0
- package/locales/ro.json +1 -0
- package/locales/sh/LC_MESSAGES/volto.po +14 -0
- package/locales/sh.json +1 -0
- package/locales/sk/LC_MESSAGES/volto.po +14 -0
- package/locales/sk.json +1 -0
- package/locales/sl/LC_MESSAGES/volto.po +14 -0
- package/locales/sl.json +1 -0
- package/locales/sq/LC_MESSAGES/volto.po +14 -0
- package/locales/sq.json +1 -0
- package/locales/sv/LC_MESSAGES/volto.po +14 -0
- package/locales/sv.json +1 -0
- package/locales/tr/LC_MESSAGES/volto.po +14 -0
- package/locales/tr.json +1 -0
- package/locales/volto.pot +16 -0
- package/package.json +57 -0
- package/razzle.extend.js +29 -0
- package/src/components/manage/Blocks/BodyClass/Edit.jsx +30 -0
- package/src/components/manage/Blocks/BodyClass/View.jsx +12 -0
- package/src/components/manage/Blocks/BodyClass/index.js +24 -0
- package/src/components/manage/Blocks/BodyClass/schema.js +20 -0
- package/src/components/manage/Blocks/FactsheetsListing/FactsheetsListingEdit.jsx +32 -0
- package/src/components/manage/Blocks/FactsheetsListing/FactsheetsListingView.jsx +81 -0
- package/src/components/manage/Blocks/FactsheetsListing/index.js +24 -0
- package/src/components/manage/Blocks/FactsheetsListing/schema.js +20 -0
- package/src/components/manage/Blocks/KeyFacts/KeyFactsEdit.jsx +34 -0
- package/src/components/manage/Blocks/KeyFacts/KeyFactsView.jsx +68 -0
- package/src/components/manage/Blocks/KeyFacts/index.js +22 -0
- package/src/components/manage/Blocks/KeyFacts/schema.jsx +74 -0
- package/src/components/manage/Blocks/MaesViewer/MaesViewerEdit.jsx +64 -0
- package/src/components/manage/Blocks/MaesViewer/MaesViewerView.jsx +136 -0
- package/src/components/manage/Blocks/MaesViewer/constants.js +1 -0
- package/src/components/manage/Blocks/MaesViewer/index.js +22 -0
- package/src/components/manage/Blocks/MaesViewer/schema.js +60 -0
- package/src/components/manage/Blocks/MaesViewer/style.css +64 -0
- package/src/components/manage/Blocks/MaesViewer/utils.js +473 -0
- package/src/components/manage/Blocks/Navigation/Edit.jsx +27 -0
- package/src/components/manage/Blocks/Navigation/View.jsx +43 -0
- package/src/components/manage/Blocks/Navigation/index.js +22 -0
- package/src/components/manage/Blocks/Navigation/schema.js +43 -0
- package/src/components/manage/Blocks/Navigation/styles.less +42 -0
- package/src/components/manage/Blocks/Redirect/Edit.jsx +29 -0
- package/src/components/manage/Blocks/Redirect/View.jsx +13 -0
- package/src/components/manage/Blocks/Redirect/index.js +24 -0
- package/src/components/manage/Blocks/Redirect/schema.js +20 -0
- package/src/components/manage/Blocks/index.js +17 -0
- package/src/components/manage/Styles/index.js +163 -0
- package/src/customizations/@eeacms/volto-block-style/StyleWrapper/schema.js +206 -0
- package/src/customizations/volto/components/manage/Toolbar/More.jsx +547 -0
- package/src/customizations/volto/components/theme/Footer/Footer.jsx +25 -0
- package/src/customizations/volto/components/theme/Header/Header.jsx +301 -0
- package/src/index.js +77 -0
- package/theme/assets/icons/plus.png +0 -0
- package/theme/assets/icons/plus.svg +6 -0
- package/theme/assets/icons/search.svg +3 -0
- package/theme/assets/images/Header/bise-logo-white.svg +47 -0
- package/theme/assets/images/Header/bise-logo.svg +132 -0
- package/theme/collections/table.variables +17 -0
- package/theme/extras/banner.variables +5 -0
- package/theme/extras/factsheets.less +76 -0
- package/theme/extras/footer.variables +6 -0
- package/theme/extras/header.overrides +30 -0
- package/theme/extras/header.variables +7 -0
- package/theme/extras/hero.overrides +4 -0
- package/theme/extras/inpageNavigation.variables +5 -0
- package/theme/extras/keyfacts.less +202 -0
- package/theme/extras/pluggables.less +191 -0
- package/theme/extras/stylemenu.less +48 -0
- package/theme/extras/tocnav.less +158 -0
- package/theme/globals/site.overrides +78 -0
- package/theme/globals/site.variables +22 -0
- package/theme/theme.config +135 -0
- package/theme/tokens/colors.less +15 -0
- package/theme/tokens/tokens.less +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('@plone/volto/babel');
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
|
|
4
|
+
const projectRootPath = fs.existsSync('./project')
|
|
5
|
+
? fs.realpathSync('./project')
|
|
6
|
+
: fs.realpathSync('./../../../');
|
|
7
|
+
const packageJson = require(path.join(projectRootPath, 'package.json'));
|
|
8
|
+
const jsConfig = require(path.join(projectRootPath, 'jsconfig.json'))
|
|
9
|
+
.compilerOptions;
|
|
10
|
+
|
|
11
|
+
const pathsConfig = jsConfig.paths;
|
|
12
|
+
|
|
13
|
+
let voltoPath = path.join(projectRootPath, 'node_modules/@plone/volto');
|
|
14
|
+
|
|
15
|
+
Object.keys(pathsConfig).forEach((pkg) => {
|
|
16
|
+
if (pkg === '@plone/volto') {
|
|
17
|
+
voltoPath = `./${jsConfig.baseUrl}/${pathsConfig[pkg][0]}`;
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
const AddonConfigurationRegistry = require(`${voltoPath}/addon-registry.js`);
|
|
21
|
+
const reg = new AddonConfigurationRegistry(projectRootPath);
|
|
22
|
+
|
|
23
|
+
// Extends ESlint configuration for adding the aliases to `src` directories in Volto addons
|
|
24
|
+
const addonAliases = Object.keys(reg.packages).map((o) => [
|
|
25
|
+
o,
|
|
26
|
+
reg.packages[o].modulePath,
|
|
27
|
+
]);
|
|
28
|
+
|
|
29
|
+
module.exports = {
|
|
30
|
+
extends: `${projectRootPath}/node_modules/@plone/volto/.eslintrc`,
|
|
31
|
+
settings: {
|
|
32
|
+
'import/resolver': {
|
|
33
|
+
alias: {
|
|
34
|
+
map: [
|
|
35
|
+
['@plone/volto', '@plone/volto/src'],
|
|
36
|
+
...addonAliases,
|
|
37
|
+
['@package', `${__dirname}/src`],
|
|
38
|
+
['~', `${__dirname}/src`],
|
|
39
|
+
],
|
|
40
|
+
extensions: ['.js', '.jsx', '.json'],
|
|
41
|
+
},
|
|
42
|
+
'babel-plugin-root-import': {
|
|
43
|
+
rootPathSuffix: 'src',
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
};
|
package/.release-it.json
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"npm": {
|
|
3
|
+
"publish": false
|
|
4
|
+
},
|
|
5
|
+
"git": {
|
|
6
|
+
"changelog": "npx auto-changelog --stdout --commit-limit false -u --template https://raw.githubusercontent.com/release-it/release-it/master/templates/changelog-compact.hbs",
|
|
7
|
+
"tagName": "${version}"
|
|
8
|
+
},
|
|
9
|
+
"github": {
|
|
10
|
+
"release": true,
|
|
11
|
+
"releaseName": "${version}",
|
|
12
|
+
"releaseNotes": "npx auto-changelog --stdout --commit-limit false -u --template https://raw.githubusercontent.com/release-it/release-it/master/templates/changelog-compact.hbs"
|
|
13
|
+
},
|
|
14
|
+
"hooks": {
|
|
15
|
+
"after:bump": "npx auto-changelog --commit-limit false -p"
|
|
16
|
+
}
|
|
17
|
+
}
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
### Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file. Dates are displayed in UTC.
|
|
4
|
+
|
|
5
|
+
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
6
|
+
|
|
7
|
+
### [1.0.0](https://github.com/eea/volto-bise-policy/compare/0.1.0...1.0.0) - 7 December 2022
|
|
8
|
+
|
|
9
|
+
#### :hammer_and_wrench: Others
|
|
10
|
+
|
|
11
|
+
- Don't run cypress [Miu Razvan - [`8e7a5e8`](https://github.com/eea/volto-bise-policy/commit/8e7a5e872dafa9683e04221c81784433bc56e291)]
|
|
12
|
+
- Add locales [Miu Razvan - [`be5bf2c`](https://github.com/eea/volto-bise-policy/commit/be5bf2c57ec499ac4b32e42b5310b12825426d8c)]
|
|
13
|
+
- add volto-eea-website-theme dependency [Miu Razvan - [`509f71c`](https://github.com/eea/volto-bise-policy/commit/509f71c904335fd364ec106cdc76a29ce0838e00)]
|
|
14
|
+
- eslint fix [Miu Razvan - [`448c80d`](https://github.com/eea/volto-bise-policy/commit/448c80de4a71cc445a0bc5c5a11e0044c76401f9)]
|
|
15
|
+
- add dependecies + blocks + etc [Miu Razvan - [`21c2f47`](https://github.com/eea/volto-bise-policy/commit/21c2f47a8af045c9976582fab9f3f5caff833afb)]
|
|
16
|
+
- Update [Miu Razvan - [`a05fb18`](https://github.com/eea/volto-bise-policy/commit/a05fb18dae525a3ecf58d4ce21de359fda752e6a)]
|
|
17
|
+
- Add missing dependencies [Miu Razvan - [`3712bf8`](https://github.com/eea/volto-bise-policy/commit/3712bf85fc537fa5448d80242fed56b26e33855b)]
|
|
18
|
+
- Prepare 1.0.0 release [Miu Razvan - [`fbb707d`](https://github.com/eea/volto-bise-policy/commit/fbb707d01afe6642a223e2fb3e88abb677de241e)]
|
|
19
|
+
- Update [Miu Razvan - [`487a390`](https://github.com/eea/volto-bise-policy/commit/487a3900f707d88a40d435d88ff6072f1eb9698f)]
|
|
20
|
+
- Fix Jenkinsfile [Miu Razvan - [`96f92cc`](https://github.com/eea/volto-bise-policy/commit/96f92cc4f14b066ced8ec1c6e48a782780f10d80)]
|
|
21
|
+
- Rename to volto-bise-policy [Miu Razvan - [`045b4aa`](https://github.com/eea/volto-bise-policy/commit/045b4aa61164c51db36db40fee1151d31829b9fa)]
|
|
22
|
+
- Initial bise eea design [Miu Razvan - [`8fdb2d9`](https://github.com/eea/volto-bise-policy/commit/8fdb2d980f57a99d52ecd2c6b0114156108b051f)]
|
|
23
|
+
### 0.1.0 - 7 December 2022
|
|
24
|
+
|
|
25
|
+
#### :hammer_and_wrench: Others
|
|
26
|
+
|
|
27
|
+
- Initial commit [Miu Razvan - [`3dfd615`](https://github.com/eea/volto-bise-policy/commit/3dfd615c9a3d78af8253f09ef4de60129b27baff)]
|
package/DEVELOP.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# volto-bise-policy
|
|
2
|
+
|
|
3
|
+
## Develop
|
|
4
|
+
|
|
5
|
+
Before starting make sure your development environment is properly set. See [Volto Developer Documentation](https://docs.voltocms.com/getting-started/install/)
|
|
6
|
+
|
|
7
|
+
1. Make sure you have installed `yo`, `@plone/generator-volto` and `mrs-developer`
|
|
8
|
+
|
|
9
|
+
npm install -g yo @plone/generator-volto mrs-developer
|
|
10
|
+
|
|
11
|
+
1. Create new volto app
|
|
12
|
+
|
|
13
|
+
yo @plone/volto my-volto-project --addon @eeacms/volto-bise-policy --skip-install
|
|
14
|
+
cd my-volto-project
|
|
15
|
+
|
|
16
|
+
1. Add the following to `mrs.developer.json`:
|
|
17
|
+
|
|
18
|
+
{
|
|
19
|
+
"volto-bise-policy": {
|
|
20
|
+
"url": "https://github.com/eea/volto-bise-policy.git",
|
|
21
|
+
"package": "@eeacms/volto-bise-policy",
|
|
22
|
+
"branch": "develop",
|
|
23
|
+
"path": "src"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
1. Install
|
|
28
|
+
|
|
29
|
+
yarn develop
|
|
30
|
+
yarn
|
|
31
|
+
|
|
32
|
+
1. Start backend
|
|
33
|
+
|
|
34
|
+
docker pull plone
|
|
35
|
+
docker run -d --name plone -p 8080:8080 -e SITE=Plone -e PROFILES="profile-plone.restapi:blocks" plone
|
|
36
|
+
|
|
37
|
+
...wait for backend to setup and start - `Ready to handle requests`:
|
|
38
|
+
|
|
39
|
+
docker logs -f plone
|
|
40
|
+
|
|
41
|
+
...you can also check http://localhost:8080/Plone
|
|
42
|
+
|
|
43
|
+
1. Start frontend
|
|
44
|
+
|
|
45
|
+
yarn start
|
|
46
|
+
|
|
47
|
+
1. Go to http://localhost:3000
|
|
48
|
+
|
|
49
|
+
1. Happy hacking!
|
|
50
|
+
|
|
51
|
+
cd src/addons/volto-bise-policy/
|
|
52
|
+
|
|
53
|
+
s/volto-bise-policy/
|
package/LICENSE.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020 European Environment Agency
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# volto-bise-policy
|
|
2
|
+
|
|
3
|
+
[](https://github.com/eea/volto-bise-policy/releases)
|
|
4
|
+
|
|
5
|
+
[](https://ci.eionet.europa.eu/view/Github/job/volto-addons/job/volto-bise-policy/job/master/display/redirect)
|
|
6
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-bise-policy-master)
|
|
7
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-bise-policy-master)
|
|
8
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-bise-policy-master)
|
|
9
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-bise-policy-master)
|
|
10
|
+
|
|
11
|
+
[](https://ci.eionet.europa.eu/view/Github/job/volto-addons/job/volto-bise-policy/job/develop/display/redirect)
|
|
12
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-bise-policy-develop)
|
|
13
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-bise-policy-develop)
|
|
14
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-bise-policy-develop)
|
|
15
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-bise-policy-develop)
|
|
16
|
+
|
|
17
|
+
[Volto](https://github.com/plone/volto) add-on
|
|
18
|
+
|
|
19
|
+
## Features
|
|
20
|
+
|
|
21
|
+
Demo GIF
|
|
22
|
+
|
|
23
|
+
## Getting started
|
|
24
|
+
|
|
25
|
+
### Add volto-bise-policy to your Volto project
|
|
26
|
+
|
|
27
|
+
1. Make sure you have a [Plone backend](https://plone.org/download) up-and-running at http://localhost:8080/Plone
|
|
28
|
+
|
|
29
|
+
1. Start Volto frontend
|
|
30
|
+
|
|
31
|
+
- If you already have a volto project, just update `package.json`:
|
|
32
|
+
|
|
33
|
+
```JSON
|
|
34
|
+
"addons": [
|
|
35
|
+
"@eeacms/volto-bise-policy"
|
|
36
|
+
],
|
|
37
|
+
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"@eeacms/volto-bise-policy": "*"
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
- If not, create one:
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
npm install -g yo @plone/generator-volto
|
|
47
|
+
yo @plone/volto my-volto-project --canary --addon @eeacms/volto-bise-policy
|
|
48
|
+
cd my-volto-project
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
1. Install new add-ons and restart Volto:
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
yarn
|
|
55
|
+
yarn start
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
1. Go to http://localhost:3000
|
|
59
|
+
|
|
60
|
+
1. Happy editing!
|
|
61
|
+
|
|
62
|
+
## Release
|
|
63
|
+
|
|
64
|
+
See [RELEASE.md](https://github.com/eea/volto-bise-policy/blob/master/RELEASE.md).
|
|
65
|
+
|
|
66
|
+
## How to contribute
|
|
67
|
+
|
|
68
|
+
See [DEVELOP.md](https://github.com/eea/volto-bise-policy/blob/master/DEVELOP.md).
|
|
69
|
+
|
|
70
|
+
## Copyright and license
|
|
71
|
+
|
|
72
|
+
The Initial Owner of the Original Code is European Environment Agency (EEA).
|
|
73
|
+
All Rights Reserved.
|
|
74
|
+
|
|
75
|
+
See [LICENSE.md](https://github.com/eea/volto-bise-policy/blob/master/LICENSE.md) for details.
|
|
76
|
+
|
|
77
|
+
## Funding
|
|
78
|
+
|
|
79
|
+
[European Environment Agency (EU)](http://eea.europa.eu)
|
|
80
|
+
don-template/blob/master/LICENSE.md) for details.
|
|
81
|
+
|
|
82
|
+
## Funding
|
|
83
|
+
|
|
84
|
+
[European Environment Agency (EU)](http://eea.europa.eu)
|
package/RELEASE.md
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
## Release
|
|
2
|
+
|
|
3
|
+
### Automatic release using Jenkins
|
|
4
|
+
|
|
5
|
+
* The automatic release is started by creating a [Pull Request](../../compare/master...develop) from `develop` to `master`. The pull request status checks correlated to the branch and PR Jenkins jobs need to be processed successfully. 1 review from a github user with rights is mandatory.
|
|
6
|
+
* It runs on every commit on `master` branch, which is protected from direct commits, only allowing pull request merge commits.
|
|
7
|
+
* The automatic release is done by [Jenkins](https://ci.eionet.europa.eu). The status of the release job can be seen both in the Readme.md badges and the green check/red cross/yellow circle near the last commit information. If you click on the icon, you will have the list of checks that were run. The `continuous-integration/jenkins/branch` link goes to the Jenkins job execution webpage.
|
|
8
|
+
* Automated release scripts are located in the `eeacms/gitflow` docker image, specifically [js-release.sh](https://github.com/eea/eea.docker.gitflow/blob/master/src/js-release.sh) script. It uses the `release-it` tool.
|
|
9
|
+
* As long as a PR request is open from develop to master, the PR Jenkins job will automatically re-create the CHANGELOG.md and package.json files to be production-ready.
|
|
10
|
+
* The version format must be MAJOR.MINOR.PATCH. By default, next release is set to next minor version (with patch 0).
|
|
11
|
+
* You can manually change the version in `package.json`. The new version must not be already present in the tags/releases of the repository, otherwise it will be automatically increased by the script. Any changes to the version will trigger a `CHANGELOG.md` re-generation.
|
|
12
|
+
* Automated commits and commits with [JENKINS] or [YARN] in the commit log are excluded from `CHANGELOG.md` file.
|
|
13
|
+
|
|
14
|
+
### Manual release from the develop branch ( beta release )
|
|
15
|
+
|
|
16
|
+
#### Installation and configuration of release-it
|
|
17
|
+
|
|
18
|
+
You need to first install the [release-it](https://github.com/release-it/release-it) client.
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
npm install -g release-it
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Release-it uses the configuration written in the [`.release-it.json`](./.release-it.json) file located in the root of the repository.
|
|
25
|
+
|
|
26
|
+
Release-it is a tool that automates 4 important steps in the release process:
|
|
27
|
+
|
|
28
|
+
1. Version increase in `package.json` ( increased from the current version in `package.json`)
|
|
29
|
+
2. `CHANGELOG.md` automatic generation from commit messages ( grouped by releases )
|
|
30
|
+
3. GitHub release on the commit with the changelog and package.json modification on the develop branch
|
|
31
|
+
4. NPM release ( by default it's disabled, but can be enabled in the configuration file )
|
|
32
|
+
|
|
33
|
+
To configure the authentification, you need to export GITHUB_TOKEN for [GitHub](https://github.com/settings/tokens)
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
export GITHUB_TOKEN=XXX-XXXXXXXXXXXXXXXXXXXXXX
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
To configure npm, you can use the `npm login` command or use a configuration file with a TOKEN :
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
echo "//registry.npmjs.org/:_authToken=YYYYYYYYYYYYYYYYYYYYYYYYYYYYYY" > .npmrc
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
#### Using release-it tool
|
|
46
|
+
|
|
47
|
+
There are 3 yarn scripts that can be run to do the release
|
|
48
|
+
|
|
49
|
+
##### yarn release-beta
|
|
50
|
+
|
|
51
|
+
Automatically calculates and presents 3 beta versions - patch, minor and major for you to choose ( or Other for manual input).
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
? Select increment (next version):
|
|
55
|
+
❯ prepatch (0.1.1-beta.0)
|
|
56
|
+
preminor (0.2.0-beta.0)
|
|
57
|
+
premajor (1.0.0-beta.0)
|
|
58
|
+
Other, please specify...
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
##### yarn release-major-beta
|
|
62
|
+
|
|
63
|
+
Same as `yarn release-beta`, but with premajor version pre-selected.
|
|
64
|
+
|
|
65
|
+
##### yarn release
|
|
66
|
+
|
|
67
|
+
Generic command, does not automatically add the `beta` to version, but you can still manually write it if you choose Other.
|
|
68
|
+
|
|
69
|
+
#### Important notes
|
|
70
|
+
|
|
71
|
+
> Do not use release-it tool on master branch, the commit on CHANGELOG.md file and the version increase in the package.json file can't be done without a PULL REQUEST.
|
|
72
|
+
|
|
73
|
+
> Do not keep Pull Requests from develop to master branches open when you are doing beta releases from the develop branch. As long as a PR to master is open, an automatic script will run on every commit and will update both the version and the changelog to a production-ready state - ( MAJOR.MINOR.PATCH mandatory format for version).
|
|
74
|
+
|
package/babel.config.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
module.exports = function (api) {
|
|
2
|
+
api.cache(true);
|
|
3
|
+
const presets = ['razzle'];
|
|
4
|
+
const plugins = [
|
|
5
|
+
[
|
|
6
|
+
'react-intl', // React Intl extractor, required for the whole i18n infrastructure to work
|
|
7
|
+
{
|
|
8
|
+
messagesDir: './build/messages/',
|
|
9
|
+
},
|
|
10
|
+
],
|
|
11
|
+
];
|
|
12
|
+
|
|
13
|
+
return {
|
|
14
|
+
plugins,
|
|
15
|
+
presets,
|
|
16
|
+
};
|
|
17
|
+
};
|
package/bootstrap
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
const path = require('path');
|
|
2
|
+
const fs = require('fs');
|
|
3
|
+
const ejs = require('ejs');
|
|
4
|
+
|
|
5
|
+
const currentDir = path.basename(process.cwd());
|
|
6
|
+
|
|
7
|
+
const bootstrap = function (ofile) {
|
|
8
|
+
fs.readFile(ofile, 'utf8', function (err, data) {
|
|
9
|
+
if (err) {
|
|
10
|
+
return console.log(err);
|
|
11
|
+
}
|
|
12
|
+
const result = ejs.render(data, {
|
|
13
|
+
addonName: `@eeacms/${currentDir}`,
|
|
14
|
+
name: currentDir
|
|
15
|
+
});
|
|
16
|
+
const output = ofile.replace('.tpl', '');
|
|
17
|
+
fs.writeFile(output, result, 'utf8', function (err) {
|
|
18
|
+
if (err) {
|
|
19
|
+
return console.log(err);
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
if (ofile.includes('.tpl')) {
|
|
23
|
+
fs.unlink(ofile, (err) => {
|
|
24
|
+
if (err) {
|
|
25
|
+
return console.error(err);
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
fs.readdir(".", { withFileTypes: true }, (err, dirents) => {
|
|
33
|
+
const files = dirents
|
|
34
|
+
.filter(dirent => dirent.isFile())
|
|
35
|
+
.map(dirent => dirent.name);
|
|
36
|
+
files.forEach(function (file) {
|
|
37
|
+
if (file != 'bootstrap') {
|
|
38
|
+
bootstrap(file);
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
const { defineConfig } = require('cypress');
|
|
2
|
+
|
|
3
|
+
module.exports = defineConfig({
|
|
4
|
+
viewportWidth: 1280,
|
|
5
|
+
defaultCommandTimeout: 8888,
|
|
6
|
+
chromeWebSecurity: false,
|
|
7
|
+
reporter: 'junit',
|
|
8
|
+
video: true,
|
|
9
|
+
retries: {
|
|
10
|
+
runMode: 8,
|
|
11
|
+
openMode: 0,
|
|
12
|
+
},
|
|
13
|
+
reporterOptions: {
|
|
14
|
+
mochaFile: 'cypress/reports/cypress-[hash].xml',
|
|
15
|
+
jenkinsMode: true,
|
|
16
|
+
toConsole: true,
|
|
17
|
+
},
|
|
18
|
+
e2e: {
|
|
19
|
+
setupNodeEvents(on, config) {
|
|
20
|
+
// e2e testing node events setup code
|
|
21
|
+
require('@cypress/code-coverage/task')(on, config);
|
|
22
|
+
require('cypress-fail-fast/plugin')(on, config);
|
|
23
|
+
return config;
|
|
24
|
+
},
|
|
25
|
+
baseUrl: 'http://localhost:3000',
|
|
26
|
+
},
|
|
27
|
+
});
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
testMatch: ['**/src/addons/**/?(*.)+(spec|test).[jt]s?(x)'],
|
|
3
|
+
collectCoverageFrom: [
|
|
4
|
+
'src/addons/**/src/**/*.{js,jsx,ts,tsx}',
|
|
5
|
+
'!src/**/*.d.ts',
|
|
6
|
+
],
|
|
7
|
+
moduleNameMapper: {
|
|
8
|
+
'@plone/volto/cypress': '<rootDir>/node_modules/@plone/volto/cypress',
|
|
9
|
+
'@plone/volto/babel': '<rootDir>/node_modules/@plone/volto/babel',
|
|
10
|
+
'@plone/volto/(.*)$': '<rootDir>/node_modules/@plone/volto/src/$1',
|
|
11
|
+
'@package/(.*)$': '<rootDir>/src/$1',
|
|
12
|
+
'@root/(.*)$': '<rootDir>/src/$1',
|
|
13
|
+
'@plone/volto-quanta/(.*)$': '<rootDir>/src/addons/volto-quanta/src/$1',
|
|
14
|
+
'@eeacms/(.*?)/(.*)$': '<rootDir>/src/addons/$1/src/$2',
|
|
15
|
+
'@plone/volto-slate':
|
|
16
|
+
'<rootDir>/node_modules/@plone/volto/packages/volto-slate/src',
|
|
17
|
+
'~/(.*)$': '<rootDir>/src/$1',
|
|
18
|
+
'load-volto-addons':
|
|
19
|
+
'<rootDir>/node_modules/@plone/volto/jest-addons-loader.js',
|
|
20
|
+
'\\.(css|less|scss|sass)$': 'identity-obj-proxy',
|
|
21
|
+
},
|
|
22
|
+
transform: {
|
|
23
|
+
'^.+\\.js(x)?$': 'babel-jest',
|
|
24
|
+
'^.+\\.(png)$': 'jest-file',
|
|
25
|
+
'^.+\\.(jpg)$': 'jest-file',
|
|
26
|
+
'^.+\\.(svg)$': './node_modules/@plone/volto/jest-svgsystem-transform.js',
|
|
27
|
+
},
|
|
28
|
+
coverageThreshold: {
|
|
29
|
+
global: {
|
|
30
|
+
branches: 5,
|
|
31
|
+
functions: 5,
|
|
32
|
+
lines: 5,
|
|
33
|
+
statements: 5,
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
msgid ""
|
|
2
|
+
msgstr ""
|
|
3
|
+
"Project-Id-Version: \n"
|
|
4
|
+
"Report-Msgid-Bugs-To: \n"
|
|
5
|
+
"POT-Creation-Date: \n"
|
|
6
|
+
"PO-Revision-Date: \n"
|
|
7
|
+
"Last-Translator: \n"
|
|
8
|
+
"Language: \n"
|
|
9
|
+
"Language-Team: \n"
|
|
10
|
+
"Content-Type: \n"
|
|
11
|
+
"Content-Transfer-Encoding: \n"
|
|
12
|
+
"Plural-Forms: \n"
|
|
13
|
+
|
|
14
|
+
|
package/locales/bg.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
msgid ""
|
|
2
|
+
msgstr ""
|
|
3
|
+
"Project-Id-Version: \n"
|
|
4
|
+
"Report-Msgid-Bugs-To: \n"
|
|
5
|
+
"POT-Creation-Date: \n"
|
|
6
|
+
"PO-Revision-Date: \n"
|
|
7
|
+
"Last-Translator: \n"
|
|
8
|
+
"Language: \n"
|
|
9
|
+
"Language-Team: \n"
|
|
10
|
+
"Content-Type: \n"
|
|
11
|
+
"Content-Transfer-Encoding: \n"
|
|
12
|
+
"Plural-Forms: \n"
|
|
13
|
+
|
|
14
|
+
|
package/locales/bs.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
msgid ""
|
|
2
|
+
msgstr ""
|
|
3
|
+
"Project-Id-Version: \n"
|
|
4
|
+
"Report-Msgid-Bugs-To: \n"
|
|
5
|
+
"POT-Creation-Date: \n"
|
|
6
|
+
"PO-Revision-Date: \n"
|
|
7
|
+
"Last-Translator: \n"
|
|
8
|
+
"Language: \n"
|
|
9
|
+
"Language-Team: \n"
|
|
10
|
+
"Content-Type: \n"
|
|
11
|
+
"Content-Transfer-Encoding: \n"
|
|
12
|
+
"Plural-Forms: \n"
|
|
13
|
+
|
|
14
|
+
|
package/locales/cs.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
msgid ""
|
|
2
|
+
msgstr ""
|
|
3
|
+
"Project-Id-Version: \n"
|
|
4
|
+
"Report-Msgid-Bugs-To: \n"
|
|
5
|
+
"POT-Creation-Date: \n"
|
|
6
|
+
"PO-Revision-Date: \n"
|
|
7
|
+
"Last-Translator: \n"
|
|
8
|
+
"Language: \n"
|
|
9
|
+
"Language-Team: \n"
|
|
10
|
+
"Content-Type: \n"
|
|
11
|
+
"Content-Transfer-Encoding: \n"
|
|
12
|
+
"Plural-Forms: \n"
|
|
13
|
+
|
|
14
|
+
|
package/locales/da.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Translation of plone.pot to German
|
|
2
|
+
# Jan Ulrich Hasecke <jan.ulrich@hasecke.com>, 2003-2010.
|
|
3
|
+
# Simon Eisenmann <simon@struktur.de>, 2003.
|
|
4
|
+
# Hanno Schlichting <plone@hannosch.info>, 2003-2008.
|
|
5
|
+
# Dominik Bittl <dominik@umount.org>, 2005.
|
|
6
|
+
# Christian Ullrich <chris@chrullrich.de>, 2005.
|
|
7
|
+
# Thomas Lotze <tl@gocept.com>, 2005-2008.
|
|
8
|
+
# Sven Deichmann <deichmann@werkbank.com>, 2008-2010.
|
|
9
|
+
# Harald Friessnegger <harald@webmeisterei.com>, 2011.
|
|
10
|
+
# Andreas Jung <info@zopyx.com>, 2012
|
|
11
|
+
msgid ""
|
|
12
|
+
msgstr ""
|
|
13
|
+
"Project-Id-Version: Plone\n"
|
|
14
|
+
"Report-Msgid-Bugs-To: \n"
|
|
15
|
+
"POT-Creation-Date: 2017-04-27T19:30:59.079Z\n"
|
|
16
|
+
"PO-Revision-Date: 2016-10-22 16:41-0500\n"
|
|
17
|
+
"Last-Translator: German <plone-i18n@lists.sf.net>\n"
|
|
18
|
+
"Language: de\n"
|
|
19
|
+
"Language-Team: German <plone-i18n@lists.sf.net>\n"
|
|
20
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
|
21
|
+
"Content-Transfer-Encoding: 8bit\n"
|
|
22
|
+
"Plural-Forms: nplurals=1; plural=0;\n"
|
|
23
|
+
"MIME-Version: 1.0\n"
|
|
24
|
+
"Language-Code: de\n"
|
|
25
|
+
"Language-Name: Deutsch\n"
|
|
26
|
+
"Preferred-Encodings: utf-8 latin1\n"
|
|
27
|
+
"X-Is-Fallback-For: de-at de-li de-lu de-ch de-de\n"
|
|
28
|
+
|
|
29
|
+
|