Skip to content

Commit

Permalink
build: enable pre/post scripts (#840)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlj95 authored Nov 18, 2024
1 parent 5aa7f2a commit cbf043a
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .ci/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# First so that running without command runs a build
build:
pnpm run prebuild && pnpm run build
pnpm run data && pnpm run build

install:
# Despite it's enabled by default on CI. This allows to mock CI locally
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/reusable-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ jobs:
key: ${{ env.cache-name }}-${{ env.week-of-year }}
restore-keys: |
${{ env.cache-name }}
- name: Prebuild tasks
run: pnpm run prebuild
- name: Data tasks
run: pnpm run data
- name: Build app (with SSG)
run: pnpm run ${{ github.event_name == 'pull_request' && 'build:pull-request' || 'build' }}
- name: Upload built app
Expand Down
1 change: 0 additions & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
enable-pre-post-scripts=false
public-hoist-pattern[]=conventional-recommended-bump
public-hoist-pattern[]=@eslint/js
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ This project was generated with [Angular CLI](https://github.com/angular/angular

## To start

First, run the `prebuild` command, to generate files that are required for the app to work
First, run the `data` command, to generate data files that are required for the app to work

```shell
pnpm run prebuild
pnpm run data
```

## Development server
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"url": "https://github.com/davidlj95/website.git"
},
"scripts": {
"prebuild": "cd scripts && pnpm run build && pnpm run generate",
"build": "ng build",
"build:pack": "DIST_DIR=dist/@davidlj95/website/browser; [ -d \"$DIST_DIR\" ] && cd $DIST_DIR && zip -r ../../../build.zip . || true",
"build:pull-request": "pnpm run build --configuration pullRequest,production",
Expand All @@ -25,6 +24,7 @@
"coverage:report:all": "pnpm run coverage:move-to-nyc-output && nyc report --reporter lcov --report-dir coverage",
"coverage:report:all//": "☝️ Can't be 'coverage:report', look for that run script comments for reason",
"cypress:open": "cypress open",
"data": "pnpm run --filter scripts generate",
"e2e": "ng e2e",
"format": "pnpm run format:files .",
"format:check": "pnpm run format:check:files .",
Expand Down

0 comments on commit cbf043a

Please sign in to comment.