Skip to content

Commit

Permalink
Update pug-cli (#205)
Browse files Browse the repository at this point in the history
* switch to @tokilabs/pug3-cli

* setup npm cache in github actions

* update rendered files

* expire preview builds in 30 days

* get rid of html-minifier
- REDoS vulnerability - GHSA-pfq8-rq6v-vf5m

* add size info in logs
  • Loading branch information
nisrulz authored Aug 21, 2024
1 parent d65367d commit 02a5f6a
Show file tree
Hide file tree
Showing 8 changed files with 678 additions and 691 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/firebase-hosting-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,14 @@ jobs:
- name: Checkout the code
uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20 # has to be
cache: 'npm'

- name: Install all CLI tools
run: npm install -g @anduh/pug-cli sass js-yaml firebase-tools svgo png-minify uglifycss uglify-js html-minifier purgecss
run: npm install -g @tokilabs/pug3-cli sass js-yaml firebase-tools svgo png-minify uglifycss uglify-js purgecss

- name: Render the website from templates
run: |
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/firebase-hosting-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,15 @@ jobs:
steps:
- name: Checkout the code
uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20 # has to be LTS
cache: 'npm'

- name: Install all CLI tools
run: npm install -g @anduh/pug-cli sass js-yaml firebase-tools svgo png-minify uglifycss uglify-js html-minifier purgecss
run: npm install -g @tokilabs/pug3-cli sass js-yaml firebase-tools svgo png-minify uglifycss uglify-js purgecss

- name: Render the website from templates
run: |
Expand All @@ -25,4 +31,5 @@ jobs:
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_APP_PRIVACY_POLICY_GENERATOR }}'
expires: 30d
projectId: app-privacy-policy-generator
4 changes: 2 additions & 2 deletions dev-doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ The web app uses
- [VueJs](https://vuejs.org/) - For templating and reactive updates in the DOM
- [Firebase Hosting](https://firebase.google.com/docs/hosting/) - For hosting the static web app
- CLI Tools
- [pug](https://github.com/Anduh/pug-cli) - To convert pug templates to html and merge partials into single [`index.html`](public/index.html) file.
- [pug](https://github.com/tokilabs/pug3-cli) - To convert pug templates to html and merge partials into single [`index.html`](public/index.html) file.
- [sass](https://sass-lang.com/documentation/cli) - To convert sass templates to css and merge partials into single [`style.css`](public/css/style.css) file.
- [js-yaml](https://github.com/nodeca/js-yaml#cli-executable) - To convert yaml templates to json and generate the [`thirdpartyservices.js`](public/js/thirdpartyservices.js) file.
- [firebase-tools](https://github.com/firebase/firebase-tools) - To interact with Firebase as a service from command line.
Expand All @@ -21,7 +21,7 @@ The web app uses
Install the CLI tools using

```sh
npm install -g @anduh/pug-cli sass js-yaml \
npm install -g @tokilabs/pug3-cli sass js-yaml \
firebase-tools \
svgo png-minify \
uglifycss uglify-js html-minifier \
Expand Down
Loading

0 comments on commit 02a5f6a

Please sign in to comment.