Commit d2ec58c0 by Calen Pennington

Don't pipeline in dev environment, which means that there is no need to run…

Don't pipeline in dev environment, which means that there is no need to run collectstatic either. Hooray\!
parent 6b15303d
source :rubygems source :rubygems
gem 'guard', '~> 1.0.3' gem 'rake', '0.8.3'
gem 'sass', '3.1.15' gem 'sass', '3.1.15'
gem 'bourbon', '~> 1.3.6' gem 'bourbon', '~> 1.3.6'
gem 'libnotify', '~> 0.7.2'
gem 'ruby_gntp', '~> 0.3.4'
gem 'guard-rake', '0.0.5'
...@@ -3,26 +3,13 @@ GEM ...@@ -3,26 +3,13 @@ GEM
specs: specs:
bourbon (1.3.6) bourbon (1.3.6)
sass (>= 3.1) sass (>= 3.1)
ffi (1.0.11) rake (0.8.3)
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)
sass (3.1.15) sass (3.1.15)
thor (0.15.2)
PLATFORMS PLATFORMS
ruby ruby
DEPENDENCIES DEPENDENCIES
bourbon (~> 1.3.6) bourbon (~> 1.3.6)
guard (~> 1.0.3) rake (= 0.8.3)
guard-rake (= 0.0.5)
libnotify (~> 0.7.2)
ruby_gntp (~> 0.3.4)
sass (= 3.1.15) sass (= 3.1.15)
guard :rake, :task => :collectstatic, :run_on_all => true, :run_on_start => true do
watch(%r{^static/.+(.scss|.coffee)$})
end
...@@ -11,7 +11,6 @@ from envs.common import * ...@@ -11,7 +11,6 @@ from envs.common import *
from envs.logsettings import get_logger_config from envs.logsettings import get_logger_config
DEBUG = True DEBUG = True
PIPELINE = True
TEMPLATE_DEBUG = True TEMPLATE_DEBUG = True
LOGGING = get_logger_config(ENV_ROOT / "log", LOGGING = get_logger_config(ENV_ROOT / "log",
......
...@@ -59,18 +59,11 @@ task :test => REPORT_DIR do ...@@ -59,18 +59,11 @@ task :test => REPORT_DIR do
sh("#{django_admin} test --settings=envs.test --pythonpath=. $(ls djangoapps)") sh("#{django_admin} test --settings=envs.test --pythonpath=. $(ls djangoapps)")
end 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)" 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') args.with_defaults(:env => 'dev')
django_admin = ENV['DJANGO_ADMIN_PATH'] || select_executable('django-admin.py', 'django-admin') 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 end
task :package do task :package do
......
...@@ -34,15 +34,10 @@ Conveniently, you can install Node via `apt-get`, then use npm: ...@@ -34,15 +34,10 @@ Conveniently, you can install Node via `apt-get`, then use npm:
Compiling Compiling
--------- ---------
We're using Guard to watch your folder and automatic compile those CoffeeScript The dev server will automatically compile coffeescript files that have changed.
files. First, install guard by using Bundler: Simply start the server using:
$ gem install bundler $ rake runserver
$ bundle install
Then you can run this command:
$ bundle exec guard
Testing Testing
------- -------
......
...@@ -19,9 +19,7 @@ This should ensure that you have all the dependencies required for compiling. ...@@ -19,9 +19,7 @@ This should ensure that you have all the dependencies required for compiling.
Compiling Compiling
--------- ---------
We're using Guard to watch your folder and automatic compile those SASS files. The dev server will automatically compile sass files that have changed. Simply start
If you already install all the dependencies using Bundler, you can just do: the server using:
$ bundle exec guard $ rake runserver
This will execute `django-admin collectstatic`, which will compile the sass files
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<script type="text/javascript" src="${static.url('js/jquery-1.6.2.min.js')}"></script> <script type="text/javascript" src="${static.url('js/jquery-1.6.2.min.js')}"></script>
<script type="text/javascript" src="${static.url('js/jquery-ui-1.8.16.custom.min.js')}"></script> <script type="text/javascript" src="${static.url('js/jquery-ui-1.8.16.custom.min.js')}"></script>
<script type="text/javascript" src="${static.url('js/swfobject/swfobject.js')}"></script> <script type="text/javascript" src="${static.url('js/swfobject/swfobject.js')}"></script>
<script type="text/javascript" src="${static.url('js/application.js')}"></script> <%static:js group='application'/>
<!--[if lt IE 9]> <!--[if lt IE 9]>
<script src="${static.url('js/html5shiv.js')}"></script> <script src="${static.url('js/html5shiv.js')}"></script>
......
<script \
% if async:
async \
% endif
if defer:
defer \
type="text/javascript" charset="utf-8">
{{ source|safe }}
</script>
<script \
% if async:
async \
% endif
% if defer:
defer \
% endif
type="${type}" src="${ url }" charset="utf-8"></script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment