Don't pipeline in dev environment, which means that there is no need to run collectstatic either. Hooray\!
This commit is contained in:
5
Gemfile
5
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'
|
||||
|
||||
17
Gemfile.lock
17
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)
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
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 *
|
||||
from envs.logsettings import get_logger_config
|
||||
|
||||
DEBUG = True
|
||||
PIPELINE = True
|
||||
TEMPLATE_DEBUG = True
|
||||
|
||||
LOGGING = get_logger_config(ENV_ROOT / "log",
|
||||
|
||||
11
rakefile
11
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
|
||||
|
||||
@@ -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
|
||||
-------
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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-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/application.js')}"></script>
|
||||
<%static:js group='application'/>
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="${static.url('js/html5shiv.js')}"></script>
|
||||
|
||||
9
templates/pipeline/inline_js.html
Normal file
9
templates/pipeline/inline_js.html
Normal file
@@ -0,0 +1,9 @@
|
||||
<script \
|
||||
% if async:
|
||||
async \
|
||||
% endif
|
||||
if defer:
|
||||
defer \
|
||||
type="text/javascript" charset="utf-8">
|
||||
{{ source|safe }}
|
||||
</script>
|
||||
8
templates/pipeline/js.html
Normal file
8
templates/pipeline/js.html
Normal file
@@ -0,0 +1,8 @@
|
||||
<script \
|
||||
% if async:
|
||||
async \
|
||||
% endif
|
||||
% if defer:
|
||||
defer \
|
||||
% endif
|
||||
type="${type}" src="${ url }" charset="utf-8"></script>
|
||||
Reference in New Issue
Block a user