Gitlab pages: https://formatz.gitlab.io/rasp
- Node >= v.20.10.0 (NVM documentation in Notion if needed)
Replace rasp
with the name of your project. (kebab-case)
git clone git@gitlab.com:formatz/rasp.git rasp
cd rasp
# setup git
git add .
git commit -m ":tada:"
git remote add origin git@gitlab.com:formatz/rasp.git
git push origin main
yarn install
# start development at http://localhost:3000
yarn dev
# check your formatting (prettier)
yarn format --check
# automatically format files (prettier)
yarn format --write
# check your js (eslint)
yarn lint
# check your css (stylelint)
yarn lintcss
# auto fix css if possible (stylelint)
yarn lintcss --fix
# build production files for local preview
yarn preview
# build production files
yarn build
Anything in the public
folder will be copied to the build
folder.
When pushing/merging into test
, the pipeline will build the project and deploy it to gitlab pages. The url will be https://formatz.gitlab.io/rasp
.
When pushing/merging to main
, this will automatically trigger a pipeline that should deploy the project to the contao assets.
Requirements:
- Have a
main
branch ready, protected. - Have an empty contao website ready on infomaniak
- Create an SSH key pair (see Notion "Auto deploy gitlab -> infomaniak")
- Create a gitlab ssh user in infomaniak
- Add the following variables in Gitlab Settings > CI/CD > Variables
- $DEPLOY_SSH_PRIVATE_KEY
- $DEPLOY_SSH_USER
- $DEPLOY_SSH_HOST
- $DEPLOY_SSH_PATH
- todo
Use npm-check-updates to automatically update dependencies.
npm install -g npm-check-updates
ncu # check for updates
ncu -u # update the whole package.json
ncu swiper # update a specific package
yarn install # after updating, install new dependencies
- figure out why is photoswipe is creating file?