Skip to content

Commit 46c2494

Browse files
committed
misc: Use package-lock.json for Netlify builds
Coses gohugoio#3366
1 parent 5d07a67 commit 46c2494

File tree

4 files changed

+1238
-6
lines changed

4 files changed

+1238
-6
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,4 @@
99
hugo_stats.json
1010
node_modules/
1111
nohup.out
12-
package-lock.json
1312
trace.out

netlify.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
[build]
22
publish = "public"
3-
command = "hugo --gc --minify"
3+
command = "npm ci && npm ls && hugo --gc --minify"
44

55
[build.environment]
66
HUGO_VERSION = "0.155.2"
7+
NPM_FLAGS = "--version" # Bypass default 'npm install' to use 'npm ci' in build command
78

89
[context.production.environment]
910
HUGO_ENV = "production"

0 commit comments

Comments
 (0)