From 7a28aef5270c7b79535bd36f994ed661b66588bf Mon Sep 17 00:00:00 2001 From: Marco Bonelli Date: Fri, 15 Nov 2019 05:33:20 +0100 Subject: [PATCH] Copy index.json in build script, not npm script Move the duplication of the index.json file in the build.sh script instead of the npm build-index script. This makes things cleaner. --- package.json | 2 +- scripts/build.sh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index ad58887e4..8a6230e75 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "lint-markdown": "markdownlint pages*/**/*.md", "lint-tldr": "tldr-lint ./pages", "test": "bash scripts/test.sh", - "build-index": "node ./scripts/build-index.js | tee pages/index.json > index.json" + "build-index": "node ./scripts/build-index.js > index.json" }, "husky": { "hooks": { diff --git a/scripts/build.sh b/scripts/build.sh index eef4d4a51..75a274b5c 100644 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -13,6 +13,7 @@ function initialize { function build_index { npm run build-index + cp index.json pages/ echo "Pages index succesfully built." }