diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 984d95e..28196cf 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,11 +6,11 @@ cache: # add cache to 'node_modules' for speeding up builds before_script: - apk update && apk add git - - npm install + - npm install --only=prod test: script: - - npm install snyk && npm run snyk # Refer to "scripts" in package.json + - npm install --only=prod snyk && npm run snyk # Refer to "scripts" in package.json - npm run hexo only: @@ -23,7 +23,7 @@ test: renovate: # Check dependency update script: - - npm install renovate + - npm install --only=prod renovate - npm run renovate only: diff --git a/.npmrc b/.npmrc index 5e32bcc..77171bd 100644 --- a/.npmrc +++ b/.npmrc @@ -1,3 +1,2 @@ -only=prod package-lock=false optional=false diff --git a/netlify.toml b/netlify.toml index c0b10a4..a81d8fd 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,3 +1,3 @@ [context.production] publish = "public" - command = "npm install snyk && npm run snyk && npm run hexo" + command = "npm install --only=prod snyk && npm run snyk && npm run hexo" diff --git a/package.json b/package.json index 3595712..dedc9ab 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,9 @@ "hexo-nofollow": "curbengh/hexo-nofollow#v2.0", "hexo-renderer-ejs": "hexojs/hexo-renderer-ejs", "hexo-renderer-marked": "hexojs/hexo-renderer-marked", - "hexo-server": "hexojs/hexo-server", "hexo-yam": "curbengh/hexo-yam" + }, + "devDependencies": { + "hexo-server": "hexojs/hexo-server" } }