From 497ab2342ceb0284ae2468c2a9f1238e68ea9de2 Mon Sep 17 00:00:00 2001 From: Rick Carlino Date: Thu, 22 Sep 2016 09:15:57 -0500 Subject: [PATCH] Add `rake frontend:install`. --- index.js | 1 + lib/tasks/install_frontend.rake | 15 +++++++++++++++ package.json | 2 +- 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 index.js create mode 100644 lib/tasks/install_frontend.rake diff --git a/index.js b/index.js new file mode 100644 index 000000000..a8141d3b1 --- /dev/null +++ b/index.js @@ -0,0 +1 @@ +console.log("Hello, world!"); diff --git a/lib/tasks/install_frontend.rake b/lib/tasks/install_frontend.rake new file mode 100644 index 000000000..952e7efb9 --- /dev/null +++ b/lib/tasks/install_frontend.rake @@ -0,0 +1,15 @@ +require_relative '../key_gen' + +namespace :frontend do + desc "Install the frontend into /public" + task install: :environment do + ` + + git clone https://github.com/FarmBot/farmbot-web-frontend.git public + cd public + npm install + npm run build + + ` + end +end diff --git a/package.json b/package.json index 798e3769d..db8b1e45d 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "[![Code Climate](https://codeclimate.com/github/FarmBot/farmbot-web-app/badges/gpa.svg)](https://codeclimate.com/github/FarmBot/farmbot-web-app) [![Test Coverage](https://codeclimate.com/github/FarmBot/farmbot-web-app/badges/coverage.svg)](https://codeclimate.com/github/FarmBot/farmbot-web-app) [![Build Status](https://travis-ci.org/FarmBot/farmbot-web-app.svg)](https://travis-ci.org/FarmBot/farmbot-web-app)", "main": "index.js", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "start": "rake frontend:install" }, "repository": { "type": "git",