Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
django-pipeline
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
OpenEdx
django-pipeline
Commits
0d245056
Commit
0d245056
authored
Apr 03, 2013
by
Timothée Peignier
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #205 from demux/master
Live Script Support
parents
893f3b65
b33fbac5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
0 deletions
+51
-0
docs/compilers.rst
+27
-0
pipeline/compilers/livescript.py
+21
-0
pipeline/conf/settings.py
+3
-0
No files found.
docs/compilers.rst
View file @
0d245056
...
...
@@ -32,6 +32,33 @@ To use it add this to your ``PIPELINE_COMPILERS`` ::
Defaults to ``''``.
Live Script compiler
======================
The LiveScript compiler uses `LiveScript <https://github.com/gkz/LiveScript>`_
to compile your javascripts.
To use it add this to your ``PIPELINE_COMPILERS`` ::
PIPELINE_COMPILERS = (
'pipeline.compilers.livescript.LiveScriptCompiler',
)
``PIPELINE_LIVE_SCRIPT_BINARY``
---------------------------------
Command line to execute for LiveScript program.
You will most likely change this to the location of lsc on your system.
Defaults to ``'/usr/bin/env lsc'``.
``PIPELINE_LIVE_SCRIPT_ARGUMENTS``
------------------------------------
Additional arguments to use when lsc is called.
Defaults to ``''``.
LESS compiler
=============
...
...
pipeline/compilers/livescript.py
0 → 100644
View file @
0d245056
from
__future__
import
unicode_literals
from
pipeline.conf
import
settings
from
pipeline.compilers
import
SubProcessCompiler
class
LiveScriptCompiler
(
SubProcessCompiler
):
output_extension
=
'js'
def
match_file
(
self
,
path
):
return
path
.
endswith
(
'.ls'
)
def
compile_file
(
self
,
infile
,
outfile
,
outdated
=
False
,
force
=
False
):
if
not
outdated
and
not
force
:
return
# File doesn't need to be recompiled
command
=
"
%
s -cp
%
s
%
s >
%
s"
%
(
settings
.
PIPELINE_LIVE_SCRIPT_BINARY
,
settings
.
PIPELINE_LIVE_SCRIPT_ARGUMENTS
,
infile
,
outfile
)
return
self
.
execute_command
(
command
)
pipeline/conf/settings.py
View file @
0d245056
...
...
@@ -48,6 +48,9 @@ PIPELINE_CSSMIN_ARGUMENTS = getattr(settings, 'PIPELINE_CSSMIN_ARGUMENTS', '')
PIPELINE_COFFEE_SCRIPT_BINARY
=
getattr
(
settings
,
'PIPELINE_COFFEE_SCRIPT_BINARY'
,
'/usr/bin/env coffee'
)
PIPELINE_COFFEE_SCRIPT_ARGUMENTS
=
getattr
(
settings
,
'PIPELINE_COFFEE_SCRIPT_ARGUMENTS'
,
''
)
PIPELINE_LIVE_SCRIPT_BINARY
=
getattr
(
settings
,
'PIPELINE_LIVE_SCRIPT_BINARY'
,
'/usr/bin/env lsc'
)
PIPELINE_LIVE_SCRIPT_ARGUMENTS
=
getattr
(
settings
,
'PIPELINE_LIVE_SCRIPT_ARGUMENTS'
,
''
)
PIPELINE_SASS_BINARY
=
getattr
(
settings
,
'PIPELINE_SASS_BINARY'
,
'/usr/bin/env sass'
)
PIPELINE_SASS_ARGUMENTS
=
getattr
(
settings
,
'PIPELINE_SASS_ARGUMENTS'
,
''
)
...
...
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