Internal front-end framework for Immoweb.
- Clone the repo:
git@github.com:axel-springer-kugawana/iwb_serenity.git
Compile CSS (include lint, scss compilation, autoprefixer and minification)
npm run css
For development purpose (Watch scss files change and launch compilation)
npm run watch:css
Source files are saved inside /src folder. Compiled files are saved inside /dist folder.
iwb_serenity/
├── dist/
│ ├── css/
│ │ ├── serenity.css
│ │ ├── serenity.css.map
│ │ ├── serenity.min.css
│ │ └── serenity.min.css.map
└───┴── src/
└── scss/
├── utils/
│ └── ...
└── serenity.scss
Serenity documentation can be consulted in the /docs
folder or online (thanks to GitHub Pages.
- Make sure you have Node.js and npm installed.
- Run
npm ci
to install Node.js dependencies. - Run
npm start
to compile CSS and JavaScript files, generate the docs, and watch for changes (which is suitable for development) ornpm run docs:build
to build the documentation website in/doc/.vuepress/dist
. - To browse the documentation:
- If you ran
npm start
, you can browse the documentation onhttp://localhost:8080
. - If you ran
npm run docs:build
, the documentation website is in/doc/.vuepress/dist
.
Thanks to a GitHub action, the documentation website is automatically deployed when a release tag is created.
To trigger a deployment at another moment:
- Go to Actions / Deploy Documentation.
- Click Run workflow, let the default branch on
master
and click Run workflow. - Wait a couple of seconds for the dispatched action to appear in the list below the button.
To test your changes in a real-world project before publishing a new version of Serenity, use the npm link
feature.
In the following how-to, Serenity Project
refers to your local Serenity source, Your Project
refers to your local project that use Serenity.
- Inside
Your Project
, manually deletenode_modules/iwb_serenity
. - Inside the
Serenity Project
, runnpm link
. - Inside
Your Project
, runnpm link iwb_serenity
.
Now your project uses the iwb_serenity
local version.
To roll back to the default state:
- Inside
Your Project
, runnpm unlink iwb_serenity
. - Inside the
Serenity Project
, runnpm unlink
. - Inside
Your Project
, eventually reinstall the desired version of serenity (npm install iwb_serenity
).