feat(environment): use hugo.Environment to judge the production environment

This commit is contained in:
Dillon
2020-03-02 17:03:35 +08:00
parent f83b1c14c8
commit 285efc01bb
5 changed files with 3 additions and 19 deletions

View File

@@ -14,7 +14,7 @@
"scripts": {
"build": "npx babel src --out-file assets/js/theme.min.js --source-maps",
"start": "hugo server --source=exampleSite --themesDir=../.. --disableFastRender -D",
"copy": "HUGO_ENV=production hugo -v --source=exampleSite --themesDir=../.. -D --gc --minify && rm -rf resources && cp -rf exampleSite/resources resources"
"copy": "hugo -v --source=exampleSite --themesDir=../.. -D --gc --minify && rm -rf resources && cp -rf exampleSite/resources resources"
},
"husky": {
"hooks": {