@eeacms/volto-block-style
Advanced tools
@@ -5,3 +5,3 @@ const defaultBabel = require('@plone/volto/babel'); | ||
const voltoBabel = defaultBabel(api); | ||
voltoBabel.plugins.push('@babel/plugin-transform-modules-commonjs', 'transform-class-properties', 'istanbul'); | ||
voltoBabel.plugins.push('istanbul'); | ||
return voltoBabel; | ||
@@ -8,0 +8,0 @@ } |
@@ -7,2 +7,7 @@ ### Changelog | ||
### [4.0.0](https://github.com/eea/volto-block-style/compare/3.7.2...4.0.0) - 25 October 2022 | ||
#### :hammer_and_wrench: Others | ||
- Bring this up to date [Miu Razvan - [`6d7e7a4`](https://github.com/eea/volto-block-style/commit/6d7e7a46078d858800eb894ffb1eba42bdd384e0)] | ||
### [3.7.2](https://github.com/eea/volto-block-style/compare/3.7.1...3.7.2) - 27 September 2022 | ||
@@ -23,3 +28,2 @@ | ||
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`928339f`](https://github.com/eea/volto-block-style/commit/928339ffd2991b24844a9ca3691523d7e692ca91)] | ||
### [3.7.0](https://github.com/eea/volto-block-style/compare/3.6.3...3.7.0) - 22 September 2022 | ||
@@ -44,3 +48,2 @@ | ||
- Add Sonarqube tag using circularity-frontend addons list [EEA Jenkins - [`c8977dc`](https://github.com/eea/volto-block-style/commit/c8977dc8d8f623601c763aff13c1a8df5fd1eb13)] | ||
### [3.6.0](https://github.com/eea/volto-block-style/compare/3.5.18...3.6.0) - 9 June 2022 | ||
@@ -51,4 +54,2 @@ | ||
- Release 3.6.0 [Alin Voinea - [`f0b6eb8`](https://github.com/eea/volto-block-style/commit/f0b6eb885feee2bb02fdd4daf6ee7a4747518b23)] | ||
- Add Sonarqube tag using clms-frontend addons list [EEA Jenkins - [`e7a6cf9`](https://github.com/eea/volto-block-style/commit/e7a6cf9ba635161d1222e2d5db4c83cb680e3ce2)] | ||
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`a648e9b`](https://github.com/eea/volto-block-style/commit/a648e9b7667bc496050c02c2fcc8b4a3a0a7af1c)] | ||
### [3.5.18](https://github.com/eea/volto-block-style/compare/3.5.17...3.5.18) - 3 March 2022 | ||
@@ -114,3 +115,2 @@ | ||
- Add Sonarqube tag using freshwater-frontend addons list [EEA Jenkins - [`ccd5b62`](https://github.com/eea/volto-block-style/commit/ccd5b622c05a9ee3d906d6eb5df0288fa25a694b)] | ||
- added cy tests [Daniela Mormocea - [`ed8dc6f`](https://github.com/eea/volto-block-style/commit/ed8dc6f55f1f48cb84f6c9879eb4a728e1308639)] | ||
@@ -145,3 +145,2 @@ ### [3.5.8](https://github.com/eea/volto-block-style/compare/3.5.7...3.5.8) - 13 December 2021 | ||
- Add Sonarqube tag using industry-frontend addons list [EEA Jenkins - [`813a0f5`](https://github.com/eea/volto-block-style/commit/813a0f5a2d1f563b184475a3e6ff620a733ba5da)] | ||
### [3.5.2](https://github.com/eea/volto-block-style/compare/3.5.1...3.5.2) - 29 October 2021 | ||
@@ -153,3 +152,2 @@ | ||
- Add Sonarqube tag using sustainability-frontend addons list [EEA Jenkins - [`8b20d02`](https://github.com/eea/volto-block-style/commit/8b20d02f809e456af84aaea5ad74115c00e39c3e)] | ||
### [3.5.0](https://github.com/eea/volto-block-style/compare/3.4.5...3.5.0) - 25 September 2021 | ||
@@ -160,3 +158,2 @@ | ||
- Release 3.5.0 [Alin Voinea - [`0a5a98e`](https://github.com/eea/volto-block-style/commit/0a5a98e531f93470956673e50b6c71f37f59b49e)] | ||
- Add Sonarqube tag using ims-frontend addons list [EEA Jenkins - [`30bb3aa`](https://github.com/eea/volto-block-style/commit/30bb3aa5f49ed5264cf609d6b8f234b07b7988ca)] | ||
### [3.4.5](https://github.com/eea/volto-block-style/compare/3.4.4...3.4.5) - 31 August 2021 | ||
@@ -218,6 +215,2 @@ | ||
- Separate block wrapping; don't apply multiple times [Tiberiu Ichim - [`584e7a9`](https://github.com/eea/volto-block-style/commit/584e7a9859c7d417708f9aa78b83e94547f2f1ab)] | ||
- Add Sonarqube tag using frontend addons list [EEA Jenkins - [`f6737ef`](https://github.com/eea/volto-block-style/commit/f6737ef68ba906c5fb72e18c77b060aa82ed0a73)] | ||
- Add Sonarqube tag using frontend addons list [EEA Jenkins - [`6a4c6c1`](https://github.com/eea/volto-block-style/commit/6a4c6c16acc88471279a82a62b92555dc1ac20cc)] | ||
- Add Sonarqube tag using frontend addons list [EEA Jenkins - [`2101b55`](https://github.com/eea/volto-block-style/commit/2101b550588402b37cd91b5d582e27a6255d6cac)] | ||
- Add Sonarqube tag using frontend addons list [EEA Jenkins - [`2583c68`](https://github.com/eea/volto-block-style/commit/2583c68ea49ddbedc7b90b9d477cbbe4e2b779fd)] | ||
- Add hidden toggle [Tiberiu Ichim - [`3b8ed26`](https://github.com/eea/volto-block-style/commit/3b8ed26a82c31ff430301adceea1174e92464a77)] | ||
@@ -380,3 +373,2 @@ - Add a clear button to the box size widget [Tiberiu Ichim - [`4bdf803`](https://github.com/eea/volto-block-style/commit/4bdf8030d7a4d39d3a48b56ed6c8cddc311b3ff7)] | ||
- Fix README screenshot path [Alin Voinea - [`81f09ec`](https://github.com/eea/volto-block-style/commit/81f09ec9d95b3a555d0bc7e0aa3ad08b4ab005db)] | ||
- yarn prettier [Alin Voinea - [`04f3b9a`](https://github.com/eea/volto-block-style/commit/04f3b9ae36ea8c6d99dad1f6d4cf56e81c032e1a)] | ||
### [0.1.1](https://github.com/eea/volto-block-style/compare/0.1.0...0.1.1) - 22 October 2020 | ||
@@ -383,0 +375,0 @@ |
@@ -12,2 +12,3 @@ module.exports = { | ||
'@package/(.*)$': '<rootDir>/src/$1', | ||
'@root/(.*)$': '<rootDir>/src/$1', | ||
'@plone/volto-quanta/(.*)$': '<rootDir>/src/addons/volto-quanta/src/$1', | ||
@@ -20,8 +21,6 @@ '@eeacms/(.*?)/(.*)$': '<rootDir>/src/addons/$1/src/$2', | ||
'<rootDir>/node_modules/@plone/volto/jest-addons-loader.js', | ||
'\\.(css|less|scss|sass)$': 'identity-obj-proxy', | ||
}, | ||
transform: { | ||
'^.+\\.js(x)?$': 'babel-jest', | ||
'^.+\\.css$': 'jest-css-modules', | ||
'^.+\\.less$': 'jest-css-modules', | ||
'^.+\\.scss$': 'jest-css-modules', | ||
'^.+\\.(png)$': 'jest-file', | ||
@@ -28,0 +27,0 @@ '^.+\\.(jpg)$': 'jest-file', |
{ | ||
"name": "@eeacms/volto-block-style", | ||
"version": "3.7.2", | ||
"version": "4.0.0", | ||
"description": "volto-block-style: Volto add-on", | ||
@@ -28,4 +28,6 @@ "main": "src/index.js", | ||
"devDependencies": { | ||
"@cypress/code-coverage": "^3.9.5", | ||
"babel-plugin-transform-class-properties": "^6.24.1" | ||
"@plone/scripts": "*", | ||
"@cypress/code-coverage": "^3.10.0", | ||
"babel-plugin-transform-class-properties": "^6.24.1", | ||
"md5": "^2.3.0" | ||
}, | ||
@@ -37,12 +39,16 @@ "scripts": { | ||
"bootstrap": "npm install -g ejs; npm link ejs; node bootstrap", | ||
"stylelint": "../../../node_modules/stylelint/bin/stylelint.js --allow-empty-input 'src/**/*.{css,less}'", | ||
"stylelint:overrides": "../../../node_modules/.bin/stylelint --syntax less --allow-empty-input 'theme/**/*.overrides' 'src/**/*.overrides'", | ||
"stylelint:fix": "yarn stylelint --fix && yarn stylelint:overrides --fix", | ||
"prettier": "../../../node_modules/.bin/prettier --single-quote --check 'src/**/*.{js,jsx,json,css,less,md}'", | ||
"prettier:fix": "../../../node_modules/.bin/prettier --single-quote --write 'src/**/*.{js,jsx,json,css,less,md}'", | ||
"lint": "../../../node_modules/eslint/bin/eslint.js --max-warnings=0 'src/**/*.{js,jsx}'", | ||
"lint:fix": "../../../node_modules/eslint/bin/eslint.js --fix 'src/**/*.{js,jsx}'", | ||
"cypress:run": "../../../node_modules/cypress/bin/cypress run", | ||
"cypress:open": "../../../node_modules/cypress/bin/cypress open" | ||
"test": "make test", | ||
"test:fix": "make test-update", | ||
"pre-commit": "yarn stylelint:fix && yarn prettier:fix && yarn lint:fix", | ||
"stylelint": "make stylelint", | ||
"stylelint:overrides": "make stylelint-overrides", | ||
"stylelint:fix": "make stylelint-fix", | ||
"prettier": "make prettier", | ||
"prettier:fix": "make prettier-fix", | ||
"lint": "make lint", | ||
"lint:fix": "make lint-fix", | ||
"i18n": "make i18n", | ||
"cypress:run": "make cypress-run", | ||
"cypress:open": "make cypress-open" | ||
} | ||
} |
104
README.md
@@ -42,2 +42,3 @@ # volto-block-style | ||
1. Start Plone backend | ||
``` | ||
@@ -61,21 +62,21 @@ docker run -d --name plone -p 8080:8080 -e SITE=Plone -e PROFILES="profile-plone.restapi:blocks" plone | ||
* If you already have a volto project, just update `package.json`: | ||
- If you already have a volto project, just update `package.json`: | ||
```JSON | ||
"addons": [ | ||
"@eeacms/volto-block-style" | ||
], | ||
```JSON | ||
"addons": [ | ||
"@eeacms/volto-block-style" | ||
], | ||
"dependencies": { | ||
"@eeacms/volto-block-style": "^1.0.0" | ||
} | ||
``` | ||
"dependencies": { | ||
"@eeacms/volto-block-style": "^1.0.0" | ||
} | ||
``` | ||
* If not, create one: | ||
- If not, create one: | ||
``` | ||
npm install -g yo @plone/generator-volto | ||
yo @plone/volto my-volto-project --addon @eeacms/volto-block-style | ||
cd my-volto-project | ||
``` | ||
``` | ||
npm install -g yo @plone/generator-volto | ||
yo @plone/volto my-volto-project --addon @eeacms/volto-block-style | ||
cd my-volto-project | ||
``` | ||
@@ -95,75 +96,4 @@ 1. Install new add-ons and restart Volto: | ||
### Automatic release using Jenkins | ||
See [RELEASE.md](https://github.com/eea/volto-block-style/blob/master/RELEASE.md). | ||
* 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. | ||
* It runs on every commit on `master` branch, which is protected from direct commits, only allowing pull request merge commits. | ||
* 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. | ||
* 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. | ||
* 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. | ||
* The version format must be MAJOR.MINOR.PATCH. By default, next release is set to next minor version (with patch 0). | ||
* 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. | ||
* Automated commits and commits with [JENKINS] or [YARN] in the commit log are excluded from `CHANGELOG.md` file. | ||
### Manual release from the develop branch ( beta release ) | ||
#### Installation and configuration of release-it | ||
You need to first install the [release-it](https://github.com/release-it/release-it) client. | ||
``` | ||
npm install -g release-it | ||
``` | ||
Release-it uses the configuration written in the [`.release-it.json`](./.release-it.json) file located in the root of the repository. | ||
Release-it is a tool that automates 4 important steps in the release process: | ||
1. Version increase in `package.json` ( increased from the current version in `package.json`) | ||
2. `CHANGELOG.md` automatic generation from commit messages ( grouped by releases ) | ||
3. GitHub release on the commit with the changelog and package.json modification on the develop branch | ||
4. NPM release ( by default it's disabled, but can be enabled in the configuration file ) | ||
To configure the authentification, you need to export GITHUB_TOKEN for [GitHub](https://github.com/settings/tokens) | ||
``` | ||
export GITHUB_TOKEN=XXX-XXXXXXXXXXXXXXXXXXXXXX | ||
``` | ||
To configure npm, you can use the `npm login` command or use a configuration file with a TOKEN : | ||
``` | ||
echo "//registry.npmjs.org/:_authToken=YYYYYYYYYYYYYYYYYYYYYYYYYYYYYY" > .npmrc | ||
``` | ||
#### Using release-it tool | ||
There are 3 yarn scripts that can be run to do the release | ||
##### yarn release-beta | ||
Automatically calculates and presents 3 beta versions - patch, minor and major for you to choose ( or Other for manual input). | ||
``` | ||
? Select increment (next version): | ||
❯ prepatch (0.1.1-beta.0) | ||
preminor (0.2.0-beta.0) | ||
premajor (1.0.0-beta.0) | ||
Other, please specify... | ||
``` | ||
##### yarn release-major-beta | ||
Same as `yarn release-beta`, but with premajor version pre-selected. | ||
##### yarn release | ||
Generic command, does not automatically add the `beta` to version, but you can still manually write it if you choose Other. | ||
#### Important notes | ||
> 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. | ||
> 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). | ||
## How to contribute | ||
@@ -170,0 +100,0 @@ |
119093
-21.83%4
100%42
-10.64%2406
-14.56%110
-38.89%