From b286946a3595bc6bf0ed056d376e62f335121351 Mon Sep 17 00:00:00 2001 From: Derek Montgomery Date: Thu, 28 Jul 2016 12:55:47 -0500 Subject: [PATCH] vendor assets --- .bowerrc | 4 +++ Gemfile | 7 ++++++ Gemfile.lock | 18 +++++++++++++ README.md | 2 +- .../{application.css => application.scss} | 13 ++++++++-- bower.json | 25 +++++++++++++++++++ config/application.rb | 9 +++++++ config/initializers/assets.rb | 2 ++ vendor/assets/javascripts/.keep | 0 vendor/assets/stylesheets/.keep | 0 10 files changed, 77 insertions(+), 3 deletions(-) create mode 100644 .bowerrc rename app/assets/stylesheets/{application.css => application.scss} (76%) create mode 100644 bower.json delete mode 100644 vendor/assets/javascripts/.keep delete mode 100644 vendor/assets/stylesheets/.keep diff --git a/.bowerrc b/.bowerrc new file mode 100644 index 0000000..bac96ad --- /dev/null +++ b/.bowerrc @@ -0,0 +1,4 @@ +{ + "directory": "vendor/assets/bower_components", + "analytics": false +} diff --git a/Gemfile b/Gemfile index 2549807..97980ae 100644 --- a/Gemfile +++ b/Gemfile @@ -14,10 +14,17 @@ gem 'sass-rails', '~> 5.0' gem 'turbolinks', '~> 5' gem 'uglifier', '>= 1.3.0' +# assets +gem 'bourbon' +gem 'neat' +gem 'bitters' + group :development do gem 'rack-livereload' gem 'rails-erd' gem 'web-console' + gem 'better_errors' + gem 'binding_of_caller' end group :development, :test do diff --git a/Gemfile.lock b/Gemfile.lock index 404f65b..d2ed7ea 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -43,8 +43,19 @@ GEM ast (2.3.0) awesome_print (1.7.0) bcrypt (3.1.11) + better_errors (2.1.1) + coderay (>= 1.0.0) + erubis (>= 2.6.6) + rack (>= 0.9.0) binding_of_caller (0.7.2) debug_inspector (>= 0.0.1) + bitters (1.2.0) + bourbon (>= 4.2) + sass (>= 3.4) + thor + bourbon (4.2.7) + sass (~> 3.4) + thor (~> 0.19) builder (3.2.2) byebug (9.0.5) choice (0.2.0) @@ -119,6 +130,9 @@ GEM ruby-progressbar multi_json (1.12.1) mysql2 (0.4.4) + neat (1.8.0) + sass (>= 3.3) + thor (~> 0.19) nenv (0.3.0) nio4r (1.2.1) nokogiri (1.6.8) @@ -234,7 +248,10 @@ PLATFORMS DEPENDENCIES awesome_print bcrypt (~> 3.1.7) + better_errors binding_of_caller + bitters + bourbon byebug figaro (~> 1.1.1) guard @@ -248,6 +265,7 @@ DEPENDENCIES listen (~> 3.0) minitest-reporters mysql2 (>= 0.3.18, < 0.5) + neat pry-byebug pry-rails puma (~> 3.0) diff --git a/README.md b/README.md index 82d0c91..8de62f4 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@ This application manages quizzes intended to be used as pre-interview skill asse * honor RuboCop * keep tests green * pull --rebase !always `git config --global pull.rebase true` +* cd vendor/assets/ && bitters install && cd ../.. * place all required dev seed data in fixtures for rails db:fixtures:load # Docker @@ -24,4 +25,3 @@ This application manages quizzes intended to be used as pre-interview skill asse - starts up simple server for viewing/demo sans guard visit http://localhost:3000 - diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.scss similarity index 76% rename from app/assets/stylesheets/application.css rename to app/assets/stylesheets/application.scss index 0ebd7fe..4928999 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.scss @@ -10,6 +10,15 @@ * files in this directory. Styles in this file should be added after the last require_* statement. * It is generally better to create a new file per style scope. * - *= require_tree . - *= require_self */ + +@import 'bourbon'; +@import 'base'; // bitters +@import 'neat'; + +@import 'core/**/*'; +@import 'atoms/**/*'; +@import 'molecules/**/*'; +// @import 'organisms/**/*'; +@import 'templates/**/*'; +@import 'pages/**/*'; diff --git a/bower.json b/bower.json new file mode 100644 index 0000000..f607884 --- /dev/null +++ b/bower.json @@ -0,0 +1,25 @@ +{ + "name": "skill-assessment-app", + "authors": [ + "Harish Bhavanichikar", + "Jennifer Siegfried", + "Derek Montgomery", + "Mark Moser" + ], + "private": true, + "dependencies": { + "jquery": "1.9.1", + "handlebars": "3.0.2", + "jquery-validate": "", + "tota11y": "", + "jquery-mockjax": "^2.1.1", + "modernizr-lite": "*" + }, + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "tests" + ] +} diff --git a/config/application.rb b/config/application.rb index 1f12e80..5b0cbe8 100644 --- a/config/application.rb +++ b/config/application.rb @@ -11,5 +11,14 @@ module SkillAssessmentApp # Settings in config/environments/* take precedence over those specified here. # Application configuration should go into files in config/initializers # -- all .rb files in that directory are automatically loaded. + + # bitters + config.assets.paths << Rails.root.join('vendor', 'assets', 'base') + + # bourbon + config.assets.paths << Rails.root.join('vendor', 'assets', 'bourbon') + + # bower + config.assets.paths << Rails.root.join('vendor', 'assets', 'bower_components') end end diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb index 01ef3e6..e012c15 100644 --- a/config/initializers/assets.rb +++ b/config/initializers/assets.rb @@ -9,3 +9,5 @@ Rails.application.config.assets.version = '1.0' # Precompile additional assets. # application.js, application.css, and all non-JS/CSS in app/assets folder are already added. # Rails.application.config.assets.precompile += %w( search.js ) + +Rails.application.config.assets.precompile += ['vendor/assets/**/*'] diff --git a/vendor/assets/javascripts/.keep b/vendor/assets/javascripts/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/vendor/assets/stylesheets/.keep b/vendor/assets/stylesheets/.keep deleted file mode 100644 index e69de29..0000000