Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ travis:

report:
test -f ${ANALYZED} && \
(npm install coveralls && cat ${ANALYZED} | \
(yarn install coveralls && cat ${ANALYZED} | \
./node_modules/.bin/coveralls) || echo "NO COVERAGE"
test -f ${ANALYZED} && \
(npm install codacy-coverage && cat ${ANALYZED} | \
(yarn install codacy-coverage && cat ${ANALYZED} | \
YOURPACKAGE_COVERAGE=1 ./node_modules/codacy-coverage/bin/codacy-coverage.js) || echo "NO COVERAGE"

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Algorithm for OpenAPS implementations. To get started with OpenAPS, see the [Ope

Install tools globally:

`npm run global-install`
`yarn install`

## Usage of oref0

Expand Down Expand Up @@ -94,9 +94,9 @@ git checkout -b wip/my-enhancement-fix-or-proposal
```

This command installs new versions from source:
`sudo npm install -g`
`yarn install -g`

Alternately, `sudo npm link` or `sudo npm link oref0` should allow you to
Alternately, `yarn link` or `yarn link oref0` should allow you to
edit from your checkout while using your checkout globally on your system.

### Fork on github.
Expand Down
7 changes: 4 additions & 3 deletions bin/openaps-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ if ! nodejs --version | grep -e 'v8\.' -e 'v1[02468]\.' &> /dev/null ; then
sudo bash -c "curl -sL https://deb.nodesource.com/setup_8.x | bash -" || die "Couldn't setup node 8"
sudo apt-get install -y nodejs || die "Couldn't install nodejs"
else
sudo apt-get install -y nodejs npm || die "Couldn't install nodejs and npm"
npm install npm@latest -g || die "Couldn't update npm"
sudo apt-get install -y nodejs || die "Couldn't install nodejs"
sudo curl -o- -L https://yarnpkg.com/install.sh | bash || die "Couldn't install yarn"
sudo yarn install || die "Couldn't update yarn"
fi
## You may also need development tools to build native addons:
##sudo apt-get install gcc g++ make
Expand All @@ -37,6 +38,6 @@ sudo pip install -U openaps || die "Couldn't install openaps toolkit"
sudo pip install -U openaps-contrib || die "Couldn't install openaps-contrib"
sudo openaps-install-udev-rules || die "Couldn't run openaps-install-udev-rules"
sudo activate-global-python-argcomplete || die "Couldn't run activate-global-python-argcomplete"
sudo npm install -g json || die "Couldn't install npm json"
sudo yarn install -g json || die "Couldn't install yarn json"
echo openaps installed
openaps --version
13 changes: 7 additions & 6 deletions bin/openaps-src.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ EOT

apt-get install -y sudo
sudo apt-get update
sudo apt-get install -y git python python-dev python-software-properties python-numpy python-pip nodejs-legacy npm watchdog strace tcpdump screen acpid vim locate jq lm-sensors && \
sudo apt-get install -y git python python-dev python-software-properties python-numpy python-pip nodejs-legacy watchdog strace tcpdump screen acpid vim locate jq lm-sensors && \
( curl -s https://bootstrap.pypa.io/ez_setup.py | sudo python ) && \
sudo npm install -g json && \
( curl -o- -L https://yarnpkg.com/install.sh | bash ) && \
sudo yarn install -g json && \
sudo easy_install -ZU setuptools && \
mkdir ~/src
cd ~/src && \
Expand Down Expand Up @@ -44,10 +45,10 @@ cd ~/src && \
)
test -d oref0 && \
cd oref0 && \
npm install && \
sudo npm install -g && \
sudo npm link && \
sudo npm link oref0
yarn install && \
sudo yarn install -g && \
sudo yarn link && \
sudo yarn link oref0

sudo openaps-install-udev-rules && \
sudo activate-global-python-argcomplete && \
Expand Down
18 changes: 9 additions & 9 deletions bin/oref0-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ case $i in
-ht=*|--hardwaretype=*)
hardwaretype="${i#*=}"
;;
-npm=*|--npm_install=*)
npm_option="${i#*=}"
-yarn=*|--yarn_install=*)
yarn_option="${i#*=}"
shift
;;
*)
Expand Down Expand Up @@ -678,7 +678,7 @@ if prompt_yn "" N; then
echo Upgrading to node 8
# Use nodesource setup script to add nodesource repository to sources.list.d
sudo bash -c "curl -sL https://deb.nodesource.com/setup_8.x | bash -" || die "Couldn't setup node 8"
# Install nodejs and npm from nodesource
# Install nodejs and yarn from nodesource
sudo apt-get install -y nodejs || die "Couldn't install nodejs"
fi

Expand Down Expand Up @@ -741,11 +741,11 @@ if prompt_yn "" N; then
echo Checking oref0 installation
cd $HOME/src/oref0
if git branch | grep "* master"; then
npm list -g --depth=0 | egrep oref0@0.6.[0] || (echo Installing latest oref0 package && sudo npm install -g oref0)
elif [[ ${npm_option,,} == "force" ]]; then
echo Forcing install of latest oref0 from $HOME/src/oref0/ && cd $HOME/src/oref0/ && npm run global-install
yarn list -g --depth=0 | egrep oref0@0.6.[0] || (echo Installing latest oref0 package && yarn install -g oref0)
elif [[ ${yarn_option,,} == "force" ]]; then
echo Forcing install of latest oref0 from $HOME/src/oref0/ && cd $HOME/src/oref0/ && yarn run global-install
else
npm list -g --depth=0 | egrep oref0@0.6.[1-9] || (echo Installing latest oref0 from $HOME/src/oref0/ && cd $HOME/src/oref0/ && npm run global-install)
yarn list -g --depth=0 | egrep oref0@0.6.[1-9] || (echo Installing latest oref0 from $HOME/src/oref0/ && cd $HOME/src/oref0/ && yarn run global-install)
fi

cd $directory || die "Can't cd $directory"
Expand Down Expand Up @@ -1125,7 +1125,7 @@ if prompt_yn "" N; then
echo xdrip-js selected as CGM, so configuring xdrip-js
git clone https://github.com/xdrip-js/Logger.git $HOME/src/Logger
cd $HOME/src/Logger
sudo npm run global-install
yarn run global-install
touch /tmp/reboot-required
fi

Expand Down Expand Up @@ -1254,7 +1254,7 @@ if prompt_yn "" N; then
else
cd $HOME/src && git clone git://github.com/openaps/openaps-menu.git || (cd openaps-menu && git checkout master && git pull)
fi
cd $HOME/src/openaps-menu && sudo npm install
cd $HOME/src/openaps-menu && yarn install
cp $HOME/src/openaps-menu/openaps-menu.service /etc/systemd/system/ && systemctl enable openaps-menu
fi

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "openaps oref0 reference implementation of the reference design",
"scripts": {
"test": "make test",
"global-install": "npm install && sudo npm link && sudo npm link oref0 && sudo npm install -g && npm install -g"
"global-install": "yarn install && yarn link && yarn link oref0 && yarn install -g"
},
"repository": {
"type": "git",
Expand Down