From 8b196cc2e5150b603deab0958459649c548902ec Mon Sep 17 00:00:00 2001 From: DaAwesomeP Date: Wed, 17 Aug 2016 19:07:17 -0500 Subject: [PATCH] Fix svg2png in tests, update node deps --- .travis.yml | 1 + bin/wappalyzer-build | 2 +- docker/Dockerfile | 1 - docker/node/package.json | 9 +++++---- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3fda78932..d6812a640 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,7 @@ language: node_js node_js: - "4" + - "node" sudo: false before_install: - export WAPPALYZER_ROOT=$TRAVIS_BUILD_DIR diff --git a/bin/wappalyzer-build b/bin/wappalyzer-build index cb1389954..152b0e513 100755 --- a/bin/wappalyzer-build +++ b/bin/wappalyzer-build @@ -42,7 +42,7 @@ do dest="$WAPPALYZER_ROOT/src/icons/converted/$(basename "$svg").png" if [[ ! -f "$dest" ]]; then - svg2png "$svg" --width=32 --height=32 --output "$dest" || true + node $WAPPALYZER_NODE_PATH/node_modules/svg2png/bin/svg2png-cli "$svg" --width=32 --height=32 --output "$dest" || true fi done diff --git a/docker/Dockerfile b/docker/Dockerfile index d8c6fd4a4..e4834db06 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -39,7 +39,6 @@ RUN su wappalyzer -c "mkdir $WAPPALYZER_NODE_PATH" ADD node/package.json $WAPPALYZER_NODE_PATH/package.json -RUN npm i -g npm svg2png --prefix=/usr/local RUN ln -s -f /usr/local/bin/npm /usr/bin/npm RUN su wappalyzer -c "cd $WAPPALYZER_NODE_PATH && npm i" diff --git a/docker/node/package.json b/docker/node/package.json index 0bf01f87d..30f0c9552 100644 --- a/docker/node/package.json +++ b/docker/node/package.json @@ -12,13 +12,14 @@ "test": "./bin/wappalyzer build" }, "devDependencies": { - "file-type": "3.4.*", - "is-svg": "1.1.*", - "read-chunk": "1.0.*", + "file-type": "3.8.*", + "is-svg": "2.0.*", + "read-chunk": "2.0.*", "jsonlint": "*", "jpm": "*", "imagemin-cli": "*", - "phantomjs-prebuilt": "*", + "phantomjs-prebuilt": "*", + "svg2png": "*", "svgo": "*" }, "engines": {