-
Notifications
You must be signed in to change notification settings - Fork 9
Home
Alberto Martínez edited this page Sep 6, 2016
·
10 revisions
(Documentation is in TODO)
A plain JavaScript object, all the properties are optionals...
Option | Default | Description |
---|---|---|
sourceMaps | true |
pass false to ommit sourceMaps if you dont need these. |
comments | "some" | Comments matching the filter are preserved. |
values | {} |
The properties are jscc variables, where each key is a name. |
This option can be a boolean, string, regex, or an array of string and/or regexes:
Value | Do... |
---|---|
true or "all"
|
Preserve all comments. |
false or "none"
|
Remove all comments. |
Regex | Use this for filtering the comments to remove (non matching ones). |
String | The name of one of the predefined filters. |
Array | of regexes or predefined filters names. |
Name | Regex | Site/Description |
---|---|---|
license | /^@license\b/ |
Preserve comments with "@license" inside. |
some | `/(?:@license | @preserve |
jsdoc | /^\/\*\*[^@]*@[A-Za-z]/ |
JSDoc |
jslint | `/^/[*/](?:jslint | global |
jshint | `/^/[/]\s(?:jshint | globals |
eslint | `/^/[/]\s(?:eslint(?:\s | -[ed]) |
jscs | /^\/[*\/]\s*jscs:[ed]/ |
jscs |
istanbul | /^\/[*\/]\s*istanbul\s/ |
istanbul |
srcmaps | /\/\/#\ssource(Mapping)URL=/ |
Source Maps in HTML 5 Rocks! |
html | /<!--(?!>)[\S\s]*?-->/g |
HTML comments (multiline) |