Skip to content
This repository was archived by the owner on Jun 14, 2024. It is now read-only.

Commit 9bacfdd

Browse files
authored
NPM scripts for site CI (#102)
Signed-off-by: Patrice Chalin <pchalin@gmail.com>
1 parent 85dc33a commit 9bacfdd

File tree

3 files changed

+16
-8
lines changed

3 files changed

+16
-8
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ strictly required.
77

88
The starter uses the following:
99

10-
* **[Hugo (extended, v0.73 or above)](https://gohugo.io/)** as a static site
11-
generator
10+
* **[Hugo](https://gohugo.io/)** as a static site generator
1211
* **[Bootstrap 4.5.x](https://getbootstrap.com/docs/4.5/getting-started/introduction/)** as a CSS framework
1312
* **[Netlify](https://www.netlify.com/)** for building, hosting, and DNS management
1413

@@ -22,7 +21,7 @@ repository and run the following two commands in its directory:
2221
npm install
2322

2423
# Run the server locally
25-
make serve
24+
npm run serve
2625
```
2726

2827
## Running on Netlify

netlify.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
[build]
22
publish = "public"
3-
command = "make production-build"
3+
command = "npm run build:production"
44

55
[context.deploy-preview]
6-
command = "make preview-build"
6+
command = "npm run build:preview"
77

88
[context.branch-deploy]
9-
command = "make preview-build"
9+
command = "npm run build:preview"

package.json

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
11
{
2+
"scripts": {
3+
"build-and-serve": "npm run build && npm run serve",
4+
"build:preview": "hugo --cleanDestinationDir -DFE --minify --baseURL $DEPLOY_PRIME_URL",
5+
"build:production": "hugo --cleanDestinationDir --minify",
6+
"build": "hugo --cleanDestinationDir -e dev -DFE",
7+
"hugo:version": "hugo version",
8+
"serve": "netlify dev -c \"hugo serve -DFE --minify -w\""
9+
},
210
"devDependencies": {
3-
"bootstrap": "^4.5.2",
411
"@fortawesome/fontawesome-free": "^5.14.0",
5-
"hugo-extended": "^0.85.0",
12+
"bootstrap": "^4.5.2",
13+
"hugo-extended": "^0.86.0",
614
"jquery": "^3.5.1",
15+
"netlify-cli": "^5.2.10",
716
"popper.js": "^1.16.1"
817
}
918
}

0 commit comments

Comments
 (0)