Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
c13e6230
Commit
c13e6230
authored
Dec 31, 2015
by
David Ormsbee
Committed by
Andy Armstrong
Jan 29, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Speed up SASS compilation with libsass
parent
dce3d9ca
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
21 deletions
+24
-21
common/static/sass/bourbon/addons/_directional-values.scss
+1
-1
pavelib/assets.py
+22
-20
requirements/edx/paver.txt
+1
-0
No files found.
common/static/sass/bourbon/addons/_directional-values.scss
View file @
c13e6230
...
...
@@ -49,7 +49,7 @@
@return
false
;
}
@mixin
directional-property
(
$pre
,
$suf
,
$vals
)
{
@mixin
directional-property
(
$pre
,
$suf
,
$vals
...
)
{
// Property Names
$top
:
$pre
+
"-top"
+
if
(
$suf
,
"-
#{
$suf
}
"
,
""
);
$bottom
:
$pre
+
"-bottom"
+
if
(
$suf
,
"-
#{
$suf
}
"
,
""
);
...
...
pavelib/assets.py
View file @
c13e6230
...
...
@@ -3,7 +3,7 @@ Asset compilation and collection.
"""
from
__future__
import
print_function
from
datetime
import
datetime
import
argparse
import
glob
import
traceback
...
...
@@ -12,6 +12,7 @@ from paver import tasks
from
paver.easy
import
sh
,
path
,
task
,
cmdopts
,
needs
,
consume_args
,
call_task
,
no_help
from
watchdog.observers
import
Observer
from
watchdog.events
import
PatternMatchingEventHandler
import
sass
from
.utils.envs
import
Env
from
.utils.cmd
import
cmd
,
django_cmd
...
...
@@ -192,30 +193,31 @@ def compile_sass(options):
Compile Sass to CSS.
"""
debug
=
options
.
get
(
'debug'
)
parts
=
[
"sass"
]
parts
.
append
(
"--update"
)
parts
.
append
(
"--cache-location {cache}"
.
format
(
cache
=
SASS_CACHE_PATH
))
parts
.
append
(
"--default-encoding utf-8"
)
if
debug
:
parts
.
append
(
"--sourcemap"
)
source_comments
=
True
output_style
=
'nested'
else
:
parts
.
append
(
"--style compressed --quiet"
)
if
options
.
get
(
'force'
):
parts
.
append
(
"--force"
)
parts
.
append
(
"--load-path ."
)
for
load_path
in
SASS_LOAD_PATHS
+
SASS_DIRS
:
parts
.
append
(
"--load-path {path}"
.
format
(
path
=
load_path
))
source_comments
=
False
output_style
=
'compressed'
timing_info
=
[]
for
sass_dir
in
SASS_DIRS
:
start
=
datetime
.
now
()
css_dir
=
sass_dir
.
parent
/
"css"
if
css_dir
:
parts
.
append
(
"{sass}:{css}"
.
format
(
sass
=
sass_dir
,
css
=
css_dir
))
else
:
parts
.
append
(
sass_dir
)
sh
(
cmd
(
*
parts
))
print
(
"
\t\t
Finished compiling sass."
)
sass
.
compile
(
dirname
=
(
sass_dir
,
css_dir
),
include_paths
=
SASS_LOAD_PATHS
+
SASS_DIRS
,
source_comments
=
source_comments
,
output_style
=
output_style
,
)
duration
=
datetime
.
now
()
-
start
timing_info
.
append
((
sass_dir
,
css_dir
,
duration
))
print
(
"
\t\t
Finished compiling Sass:"
)
for
sass_dir
,
css_dir
,
duration
in
timing_info
:
print
(
">> {} -> {} in {}s"
.
format
(
sass_dir
,
css_dir
,
duration
))
def
compile_templated_sass
(
systems
,
settings
):
...
...
requirements/edx/paver.txt
View file @
c13e6230
...
...
@@ -5,3 +5,4 @@ lazy==1.1
path.py==7.2
watchdog==0.7.1
python-memcached
libsass==0.10.0
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment