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.
This commit is contained in:

committed by
Waldir Pimenta

parent
c2051a0674
commit
7a28aef527
@@ -12,7 +12,7 @@
|
|||||||
"lint-markdown": "markdownlint pages*/**/*.md",
|
"lint-markdown": "markdownlint pages*/**/*.md",
|
||||||
"lint-tldr": "tldr-lint ./pages",
|
"lint-tldr": "tldr-lint ./pages",
|
||||||
"test": "bash scripts/test.sh",
|
"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": {
|
"husky": {
|
||||||
"hooks": {
|
"hooks": {
|
||||||
|
@@ -13,6 +13,7 @@ function initialize {
|
|||||||
|
|
||||||
function build_index {
|
function build_index {
|
||||||
npm run build-index
|
npm run build-index
|
||||||
|
cp index.json pages/
|
||||||
echo "Pages index succesfully built."
|
echo "Pages index succesfully built."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user