mirror of https://github.com/lukechilds/rollup.git
Rich-Harris
8 years ago
7 changed files with 65 additions and 0 deletions
@ -0,0 +1,3 @@ |
|||
module.exports = { |
|||
description: 'removes unused declarations and statements inside function (#1187)' |
|||
}; |
@ -0,0 +1,9 @@ |
|||
define(function () { 'use strict'; |
|||
|
|||
function foo() { |
|||
console.log("foo"); |
|||
} |
|||
|
|||
foo(); |
|||
|
|||
}); |
@ -0,0 +1,7 @@ |
|||
'use strict'; |
|||
|
|||
function foo() { |
|||
console.log("foo"); |
|||
} |
|||
|
|||
foo(); |
@ -0,0 +1,5 @@ |
|||
function foo() { |
|||
console.log("foo"); |
|||
} |
|||
|
|||
foo(); |
@ -0,0 +1,10 @@ |
|||
(function () { |
|||
'use strict'; |
|||
|
|||
function foo() { |
|||
console.log("foo"); |
|||
} |
|||
|
|||
foo(); |
|||
|
|||
}()); |
@ -0,0 +1,13 @@ |
|||
(function (global, factory) { |
|||
typeof exports === 'object' && typeof module !== 'undefined' ? factory() : |
|||
typeof define === 'function' && define.amd ? define(factory) : |
|||
(factory()); |
|||
}(this, (function () { 'use strict'; |
|||
|
|||
function foo() { |
|||
console.log("foo"); |
|||
} |
|||
|
|||
foo(); |
|||
|
|||
}))); |
@ -0,0 +1,18 @@ |
|||
(function UnusedFunctionExpression() {}); |
|||
(class UnusedClassExpression {}); |
|||
var UnusedClassExpression = class UnusedClassExpression {}; |
|||
var unusedVar; |
|||
let unusedLet; |
|||
const unusedConst = 1; |
|||
|
|||
function foo() { |
|||
(function UnusedFunctionExpression() {}); |
|||
(class UnusedClassExpression {}); |
|||
var UnusedClassExpression = class UnusedClassExpression {}; |
|||
var unusedVar; |
|||
let unusedLet; |
|||
const unusedConst = 1; |
|||
console.log("foo"); |
|||
} |
|||
|
|||
foo(); |
Loading…
Reference in new issue