-
-
Notifications
You must be signed in to change notification settings - Fork 372
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4751a12
commit 57593e7
Showing
3 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
from __future__ import unicode_literals | ||
|
||
from pipeline.conf import settings | ||
from pipeline.compilers import SubProcessCompiler | ||
|
||
|
||
class ES6Compiler(SubProcessCompiler): | ||
output_extension = 'js' | ||
|
||
def match_file(self, path): | ||
return path.endswith('.es6') | ||
|
||
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 %s %s -o %s" % ( | ||
settings.PIPELINE_6TO5_BINARY, | ||
settings.PIPELINE_6TO5_ARGUMENTS, | ||
infile, | ||
outfile | ||
) | ||
return self.execute_command(command) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters