Bash script for install
parent
015f139256
commit
e86d2d196b
|
@ -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
|
|
@ -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
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue