diff --git a/README.md b/README.md index ee459bf..6d6e75a 100644 --- a/README.md +++ b/README.md @@ -6,9 +6,11 @@ View the templates at https://openshift.github.io/oauth-templates/. ## Development -1. Install [Jekyll](https://jekyllrb.com/docs/installation/). -1. Run `bundle install`. -1. Run `bundle exec jekyll serve`. +1. Install [Jekyll](https://jekyllrb.com/docs/installation/) and run `bundle install`. +1. Install [Yarn](https://yarnpkg.com/lang/en/docs/install) and run `yarn install`. + - Note that certain dependencies require Node.js 20+. You can install [n](https://www.npmjs.com/package/n) to switch between node versions. +1. Run `yarn serve-jekyll` + - Note that `yarn generate-styles` will have to be run if there are new PatternFly classes added to the HTML. ### Updating PatternFly @@ -17,7 +19,7 @@ Github Pages only runs in safe mode, preventing the usage of [symlinks](https:// 1. Install [Jekyll](https://jekyllrb.com/docs/installation/) and run `bundle install`. 1. Install [Yarn](https://yarnpkg.com/lang/en/docs/install) and run `yarn install`. 1. Run `yarn upgrade @patternfly/patternfly`. -1. Run `yarn generate-styles` +1. Run `yarn generate-styles`. 1. Verify there are no regressions by running `yarn serve-jekyll`. Note that the CSS will not be automatically updated, so if you make changes to the HTML, you will need to run `yarn generate-styles` again. 1. Commit the changes. diff --git a/package.json b/package.json index 89de89d..e19de28 100644 --- a/package.json +++ b/package.json @@ -7,10 +7,10 @@ "license": "Apache-2.0", "scripts": { "build-jekyll": "rm -rf _site && bundle exec jekyll build", - "clear-styles": "pushd ./_includes/styles && echo -n | tee errors.css index.css login.css providers.css", + "clear-styles": "cd ./_includes/styles && rm -f *.css && touch errors.css index.css login.css providers.css", "generate-styles": "yarn clear-styles && yarn build-jekyll && node generate-styles.mjs", "rebuild": "yarn generate-styles && yarn build-jekyll", - "serve-jekyll": "bundle exec jekyll serve", + "serve-jekyll": "yarn generate-styles && bundle exec jekyll serve", "generate-branding-secret": "yarn rebuild && rm -f branding-secret.yaml && node generate-branding-secret.mjs rho" }, "devDependencies": {