Bash script for install

pull/274/head
Rick Carlino 2016-09-22 11:12:27 -05:00
parent 015f139256
commit e86d2d196b
4 changed files with 12 additions and 18 deletions

View File

@ -0,0 +1,10 @@
#!/bin/bash
rm -rf /tmp/farmbot_frontend
mkdir /tmp/farmbot_frontend
git clone https://github.com/rickcarlino/farmbot-web-frontend.git /tmp/farmbot_frontend
rm -rf /tmp/farmbot_frontend/.git
mkdir public/ -p
cp -R /tmp/farmbot_frontend/* public/
cd public
npm install
npm run build

View File

@ -1,16 +0,0 @@
require_relative '../key_gen'
namespace :frontend do
desc "Install the frontend into /public"
task install: :environment do
`rm -rf /tmp/farmbot_frontend`
`mkdir /tmp/farmbot_frontend`
`git clone https://github.com/rickcarlino/farmbot-web-frontend.git /tmp/farmbot_frontend
rm -rf /tmp/farmbot_frontend/.git
cp -R /tmp/farmbot_frontend/* public/
cd public
npm install webpack
npm install --production
npm run build`
end
end

View File

@ -2,7 +2,7 @@
"name": "farmbot_api",
"version": "1.0.0",
"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)",
"scripts": { "heroku-postbuild": "rake frontend:install" },
"scripts": { "start": "./install_frontend.sh" },
"repository": {
"type": "git",
"url": "git+https://github.com/rickcarlino/farmbot-web-app.git"

View File

@ -8,7 +8,7 @@
"url": "https://github.com/farmbot/farmbot-web-frontend"
},
"scripts": {
"build": "webpack --config tools/webpack.config.prd.js",
"build": "./node_modules/webpack/bin/webpack.js --config tools/webpack.config.prd.js",
"start": "webpack-dev-server --config tools/webpack.config.dev.js",
"test": "karma start karma.config.js"
},