Skip to content

Commit

Permalink
combine dependencies for david-dm
Browse files Browse the repository at this point in the history
  • Loading branch information
hobbyquaker committed Jun 11, 2018
1 parent 9e1cd47 commit 5b2e2f5
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 5 deletions.
8 changes: 8 additions & 0 deletions addon_files/redmatic/lib/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "redmatic-base",
"private": true,
"dependencies": {
"npm": "6.1.0",
"node-red": "0.18.7"
}
}
3 changes: 1 addition & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ cp $BUILD_DIR/assets/logo-x-120.png $ADDON_TMP/redmatic/www/


echo "installing node modules..."
cp package.json $ADDON_TMP/redmatic/lib/
cd $ADDON_TMP/redmatic/lib
npm install --silent --no-package-lock --production --no-optional --global-style
rm $ADDON_TMP/redmatic/lib/package.json
Expand Down Expand Up @@ -56,7 +55,7 @@ cd $BUILD_DIR
echo "creating version files"
MODULES_DIR=$ADDON_TMP/redmatic/lib/node_modules
VERSION_FILE=$ADDON_TMP/redmatic/versions
VERSION_ADDON=`jq -r '.version' package.json`
VERSION_ADDON=`jq -r '.version' $ADDON_TMP/redmatic/lib/package.json`
RED_VERSION=`jq -r '.version' $ADDON_TMP/redmatic/lib/node_modules/node-red/package.json`

cat > $VERSION_FILE <<EOL
Expand Down
14 changes: 14 additions & 0 deletions combine_package.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const base = require(__dirname + '/addon_files/redmatic/lib/package.json');
const nodes = require(__dirname + '/addon_files/redmatic/var/package.json');
const www = require(__dirname + '/addon_files/redmatic/www/package.json');

const common = require(__dirname + '/package.json');

common.dependencies = Object.assign(
common.dependencies,
base.dependencies,
nodes.dependencies,
www.dependencies,
);

require('fs').writeFileSync(__dirname + '/package.json', JSON.stringify(common, null, ' '));
11 changes: 9 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,18 @@
"main": "none",
"dependencies": {
"npm": "6.1.0",
"node-red": "0.18.7"
"node-red": "0.18.7",
"node-red-dashboard": "2.9.4",
"node-red-contrib-ccu": "1.0.1",
"node-red-contrib-combine": "1.2.0",
"node-red-contrib-mqtt-json": "1.0.1",
"bcryptjs": "^2.4.3",
"bootstrap": "^4.1.1",
"jquery": "^3.3.1"
},
"scripts": {
"test": "exit 0"
},
"author": "Sebastian Raff <hobbyquaker@gmail.com>",
"license": "MIT"
}
}
4 changes: 3 additions & 1 deletion update_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ ncu -u
cd ../www
ncu -u

cd ../../../
cd ../../../

node combine_package.js

0 comments on commit 5b2e2f5

Please sign in to comment.