From d2ec58c06ebeea07ea0f4c0275c1e42007d3fdc5 Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Fri, 18 May 2012 15:37:57 -0400 Subject: [PATCH] Don't pipeline in dev environment, which means that there is no need to run collectstatic either. Hooray\! --- Gemfile | 5 +---- Gemfile.lock | 17 ++--------------- Guardfile | 3 --- envs/dev.py | 1 - rakefile | 11 ++--------- static/coffee/README.md | 13 ++++--------- static/sass/README.md | 10 ++++------ templates/main.html | 2 +- templates/pipeline/inline_js.html | 9 +++++++++ templates/pipeline/js.html | 8 ++++++++ 10 files changed, 31 insertions(+), 48 deletions(-) delete mode 100644 Guardfile create mode 100644 templates/pipeline/inline_js.html create mode 100644 templates/pipeline/js.html diff --git a/Gemfile b/Gemfile index cf72c5cd26..b0065474bc 100644 --- a/Gemfile +++ b/Gemfile @@ -1,8 +1,5 @@ source :rubygems -gem 'guard', '~> 1.0.3' +gem 'rake', '0.8.3' gem 'sass', '3.1.15' gem 'bourbon', '~> 1.3.6' -gem 'libnotify', '~> 0.7.2' -gem 'ruby_gntp', '~> 0.3.4' -gem 'guard-rake', '0.0.5' diff --git a/Gemfile.lock b/Gemfile.lock index 573843c103..d6ec0096e2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -3,26 +3,13 @@ GEM specs: bourbon (1.3.6) sass (>= 3.1) - ffi (1.0.11) - guard (1.0.3) - ffi (>= 0.5.0) - thor (>= 0.14.6) - guard-rake (0.0.5) - guard - rake - libnotify (0.7.2) - rake (0.9.2.2) - ruby_gntp (0.3.4) + rake (0.8.3) sass (3.1.15) - thor (0.15.2) PLATFORMS ruby DEPENDENCIES bourbon (~> 1.3.6) - guard (~> 1.0.3) - guard-rake (= 0.0.5) - libnotify (~> 0.7.2) - ruby_gntp (~> 0.3.4) + rake (= 0.8.3) sass (= 3.1.15) diff --git a/Guardfile b/Guardfile deleted file mode 100644 index 3d96355730..0000000000 --- a/Guardfile +++ /dev/null @@ -1,3 +0,0 @@ -guard :rake, :task => :collectstatic, :run_on_all => true, :run_on_start => true do - watch(%r{^static/.+(.scss|.coffee)$}) -end diff --git a/envs/dev.py b/envs/dev.py index 2c8f6d2f63..e07bca3ece 100644 --- a/envs/dev.py +++ b/envs/dev.py @@ -11,7 +11,6 @@ from envs.common import * from envs.logsettings import get_logger_config DEBUG = True -PIPELINE = True TEMPLATE_DEBUG = True LOGGING = get_logger_config(ENV_ROOT / "log", diff --git a/rakefile b/rakefile index 22bceeee68..51f4fd72f7 100644 --- a/rakefile +++ b/rakefile @@ -59,18 +59,11 @@ task :test => REPORT_DIR do sh("#{django_admin} test --settings=envs.test --pythonpath=. $(ls djangoapps)") end -desc "Collect static files" -task :collectstatic, :env do |t, args| - args.with_defaults(:env => 'dev') - django_admin = ENV['DJANGO_ADMIN_PATH'] || select_executable('django-admin.py', 'django-admin') - sh("#{django_admin} collectstatic --settings=envs.#{args.env} --pythonpath=. --noinput --link") -end - desc "Start a local server with the specified environment (defaults to dev). Other useful environments are devplus (for dev testing with a real local database)" -task :runserver, [:env] => [:collectstatic] do |t, args| +task :runserver, [:env] => [] do |t, args| args.with_defaults(:env => 'dev') django_admin = ENV['DJANGO_ADMIN_PATH'] || select_executable('django-admin.py', 'django-admin') - sh("#{django_admin} runserver --settings=envs.#{args.env} --pythonpath=. --nostatic") + sh("#{django_admin} runserver --settings=envs.#{args.env} --pythonpath=.") end task :package do diff --git a/static/coffee/README.md b/static/coffee/README.md index c6063e3549..69c2610548 100644 --- a/static/coffee/README.md +++ b/static/coffee/README.md @@ -34,15 +34,10 @@ Conveniently, you can install Node via `apt-get`, then use npm: Compiling --------- -We're using Guard to watch your folder and automatic compile those CoffeeScript -files. First, install guard by using Bundler: - - $ gem install bundler - $ bundle install - -Then you can run this command: - - $ bundle exec guard +The dev server will automatically compile coffeescript files that have changed. +Simply start the server using: + + $ rake runserver Testing ------- diff --git a/static/sass/README.md b/static/sass/README.md index 24a1f17bce..dccb3a80c3 100644 --- a/static/sass/README.md +++ b/static/sass/README.md @@ -19,9 +19,7 @@ This should ensure that you have all the dependencies required for compiling. Compiling --------- -We're using Guard to watch your folder and automatic compile those SASS files. -If you already install all the dependencies using Bundler, you can just do: - - $ bundle exec guard - -This will execute `django-admin collectstatic`, which will compile the sass files +The dev server will automatically compile sass files that have changed. Simply start +the server using: + + $ rake runserver diff --git a/templates/main.html b/templates/main.html index 249e2793f1..472ed58100 100644 --- a/templates/main.html +++ b/templates/main.html @@ -10,7 +10,7 @@ - + <%static:js group='application'/>