diff --git a/ci/test.sh b/ci/test.sh index 2b9f4efa..285b01d3 100755 --- a/ci/test.sh +++ b/ci/test.sh @@ -8,10 +8,6 @@ cd "${REPO_ROOT}" set -x -# Workaround for https://github.com/dodo/node-unicodetable/issues/6 -# The unicode npm package fails to install on most OSes if unicode.org is blacklisting your IP. -export NODE_UNICODETABLE_UNICODEDATA_TXT="$(pwd)/UnicodeData.txt" - npm install npm rebuild node-sass CI=true npm test diff --git a/package.json b/package.json index 593ad79a..7a05c543 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ "start": "NODE_ENV=production gulp serve", "build": "NODE_ENV=production gulp build", "clean": "rm -r ./build", + "preinstall": "./scripts/preinstall.sh", "eslint": "eslint", "dev": "NODE_ENV=production gulp serve", "dev:site": "NODE_ENV=production gulp serve-site", diff --git a/UnicodeData.txt b/scripts/npm_dependencies/UnicodeData.txt old mode 100644 new mode 100755 similarity index 100% rename from UnicodeData.txt rename to scripts/npm_dependencies/UnicodeData.txt diff --git a/scripts/preinstall.sh b/scripts/preinstall.sh new file mode 100755 index 00000000..945ca491 --- /dev/null +++ b/scripts/preinstall.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +# Workaround for https://github.com/dodo/node-unicodetable/issues/6 +# The unicode npm package fails to install on most OSes if unicode.org is blacklisting your IP. +export NODE_UNICODETABLE_UNICODEDATA_TXT="$(pwd)/scripts/npm_dependencies/UnicodeData.txt"