Use package.json scripts for netlify commands
This commit is contained in:
parent
b90c5ce20c
commit
e3ea88853b
3 changed files with 15 additions and 8 deletions
|
@ -1,6 +1,6 @@
|
|||
[build]
|
||||
publish = 'public'
|
||||
command = 'hugo --source=exampleSite --gc --verbose --destination ../public'
|
||||
command = 'npm run build:prod'
|
||||
|
||||
[context.production.environment]
|
||||
HUGO_VERSION = '0.101.0'
|
||||
|
@ -9,20 +9,20 @@
|
|||
HUGO_GOOGLEANALYTICS = 'G-DP9Q137C3X'
|
||||
|
||||
[context.split1]
|
||||
command = 'hugo --source=exampleSite --gc --enableGitInfo --destination ../public'
|
||||
command = 'npm run build:split1'
|
||||
|
||||
[context.split1.environment]
|
||||
HUGO_VERSION = '0.101.0'
|
||||
HUGO_ENV = 'production'
|
||||
|
||||
[context.deploy-preview]
|
||||
command = 'hugo --source=exampleSite --gc --buildDrafts --buildFuture --baseURL $DEPLOY_PRIME_URL --destination ../public'
|
||||
command = 'npm run build:preview'
|
||||
|
||||
[context.deploy-preview.environment]
|
||||
HUGO_VERSION = '0.101.0'
|
||||
|
||||
[context.branch-deploy]
|
||||
command = 'hugo --source=exampleSite --gc --baseURL $DEPLOY_PRIME_URL --destination ../public'
|
||||
command = 'npm run build:branch'
|
||||
|
||||
[context.branch-deploy.environment]
|
||||
HUGO_VERSION = '0.101.0'
|
||||
|
|
3
package-lock.json
generated
3
package-lock.json
generated
|
@ -16,7 +16,8 @@
|
|||
"eslint": "^8.18.0",
|
||||
"eslint-config-airbnb-base": "^15.0.0",
|
||||
"eslint-plugin-import": "^2.25.4",
|
||||
"eslint-plugin-node": "^11.1.0"
|
||||
"eslint-plugin-node": "^11.1.0",
|
||||
"rimraf": "^3.0.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@eslint/eslintrc": {
|
||||
|
|
12
package.json
12
package.json
|
@ -20,17 +20,23 @@
|
|||
"author": "Serghei Iakovlev",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"build": "hugo --source=exampleSite --gc --verbose --minify --destination ../public",
|
||||
"clean": "rimraf public",
|
||||
"build": "hugo --source=exampleSite --gc --verbose --destination ../public",
|
||||
"build:prod": "hugo --source=exampleSite --destination ../public",
|
||||
"build:split1": "hugo --source=exampleSite --enableGitInfo --destination ../public",
|
||||
"build:preview": "HUGO_PREVIEW=true hugo --source=exampleSite --buildDrafts --buildFuture --baseURL $DEPLOY_PRIME_URL --destination ../public",
|
||||
"build:branch": "hugo --source=exampleSite --buildDrafts --buildFuture --baseURL $DEPLOY_PRIME_URL --destination ../public",
|
||||
"server": "HUGO_PREVIEW=true HUGO_ENV=development hugo server --verbose --source=exampleSite --buildDrafts --buildFuture --ignoreCache --disableFastRender",
|
||||
"lint": "npm run lint:js && npm run lint:editorconfig",
|
||||
"lint:editorconfig": "editorconfig-checker",
|
||||
"lint:js": "eslint static/js/*.js",
|
||||
"vendor:js": "cp node_modules/jquery/dist/jquery.min.js assets/js/vendor",
|
||||
"server": "hugo server --source=exampleSite --disableFastRender"
|
||||
"vendor:js": "cp node_modules/jquery/dist/jquery.min.js assets/js/vendor"
|
||||
},
|
||||
"dependencies": {
|
||||
"jquery": "^3.6.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"rimraf": "^3.0.2",
|
||||
"editorconfig-checker": "^4.0.2",
|
||||
"eslint": "^8.18.0",
|
||||
"eslint-config-airbnb-base": "^15.0.0",
|
||||
|
|
Loading…
Reference in a new issue