Skip to content

Commit

Permalink
prune node_modules on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmnk Freemountainer authored and Dmnk Freemountainer committed Nov 28, 2016
1 parent 4c10338 commit a2ec3da
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions tools/deploy_win.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,26 @@
#!/bin/bash

PROJECT_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/../"
TARGET_APP=$1
TARGET_PATH=$(dirname "$TARGET_APP")
TARGET_APP=$(realpath $1)
TARGET_PATH= $(dirname "$TARGET_APP")

OS="$($PROJECT_PATH/tools/uname.sh -o)"
ARCH="$($PROJECT_PATH/tools/uname.sh -a)"
BIN_PATH="$PROJECT_PATH/tmp/bin-$OS-$ARCH"

DEPLOY_CMD="$BIN_PATH/linuxdeployqt"
NODE_CMD="$BIN_PATH/node.exe"
NPM_CMD="$BIN_PATH/npm"
PRUNE_CMD="$NODE_CMD $NPM_CMD prune --production"

pushd . > /dev/null

cd "$TARGET_PATH/node_path"
$PRUNE_CMD

cd "$TARGET_PATH/default"
$PRUNE_CMD

popd > /dev/null

windeployqt $TARGET_APP --compiler-runtime --release --qmldir=$PROJECT_PATH/src/qml

0 comments on commit a2ec3da

Please sign in to comment.