Front-end build for Pantheon
Installing tools for building CSS
- Have Yarn on your machine, version 1.21 or higher.
- For either of the dev processes, have AsciiDoctor CLI installed
Run:
yarn install
Build CSS
To build CSS use:
yarn run build
This builds the dev and prod versions of the CSS. Dev version is inside this folder ./rhdocs.css
, the prod version is in GITROOT/pantheon-bundle/frontend/src/web-assets/rhdocs.css
.
Dev Watch Process
To work on the Sass/CSS, use:
yarn run dev
This will start a local browser-sync server that:
- Automatically loads the
a-doc-styleguide.html
, which is generated from Pantheon's templates - Will watch and compile the dev and prod versions of the Scss, and watch for changes in HTML
- Will watch for any changes in the adocs in the dev-preview folder
- Reload the page anything changes
- It will run on a port that will show up in command line
Build for CSS Development
This is the same as yarn run dev
but without the watch process.
yarn run build:dev