Generate inDesign zip files at build time

* add shell script to generate zip files (it’s a little slow)
* untrack the localized-urls.json and generate that at build time too.
This commit is contained in:
chrisgarrity 2017-06-14 14:45:54 -04:00
parent 3299fe9668
commit 29f2eab750
4 changed files with 18 additions and 3 deletions

0
bin/build-www-json Normal file → Executable file
View file

15
bin/make-zips.sh Executable file
View file

@ -0,0 +1,15 @@
#!/usr/bin/env bash
# create zip files for all the indesign directories
# assumes that is it run from the root directory
echo "Generating zip files for cards."
for f in ./resources/source/cards/InDesign-files/*/; do
zip -rq "${f%/}.zip" "$f"
done
echo "Generating zip files for guides."
for f in ./resources/source/guides/InDesign-files/*/; do
zip -rq "${f%/}.zip" "$f"
done
echo "Finished generating zip files."

View file

@ -4,8 +4,9 @@
"description": "Source and published versions of Scratch materials and resources",
"scripts": {
"lint": "eslint ./resources/js/list.js",
"test": "npm run lint",
"locale": "node ./bin/build-www-json ./resources/www/ ./resources/"
"localize": "./bin/build-www-json ./resources/www/ ./resources/",
"build": "./bin/make-zips.sh && npm run localize",
"test": "npm run lint && npm run build"
},
"author": "Massachusetts Institute of Technology",
"license": "BSD-3-Clause",

File diff suppressed because one or more lines are too long