Merge pull request #24513 from alan-agius4/patch-6

fix: `shebang` should be optional in `ParseOptions`
This commit is contained in:
Nathan Shively-Sanders
2018-03-30 08:14:08 -07:00
committed by GitHub
2 changed files with 7 additions and 2 deletions
+2 -1
View File
@@ -10,7 +10,7 @@ export interface ParseOptions {
bare_returns?: boolean;
html5_comments?: boolean;
/** Support `#!command` as the first line */
shebang: boolean;
shebang?: boolean;
}
export interface CompressOptions {
@@ -198,6 +198,7 @@ export interface MinifyOptions {
export interface MinifyOutput {
error?: Error;
warnings?: string[];
code: string;
map: string;
}
+5 -1
View File
@@ -20,7 +20,7 @@ minify(code, {
}
});
minify(code, {
const output = minify(code, {
warnings: 'verbose',
mangle: {
properties: {
@@ -34,3 +34,7 @@ minify(code, {
arguments: true
}
});
if (output.warnings) {
output.warnings.filter(x => x === 'Dropping unused variable');
}