-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Teodor Voicu edited this page Jan 18, 2024
·
19 revisions
-
Install required tools:
npm install -g yo @plone/generator-volto ejs
-
Create a new repository from volto-frontend-template - make sure the new reposity name ends with
-frontend
, e.g.:custom-frontend
-
Clone your new repository on your local machine like:
git clone https://github.com/eea/custom-frontend cd custom-frontend
-
Bootstrap Volto project
npm install ejs sharp png-to-ico xml2js rm -rf package.json package-lock.json yo @plone/volto --skip-install --addon @eeacms/volto-eea-kitkat --workspace src/addons/*
- You can also provide
--volto 14.0.0-alpha.35
if you want a specific Volto version. By default the latest stable version will be used. - It is recommended to generate with
--volto 16.30.1
and@plone/[email protected]
as installed generator.
- You can also provide
-
Run bootstrap
node bootstrap
-
See changes and commit:
git diff git add . git commit -m "Initial commit" git push
-
Install:
yarn
-
Run:
-
Start backend:
docker-compose up
-
Start frontend:
yarn start
-
Go to http://localhost:3000
-
-
Run Cypress tests
-
Add missing dev dependencies:
yarn add --dev @cypress/code-coverage yarn add --dev cypress-fail-fast yarn cypress:open
-
-
Create branch develop from branch master and add branch protections ( Settings -> Brancher -> Branch protection rules -> Add rule ):
-
develop
- no check-boxes need to be checked, this is added to protect the branch from deletion. Optional - check "Allow force pushes" -
master
- mandatory to check this 5 boxes to setup the Automated Releases:Require a pull request before merging: Require approvals Dismiss stale pull request approvals when new commits are pushed Require status checks to pass before merging Require branches to be up to date before merging
-
-
To convert a SVG file to a PNG file run:
node bootstrap svgtopng 'initialSVGPath.svg' 'outputPNGPath.png'
-
initialSVGPath.svg
- the path to the initial SVG file -
outputPNGPath.png
- the path where the resulted PNG file will be saved
-
-
To resize a PNG run:
node bootstrap resizepng 'intialPNGpath.png' 'width,height' 'outputPNGPath.png'
-
intialPNGpath.png
- the path to the initial PNG -
width,height
- two values for the desired width and height -
outputPNGPath.png
- the path where the resulted PNG file will be saved
-
-
To change the background color of a PNG run:
node bootstrap chagebackgroundcolor 'public/testIcon.png' 'r,g,b' 'public/background.png'
-
public/testIcon.png
- the path to the initial PNG -
r,g,b
- RGB values to set the desired color -
public/background.png
- the path where the resulted PNG file will be saved
-