Merge pre-install scripts
This commit is contained in:
parent
7d7ca0de4a
commit
525d41e63c
@ -78,7 +78,7 @@
|
||||
"scripts": {
|
||||
"lint:fix": "eslint --fix app.js \"lib/**/*.js\" \"test/**/*.js\"",
|
||||
"lint": "eslint app.js \"lib/**/*.js\" \"test/**/*.js\"",
|
||||
"preinstall": "./scripts/check-node-canvas.sh",
|
||||
"preinstall": "./scripts/darwin-pre-install.sh",
|
||||
"pretest:setup": "npm run lint",
|
||||
"test:setup": "NODE_ENV=test node test setup",
|
||||
"pretest": "npm run test:setup",
|
||||
|
@ -1,24 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
CAIRO_PKG_CONFIG=`pkg-config cairo --cflags-only-I 2> /dev/null`
|
||||
RESULT=$?
|
||||
|
||||
if [[ ${RESULT} -ne 0 ]]; then
|
||||
echo "###################################################################################"
|
||||
echo "# PREINSTALL HOOK ERROR #"
|
||||
echo "#---------------------------------------------------------------------------------#"
|
||||
echo "# #"
|
||||
echo "# node-canvas install error: some packages required by 'cairo' are not found #"
|
||||
echo "# #"
|
||||
echo -e "# Use '\033[1mmake all\033[0m', it will take care of common/known issues #"
|
||||
echo "# #"
|
||||
echo "# As an alternative try: #"
|
||||
echo "# Try to 'export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/opt/X11/lib/pkgconfig' #"
|
||||
echo "# #"
|
||||
echo "# If problems persist visit: https://github.com/Automattic/node-canvas/wiki #"
|
||||
echo "# #"
|
||||
echo "###################################################################################"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
@ -1,7 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/opt/X11/lib/pkgconfig
|
||||
fi
|
||||
|
||||
npm install
|
Loading…
Reference in New Issue
Block a user