#!/usr/bin/env bash
#
# Links an npm module
#
set -euf -o pipefail

# `npm link` does not work on CircleCI, so we're doing manual symlinking instead
rm -rf "node_modules/$1"
# Some modules have no dependencies in package.json, so we'll create it just in case
mkdir -p "node_modules"
ln -s "$(pwd)/../../$1/javascript" node_modules/$1
