-
-
Notifications
You must be signed in to change notification settings - Fork 371
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add terser (JS compressor for ES5 and ES6) (#696)
* Add terser JS compressor * Update authors
- Loading branch information
1 parent
bc0d0fb
commit e7acf03
Showing
8 changed files
with
54 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,6 +54,7 @@ or just made Pipeline more awesome. | |
* Evan Myller <[email protected]> | ||
* Fabian Büchler <[email protected]> | ||
* Feanil Patel <[email protected]> | ||
* Felix Last <[email protected]> | ||
* Florent Messa <[email protected]> | ||
* Frankie Dintino <[email protected]> | ||
* Hannes Ljungberg <[email protected]> | ||
|
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
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,12 @@ | ||
from __future__ import unicode_literals | ||
|
||
from pipeline.conf import settings | ||
from pipeline.compressors import SubProcessCompressor | ||
|
||
|
||
class TerserCompressor(SubProcessCompressor): | ||
def compress_js(self, js): | ||
command = (settings.TERSER_BINARY, settings.TERSER_ARGUMENTS) | ||
if self.verbose: | ||
command += ' --verbose' | ||
return self.execute_command(command, js) |
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 @@ | ||
(function(){window.concat=function(){console.log(arguments)},window.cat=function(){console.log("hello world")}}).call(this); |
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