Cruft removal, part I

pull/234/head
Rick Carlino 2015-10-20 13:03:42 -05:00
parent a39f032ef9
commit fef676b1c5
7 changed files with 16 additions and 1412 deletions

View File

@ -19,7 +19,6 @@ gem 'devise', github: 'plataformatec/devise'
gem 'mutations'
gem 'active_model_serializers', '~> 0.8.3'
gem 'ice_cube'
gem 'gulp_rails', '~> 1.0'
source 'https://rails-assets.org' do
gem 'rails-assets-ng-sortable', '~> 1.2.2'

View File

@ -145,7 +145,6 @@ GEM
sexp_processor (~> 4.4)
font-awesome-rails (4.3.0.0)
railties (>= 3.2, < 5.0)
gulp_rails (1.0)
haml (4.0.6)
tilt
high_voltage (2.1.0)
@ -371,7 +370,6 @@ DEPENDENCIES
factory_girl_rails
faker
font-awesome-rails
gulp_rails (~> 1.0)
haml
high_voltage (~> 2.1.0)
ice_cube

View File

@ -3,12 +3,3 @@
require File.expand_path('../config/application', __FILE__)
FarmBot::Application.load_tasks
Rake::Task["assets:precompile"].enhance do
# We use a mix of gulp + asset pipeline. Quick fix for now is
# to piggyback on `rake assets:precompile` so that it gets
# run on deploy.
puts '====== Running `gulp build`'
puts `gulp build`
puts '====== Done running `gulp build`'
end

View File

@ -7,9 +7,3 @@ FarmBot::Application.configure do
config.consider_all_requests_local = true
config.eager_load = false
end
# Whether or not compilation should take place
GulpRails.options[:enabled] = true
# The command to run
GulpRails.options[:command] = 'gulp default'
# The directory in which your command should be executed
GulpRails.options[:directory] = Rails.root

View File

@ -1,29 +0,0 @@
var gulp = require('gulp'),
gutil = require('gulp-util'),
concat = require('gulp-concat'),
browserify = require('browserify'),
source = require('vinyl-source-stream'),
exec = require('child_process').exec,
babelify = require('babelify');
var paths = {
js: './javascripts/**/**/*.js'
};
function oops (s) {
exec( 'notify-send "' + (s.message || s || "Gulp Error") + '"' );
gutil.log(s.message);
}
gulp.task('watch', function () {
gulp.watch(paths.js, ['default']);
});
gulp.task('default', function () {
browserify('javascripts/farm_designer.js',{debug:true})
.transform(babelify)
.bundle()
.on('error', oops)
.pipe(source('farm-designer.js'))
.pipe(gulp.dest('public/build/'));
})

View File

@ -1,17 +1,17 @@
export class Plant {
constructor(options) {
this.name = (options.name || "Untitled Plant");
this.age = (options.age || _.random(0, 5));
this._id = (options._id || _.random(0, 1000));
this.imgUrl = (options.imgUrl || "/designer_icons/unknown.svg");
this.x = (options.x || 0);
this.y = (options.y || 0);
}
};
// export class Plant {
// constructor(options) {
// this.name = (options.name || "Untitled Plant");
// this.age = (options.age || _.random(0, 5));
// this._id = (options._id || _.random(0, 1000));
// this.imgUrl = (options.imgUrl || "/designer_icons/unknown.svg");
// this.x = (options.x || 0);
// this.y = (options.y || 0);
// }
// };
Plant.fakePlants = [
new Plant({name: "Blueberry", imgUrl: "/designer_icons/blueberry.svg"}),
new Plant({name: "Cabbage", imgUrl: "/designer_icons/cabbage.svg"}),
new Plant({name: "Pepper", imgUrl: "/designer_icons/pepper.svg"}),
new Plant({name: "Cilantro", imgUrl: "/designer_icons/cilantro.svg"})
];
// Plant.fakePlants = [
// new Plant({name: "Blueberry", imgUrl: "/designer_icons/blueberry.svg"}),
// new Plant({name: "Cabbage", imgUrl: "/designer_icons/cabbage.svg"}),
// new Plant({name: "Pepper", imgUrl: "/designer_icons/pepper.svg"}),
// new Plant({name: "Cilantro", imgUrl: "/designer_icons/cilantro.svg"})
// ];

File diff suppressed because it is too large Load Diff