diff --git a/docker/docker-compose.test.yml b/.reaction/docker/docker-compose.test.yml similarity index 85% rename from docker/docker-compose.test.yml rename to .reaction/docker/docker-compose.test.yml index 5770f0edd41..f92adfffb66 100644 --- a/docker/docker-compose.test.yml +++ b/.reaction/docker/docker-compose.test.yml @@ -1,7 +1,7 @@ # used for CircleCI curl tests reaction: - image: reactioncommerce/prequel + image: reactioncommerce/reaction:latest links: - mongo ports: diff --git a/docker/packages.example b/.reaction/docker/packages.example similarity index 100% rename from docker/packages.example rename to .reaction/docker/packages.example diff --git a/docker/reaction.ci.dockerfile b/.reaction/docker/reaction.ci.dockerfile similarity index 95% rename from docker/reaction.ci.dockerfile rename to .reaction/docker/reaction.ci.dockerfile index deb98d0c3b6..64c60cb08ed 100644 --- a/docker/reaction.ci.dockerfile +++ b/.reaction/docker/reaction.ci.dockerfile @@ -18,7 +18,7 @@ ENV APP_BUNDLE_DIR "/var/www" ENV BUILD_SCRIPTS_DIR "/opt/reaction" # Install entrypoint and build scripts -COPY docker/scripts $BUILD_SCRIPTS_DIR +COPY .reaction/docker/scripts $BUILD_SCRIPTS_DIR RUN chmod -R +x $BUILD_SCRIPTS_DIR diff --git a/docker/reaction.dev.dockerfile b/.reaction/docker/reaction.dev.dockerfile similarity index 95% rename from docker/reaction.dev.dockerfile rename to .reaction/docker/reaction.dev.dockerfile index 9634f5576fc..2f7e1f63fc1 100644 --- a/docker/reaction.dev.dockerfile +++ b/.reaction/docker/reaction.dev.dockerfile @@ -18,7 +18,7 @@ ENV APP_BUNDLE_DIR "/var/www" ENV BUILD_SCRIPTS_DIR "/opt/reaction" # Install entrypoint and build scripts -COPY docker/scripts $BUILD_SCRIPTS_DIR +COPY .reaction/docker/scripts $BUILD_SCRIPTS_DIR RUN chmod -R +x $BUILD_SCRIPTS_DIR diff --git a/docker/reaction.prod.dockerfile b/.reaction/docker/reaction.prod.dockerfile similarity index 95% rename from docker/reaction.prod.dockerfile rename to .reaction/docker/reaction.prod.dockerfile index 1276e3d2a50..57561f8cf53 100644 --- a/docker/reaction.prod.dockerfile +++ b/.reaction/docker/reaction.prod.dockerfile @@ -16,7 +16,7 @@ ENV APP_BUNDLE_DIR "/var/www" ENV BUILD_SCRIPTS_DIR "/opt/reaction" # Install entrypoint and build scripts -COPY docker/scripts $BUILD_SCRIPTS_DIR +COPY .reaction/docker/scripts $BUILD_SCRIPTS_DIR RUN chmod -R +x $BUILD_SCRIPTS_DIR diff --git a/docker/scripts/build-meteor.sh b/.reaction/docker/scripts/build-meteor.sh similarity index 100% rename from docker/scripts/build-meteor.sh rename to .reaction/docker/scripts/build-meteor.sh diff --git a/bin/docker/build-packages.sh b/.reaction/docker/scripts/build-packages.sh similarity index 100% rename from bin/docker/build-packages.sh rename to .reaction/docker/scripts/build-packages.sh diff --git a/docker/scripts/entrypoint.sh b/.reaction/docker/scripts/entrypoint.sh similarity index 100% rename from docker/scripts/entrypoint.sh rename to .reaction/docker/scripts/entrypoint.sh diff --git a/docker/scripts/install-deps.sh b/.reaction/docker/scripts/install-deps.sh similarity index 100% rename from docker/scripts/install-deps.sh rename to .reaction/docker/scripts/install-deps.sh diff --git a/docker/scripts/install-meteor.sh b/.reaction/docker/scripts/install-meteor.sh similarity index 100% rename from docker/scripts/install-meteor.sh rename to .reaction/docker/scripts/install-meteor.sh diff --git a/docker/scripts/install-node.sh b/.reaction/docker/scripts/install-node.sh similarity index 100% rename from docker/scripts/install-node.sh rename to .reaction/docker/scripts/install-node.sh diff --git a/docker/scripts/install-phantom.sh b/.reaction/docker/scripts/install-phantom.sh similarity index 100% rename from docker/scripts/install-phantom.sh rename to .reaction/docker/scripts/install-phantom.sh diff --git a/docker/scripts/plugin-loader.sh b/.reaction/docker/scripts/plugin-loader.sh similarity index 81% rename from docker/scripts/plugin-loader.sh rename to .reaction/docker/scripts/plugin-loader.sh index 26fb408457d..1148eedf8d6 100755 --- a/docker/scripts/plugin-loader.sh +++ b/.reaction/docker/scripts/plugin-loader.sh @@ -18,15 +18,15 @@ for plugins in "${PLUGIN_SUB_DIRS[@]}"; do for dir in $(find ./imports/plugins/$plugins -mindepth 1 -maxdepth 1 -type d); do if [[ -f "$dir/client/index.js" ]]; then IMPORT_PATH=$(echo "$dir/client/index.js" | cut -c2-) - echo "import \"$IMPORT_PATH\"" >> $CLIENT_PLUGINS_FILE + echo "import \"$IMPORT_PATH\";" >> $CLIENT_PLUGINS_FILE fi if [[ -f "$dir/server/index.js" ]]; then IMPORT_PATH=$(echo "$dir/server/index.js" | cut -c2-) - echo "import \"$IMPORT_PATH\"" >> $SERVER_PLUGINS_FILE + echo "import \"$IMPORT_PATH\";" >> $SERVER_PLUGINS_FILE fi if [[ -f "$dir/register.js" ]]; then IMPORT_PATH=$(echo "$dir/register.js" | cut -c2-) - echo "import \"$IMPORT_PATH\"" >> $SERVER_PLUGINS_FILE + echo "import \"$IMPORT_PATH\";" >> $SERVER_PLUGINS_FILE fi done done diff --git a/docker/scripts/post-build-cleanup.sh b/.reaction/docker/scripts/post-build-cleanup.sh similarity index 100% rename from docker/scripts/post-build-cleanup.sh rename to .reaction/docker/scripts/post-build-cleanup.sh diff --git a/docker/scripts/post-install-cleanup.sh b/.reaction/docker/scripts/post-install-cleanup.sh similarity index 100% rename from docker/scripts/post-install-cleanup.sh rename to .reaction/docker/scripts/post-install-cleanup.sh diff --git a/bin/ci.sh b/.reaction/scripts/ci.sh similarity index 100% rename from bin/ci.sh rename to .reaction/scripts/ci.sh diff --git a/bin/clone-packages.sh b/.reaction/scripts/clone-packages.sh similarity index 100% rename from bin/clone-packages.sh rename to .reaction/scripts/clone-packages.sh diff --git a/bin/collection-dump b/.reaction/scripts/collection-dump similarity index 100% rename from bin/collection-dump rename to .reaction/scripts/collection-dump diff --git a/bin/install b/.reaction/scripts/install similarity index 100% rename from bin/install rename to .reaction/scripts/install diff --git a/bin/load-dump b/.reaction/scripts/load-dump similarity index 100% rename from bin/load-dump rename to .reaction/scripts/load-dump diff --git a/.reaction/scripts/postinstall.sh b/.reaction/scripts/postinstall.sh new file mode 100755 index 00000000000..203bfb068dd --- /dev/null +++ b/.reaction/scripts/postinstall.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +############################################################ +# This script runs automatically after every 'npm install' # +############################################################ + +# copy FontAwesome into project +cp -R node_modules/font-awesome/fonts ./public/ + +# setup plugin imports on client and server +bash .reaction/docker/scripts/plugin-loader.sh diff --git a/bin/reload b/.reaction/scripts/reload similarity index 100% rename from bin/reload rename to .reaction/scripts/reload diff --git a/Dockerfile b/Dockerfile index 32e682a9078..3513d4dd3aa 120000 --- a/Dockerfile +++ b/Dockerfile @@ -1 +1 @@ -docker/reaction.prod.dockerfile \ No newline at end of file +.reaction/docker/reaction.prod.dockerfile \ No newline at end of file diff --git a/README.md b/README.md index a05f0508271..a8e3aed7e40 100644 --- a/README.md +++ b/README.md @@ -6,13 +6,13 @@ Reaction is built with JavaScript (ES6), Meteor, Node.js and works nicely with D ## Status -- 0.13.x Master ( [stable](https://github.com/reactioncommerce/reaction/tree/master) ) -- 0.14.x Development ( [latest](https://github.com/reactioncommerce/reaction/tree/development) ) - Reaction is expected to have a stable codebase ready for some production configurations within the next couple of major releases. Be aware though, that we're updating frequently. Even existing structures that are functionally done are getting frequent updates to ensure we're current with the most current libraries available to us. Currently good for contributing, observing progress, and testing. We'd encourage due diligence in production usage, be very comfortable with the code, and risk tolerant. There are still many parts in development! +- Master ( [stable](https://github.com/reactioncommerce/reaction/tree/master) ) +- Development ( [latest](https://github.com/reactioncommerce/reaction/tree/development) ) + ## Docs Installation, configuration and development documentation is available on [docs.reactioncommerce.com](https://docs.reactioncommerce.com/) @@ -21,16 +21,24 @@ The Reaction documentation source is located in the [reaction-docs](https://gith ## Installation -> Reaction requires [Meteor](https://www.meteor.com/install), [Node](http://nodejs.org/), [npm](https://www.npmjs.com/) and [ImageMagick](http://www.imagemagick.org/script/binary-releases.php) +> Reaction requires a recent version of [npm](https://www.npmjs.com/) installed. + +``` +npm i -g n +n stable +``` + +[ImageMagick](http://www.imagemagick.org/script/binary-releases.php) is optional, but required for transforming images for responsive sizing. + +**Windows** users should review the [Windows specific installation requirements for Meteor and Reaction](https://docs.reactioncommerce.com/reaction-docs/development/requirements). -Developers using **Windows** should review the [Windows specific installation requirements for Meteor and Reaction](https://docs.reactioncommerce.com/reaction-docs/development/requirements). +_**reaction-cli installation:**_ ```bash -curl https://install.meteor.com | /bin/sh # installs Meteor -git clone https://github.com/reactioncommerce/reaction.git +npm install -g reaction-cli +reaction init cd reaction -meteor npm install -./reaction +reaction ``` Additional setup options, such as how to set the default credentials, can be found in the [installation](https://docs.reactioncommerce.com/reaction-docs/development/installation) and [configuration documentation](https://docs.reactioncommerce.com/reaction-docs/development/configuration). diff --git a/bin/check-settings b/bin/check-settings deleted file mode 100755 index 997838cc575..00000000000 --- a/bin/check-settings +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -CONFIG=$1 -if [ ! -f $CONFIG ]; then - SAMPLE_CONFIG=${CONFIG/.json/.sample.json} - echo "Error: config file \"$CONFIG\" not found. You have two options:" - echo "- cp $SAMPLE_CONFIG $CONFIG # don't forget to edit!" - echo "- request the file from developers" - exit 1 -fi diff --git a/bin/deploy b/bin/deploy deleted file mode 100755 index d8901567b9c..00000000000 --- a/bin/deploy +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -usage() { echo "Usage: $0 [hostname] [settings.json] [-P]" 1>&2; exit 1; } -DIRNAME=$(cd `dirname $0` && pwd) - -CONFIG=$DIRNAME/../settings/$2 -. $DIRNAME/check-settings $CONFIG -sed s/__VERSION__/$(git rev-parse HEAD)/ $CONFIG > /tmp/$2 - -meteor deploy $3 --settings /tmp/$2 $1 \ No newline at end of file diff --git a/bin/docker/.gitignore b/bin/docker/.gitignore deleted file mode 100644 index df22ce7c32a..00000000000 --- a/bin/docker/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -.build.log -packages diff --git a/bin/docker/build-bundle.sh b/bin/docker/build-bundle.sh deleted file mode 100644 index 8b64e16db39..00000000000 --- a/bin/docker/build-bundle.sh +++ /dev/null @@ -1,48 +0,0 @@ -#/bin/bash - -# install dependencies -apt-get update -apt-get -qq -y install --no-install-recommends ca-certificates bzip2 curl git - -# install meteor -curl --progress-bar --fail "https://d3sqy0vbqsdhku.cloudfront.net/packages-bootstrap/1.2.1/meteor-bootstrap-os.linux.x86_64.tar.gz" | tar -xzf - -C "/root" -o -test -x "/root/.meteor/meteor" -ln -s /root/.meteor/meteor /usr/bin/meteor - -# install node from meteor tool package -METEOR_TOOL="/root/.meteor/$(dirname "$(readlink "/root/.meteor/meteor")")" -cd "$METEOR_TOOL/dev_bundle" -cp -r --parents bin/node /usr -cp -r --parents include/ /usr - -# install npm -curl https://www.npmjs.com/install.sh | sh - -# install forever and phantomjs -npm install -g forever phantomjs-prebuilt - -# build the meteor application -cd /var/src -/usr/bin/build-meteor.sh - -# clean source tree -rm -rf /var/src/packages/*/lib/bower -rm -rf /var/src/packages/*/.npm -rm -rf /var/src/.meteor/local - -# clean additional files created outside the source tree -rm -rf /root/.npm /root/.cache /root/.config /root/.cordova /root/.local -rm -rf /tmp/* - -# remove npm -rm -rf /usr/bin/npm -rm -rf /usr/lib/node_modules/npm - -# remove meteor -rm -rf /usr/bin/meteor -rm -rf /root/.meteor - -# remove dependencies -apt-get -qq -y purge ca-certificates curl git bzip2 -apt-get -qq -y autoremove -rm -rf /var/lib/apt/lists/* diff --git a/bin/docker/build-meteor.sh b/bin/docker/build-meteor.sh deleted file mode 100755 index 119d459a3c1..00000000000 --- a/bin/docker/build-meteor.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -# -# builds a production meteor bundle directory -# -set -e - -# Customize packages -/bin/bash bin/docker/build-packages.sh - -# -# build the source -# -meteor build --directory /var/www -cd /var/www/bundle/programs/server/ && npm install diff --git a/bin/docker/entrypoint.sh b/bin/docker/entrypoint.sh deleted file mode 100755 index 6aba96d5bfa..00000000000 --- a/bin/docker/entrypoint.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash - -# Starts local mongdb installation. -# Starts application main.js -# -# MONGO_URL env variable will prevent local db start -# -set -e - -# set default meteor values if they arent set -: ${PORT:="80"} -: ${ROOT_URL:="http://localhost"} -: ${MONGO_URL:="mongodb://127.0.0.1:27017/meteor"} - -# set default node executable -: ${NODE:="node"} - -#start mongodb (optional) -if [[ "${MONGO_URL}" == *"127.0.0.1"* ]]; then - echo "Starting local MongoDB..." - # startup mongodb - /usr/bin/mongod --smallfiles --fork --logpath /var/log/mongodb.log - -fi - -# Run meteor -exec $NODE ./main.js diff --git a/bin/docker/install-graphicsmagick.sh b/bin/docker/install-graphicsmagick.sh deleted file mode 100644 index 653d982b3a1..00000000000 --- a/bin/docker/install-graphicsmagick.sh +++ /dev/null @@ -1,15 +0,0 @@ - -#/bin/bash - -touch /var/timestamp - -# install graphicsmagick -apt-get update -apt-get -qq -y install --no-install-recommends graphicsmagick - -# remove anything isntalled by apt in /usr/share/doc after starting this script -find /usr/share/doc \( -type f -o -empty \) -cnewer "/var/timestamp" -delete - -# remove unnecessary apt files -apt-get clean -rm -rf /var/lib/apt/lists/* diff --git a/bin/docker/install-mongodb.sh b/bin/docker/install-mongodb.sh deleted file mode 100644 index ee7cb364f14..00000000000 --- a/bin/docker/install-mongodb.sh +++ /dev/null @@ -1,14 +0,0 @@ - -#/bin/bash - -# add the mongodb repo to get the latest release -apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10 -echo "deb http://repo.mongodb.org/apt/debian wheezy/mongodb-org/3.0 main" | tee /etc/apt/sources.list.d/mongodb-org-3.0.list - -# install the mongodb server binaries -apt-get update -apt-get -qq -y install --no-install-recommends adduser mongodb-org-server - -# remove unnecessary apt files -apt-get clean -rm -rf /var/lib/apt/lists/* diff --git a/bin/dump b/bin/dump deleted file mode 100755 index 76ce50e632d..00000000000 --- a/bin/dump +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash - -METEOR_DOMAIN="demo.reactioncommerce.com" - -if [[ "$METEOR_DOMAIN" == "" ]] -then - echo "Usage:" - echo "$0 site" - exit 1 -fi - -# REGEX ALL THE THINGS. -# Chomps the goodness flakes out of urls like "mongodb://client:pass-word@skybreak.member0.mongolayer.com:27017/goto_meteor_com" -MONGO_URL_REGEX="mongodb:\/\/(.*):(.*)@(.*)\/(.*)" - -# stupid tmp file as meteor may want to prompt for a password -TMP_FILE="/tmp/meteor-dump.tmp" - -# Get the mongo url for your meteor app -meteor mongo $METEOR_DOMAIN --url | tee "${TMP_FILE}" - -MONGO_URL=$(sed '/Password:/d' "${TMP_FILE}") - -# clean up the temp file -if [[ -f "${TMP_FILE}" ]] -then - rm "${TMP_FILE}" -fi - -if [[ $MONGO_URL =~ $MONGO_URL_REGEX ]] -then - MONGO_USER="${BASH_REMATCH[1]}" - MONGO_PASSWORD="${BASH_REMATCH[2]}" - MONGO_DOMAIN="${BASH_REMATCH[3]}" - MONGO_DB="${BASH_REMATCH[4]}" - MONGO_OUT_DIR="/tmp/dump" - - #e.g mongodump -u client -h skybreak.member0.mongolayer.com:27017 -d goto_meteor_com -p "guid-style-password" - echo "Running mongodump -u $MONGO_USER -h $MONGO_DOMAIN -d $MONGO_DB -p \"${MONGO_PASSWORD}\" -o $MONGO_OUT_DIR" - mongodump -u $MONGO_USER -h $MONGO_DOMAIN -d $MONGO_DB -p "${MONGO_PASSWORD}" -o $MONGO_OUT_DIR - echo "" - echo "Dumped to $MONGO_OUT_DIR/$MONGO_DB" -else - echo "Sorry, no dump for you. Couldn't extract your details from the url: ${MONGO_URL}" - exit 1 -fi diff --git a/bin/env.sh b/bin/env.sh deleted file mode 100755 index e5d57e21f70..00000000000 --- a/bin/env.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -# Set environment variables if needed -# MONGO_URL=mongodb://localhost:27017/myapp -# PORT=3000 - -if [ -n "$1" ]; then - METEOR_SETTINGS="$(cat $1)" -fi - diff --git a/bin/reset b/bin/reset deleted file mode 100755 index ba42d47f96d..00000000000 --- a/bin/reset +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -DIRNAME=$(cd `dirname $0` && pwd) - -read -r -p "Resetting Database!! Also delete modules? [y/N]" response -if [[ $response =~ ^([yY][eE][sS]|[yY])$ ]] -then - find . -name bower -exec rm -rf {} \; 2>/dev/null - find . -name node_modules -exec rm -rf {} \; 2>/dev/null - meteor npm install - meteor reset "$@" -else - meteor reset "$@" -fi diff --git a/bin/run b/bin/run deleted file mode 100755 index 48544204469..00000000000 --- a/bin/run +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash - -set -u -set -e - - -if [[ "$@" == *"debug"* ]]; then - CMD=debug -else - CMD=run -fi - -# remove debug arg if it exists -ARGS="${@//debug}" - -CONFIG=$(pwd)/settings/settings.json -DEVCONFIG=$(pwd)/settings/dev.settings.json - -if [ -f $CONFIG ]; then - echo "Starting Reaction using '$CONFIG'." - meteor $CMD --raw-logs --settings $CONFIG $ARGS -else - if [ -f $DEVCONFIG ]; then - echo "Starting Reaction using '$DEVCONFIG'." - meteor $CMD --raw-logs --settings $DEVCONFIG $ARGS - else - echo "Starting Reaction." - meteor $CMD --raw-logs $ARGS - fi -fi diff --git a/circle.yml b/circle.yml index a01b190ea87..04c5b41e679 100644 --- a/circle.yml +++ b/circle.yml @@ -12,35 +12,33 @@ dependencies: - "~/docker" override: - cd $HOME/reaction - - chmod +x bin/clone-packages.sh - - bin/clone-packages.sh - - docker/scripts/plugin-loader.sh + - .reaction/scripts/clone-packages.sh + - .reaction/docker/scripts/plugin-loader.sh - if [[ -e ~/docker/image.tar ]]; then docker load -i ~/docker/image.tar; fi - - docker build -f docker/reaction.ci.dockerfile -t reactioncommerce/prequel . - - mkdir -p ~/docker; docker save reactioncommerce/prequel > ~/docker/image.tar + - docker build -t reactioncommerce/reaction:latest . + - mkdir -p ~/docker; docker save reactioncommerce/reaction:latest > ~/docker/image.tar test: override: - cd $HOME/reaction - meteor npm install - SERVER_TEST_REPORTER="dot" meteor test --once --full-app --headless --driver-package dispatch:mocha - - docker-compose -f docker/docker-compose.test.yml up -d; sleep 10 + - docker-compose -f .reaction/docker/docker-compose.test.yml up -d; sleep 10 - curl --retry 10 --retry-delay 5 -v http://localhost deployment: prequel: branch: development commands: - - docker build -f docker/reaction.prod.dockerfile -t reactioncommerce/prequel:latest . - - docker tag reactioncommerce/prequel:latest reactioncommerce/prequel:$CIRCLE_BUILD_NUM + - docker tag reactioncommerce/reaction:latest reactioncommerce/prequel:latest + - docker tag reactioncommerce/reaction:latest reactioncommerce/prequel:$CIRCLE_BUILD_NUM - docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS - docker push reactioncommerce/prequel:$CIRCLE_BUILD_NUM - docker push reactioncommerce/prequel:latest release: branch: master commands: - - docker build -f docker/reaction.prod.dockerfile -t reactioncommerce/reaction:latest . - - docker tag reactioncommerce/reaction:latest reactioncommerce/reaction:$CIRCLE_BUILD_NUM + - docker tag reactioncommerce/reaction:latest reactioncommerce/reaction:$CIRCLE_BUILD_NUM - docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS - docker push reactioncommerce/reaction:$CIRCLE_BUILD_NUM - docker push reactioncommerce/reaction:latest diff --git a/docker/scripts/build-packages.sh b/docker/scripts/build-packages.sh deleted file mode 100755 index f0575e1c5de..00000000000 --- a/docker/scripts/build-packages.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -# -# add bin/docker/packages to use custom build packages -# - -if [ -f bin/docker/packages ]; then - echo "[-] Using custom Meteor packages file..." - cp docker/packages .meteor/packages - exit 0 -fi diff --git a/package.json b/package.json index 141e887bd41..08a88dbae66 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "url": "https://github.com/reactioncommerce/reaction/issues" }, "scripts": { - "postinstall": "cp -R node_modules/font-awesome/fonts ./public/" + "postinstall": ".reaction/scripts/postinstall.sh" }, "dependencies": { "accounting-js": "^1.1.1", diff --git a/reaction b/reaction index 2e3f49917d2..ed0e1c96a83 100755 --- a/reaction +++ b/reaction @@ -1,29 +1,12 @@ #!/bin/bash -# -# Reaction Commerce CLI helpers -# -set -u -set -e -# by default runs settings/dev.settings.json -# customize by creating settings/settings.json -if [[ "$@" == "reset" ]]; then - bin/reset -elif [[ "$@" == "pull" ]]; then - git pull && meteor npm install && bin/clone-packages.sh -elif [[ "$@" == "install" ]]; then - # copy clone-packages.sh so that any directory - # can be specified for use in PACKAGE_DIRS config. - cp bin/clone-packages.sh /usr/local/bin/ - # copy reaction so that you don't need ./ - cp reaction /usr/local/bin/reaction && chmod + /usr/local/bin/reaction - bin/install -elif [[ "$@" == "test" ]]; then - meteor npm install - SERVER_TEST_REPORTER="dot" meteor test --once --full-app --driver-package dispatch:mocha -elif [[ "$@" == "unit-test" ]]; then - meteor npm install - SERVER_TEST_REPORTER="dot" meteor test --once --driver-package dispatch:mocha -else - bin/run "$@" -fi -exit + +echo "" +echo "This CLI tool has been deprecated in favor of the reaction-cli Node module." +echo "More info at https://www.npmjs.com/package/reaction-cli" +echo "" +echo "You can install it by running:" +echo "" +echo " npm install -g reaction-cli" +echo "" +echo "Then you can see the usage info by running 'reaction --help'" +echo ""