diff options
author | peaceiris <30958501+peaceiris@users.noreply.github.com> | 2020-01-28 07:23:15 +0300 |
---|---|---|
committer | peaceiris <30958501+peaceiris@users.noreply.github.com> | 2020-01-28 07:23:15 +0300 |
commit | c1396f3fd9acf0bca6e41c3aadb452031a0f071b (patch) | |
tree | 5768dc566e3e8f713e1141f5b7e7d061ce784e3c /package.json | |
parent | 9b06952abe5cb10d065a544867b8c9b4c64b726f (diff) |
ci: Add release workflow
Diffstat (limited to 'package.json')
-rw-r--r-- | package.json | 33 |
1 files changed, 29 insertions, 4 deletions
diff --git a/package.json b/package.json index a761b62f..5c20b3ab 100644 --- a/package.json +++ b/package.json @@ -4,9 +4,28 @@ "description": "Hugo IRIS Theme - Portfolio and Blog", "private": true, "scripts": { - "start": "cd ./exampleSite && hugo server --themesDir ../ --layoutDir ../layouts", - "build": "cd ./exampleSite && hugo --minify --themesDir ../ --layoutDir ../layouts", - "test": "echo \"Error: no test specified\" && exit 1" + "start": "run-p client server", + "server": "cd ./exampleSite && hugo server --themesDir ../ --layoutDir ../layouts", + "client": "wait-on http://localhost:1313 && open http://localhost:1313", + "hugo": "hugo", + "build": "cd ./exampleSite && hugo --minify --cleanDestinationDir --themesDir ../ --layoutDir ../layouts", + "test:hugo": "cd ./exampleSite && hugo --renderToMemory --themesDir ../ --layoutDir ../layouts && :", + "update-deps": "(git diff 'HEAD@{1}' --name-only | grep 'package-lock.json' > /dev/null) && npm ci || :" + }, + "hugo-bin": { + "buildTags": "extended" + }, + "husky": { + "skipCI": true, + "hooks": { + "pre-commit": "lint-staged", + "post-merge": "npm run update-deps; git remote prune origin" + } + }, + "lint-staged": { + "**/*.html": [ + "npm run test:hugo" + ] }, "repository": { "type": "git", @@ -19,6 +38,12 @@ }, "homepage": "https://github.com/peaceiris/hugo-theme-iris#readme", "devDependencies": { - "hugo-bin": "^0.51.2" + "hugo-bin": "^0.51.2", + "husky": "^4.2.1", + "lint-staged": "^10.0.3", + "npm-run-all": "^4.1.5", + "open": "^7.0.0", + "standard-version": "^7.1.0", + "wait-on": "^4.0.0" } } |