Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
340d39f3
Commit
340d39f3
authored
11 years ago
by
Calen Pennington
Browse files
Options
Downloads
Plain Diff
Merge pull request #2069 from edx/fix/cale/coffee-watch-on-osx
Batched coffee --watch compilation in smaller batches
parents
39456f98
280f0973
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
rakefiles/assets.rake
+26
-3
26 additions, 3 deletions
rakefiles/assets.rake
with
26 additions
and
3 deletions
rakefiles/assets.rake
+
26
−
3
View file @
340d39f3
...
...
@@ -13,7 +13,22 @@ def xmodule_cmd(watch=false, debug=false)
end
def
coffee_cmd
(
watch
=
false
,
debug
=
false
)
"node_modules/.bin/coffee
#{
watch
?
'--watch'
:
''
}
--compile */static"
if
watch
# On OSx, coffee fails with EMFILE when
# trying to watch all of our coffee files at the same
# time.
#
# Ref: https://github.com/joyent/node/issues/2479
#
# Instead, watch 50 files per process in parallel
cmds
=
[]
Dir
[
'*/static/**/*.coffee'
].
each_slice
(
50
)
do
|
coffee_files
|
cmds
<<
"node_modules/.bin/coffee --watch --compile
#{
coffee_files
.
join
(
' '
)
}
"
end
cmds
else
'node_modules/.bin/coffee --compile */static'
end
end
def
sass_cmd
(
watch
=
false
,
debug
=
false
)
...
...
@@ -43,7 +58,11 @@ namespace :assets do
desc
"Compile all
#{
asset_type
}
assets"
task
asset_type
=>
prereq_task
do
cmd
=
send
(
asset_type
.
to_s
+
"_cmd"
,
watch
=
false
,
debug
=
false
)
sh
(
cmd
)
if
cmd
.
kind_of?
(
Array
)
cmd
.
each
{
|
c
|
sh
(
c
)}
else
sh
(
cmd
)
end
end
multitask
:all
=>
asset_type
...
...
@@ -65,7 +84,11 @@ namespace :assets do
task
:_watch
=>
prereq_task
do
cmd
=
send
(
asset_type
.
to_s
+
"_cmd"
,
watch
=
true
,
debug
=
true
)
background_process
(
cmd
)
if
cmd
.
kind_of?
(
Array
)
cmd
.
each
{
|
c
|
background_process
(
c
)}
else
background_process
(
cmd
)
end
end
end
end
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment