shrimpit v2.0.0
Shrimpit :fried_shrimp:

Shrimpit is a small CLI analysis tool for checking unused JavaScript, JSX & Vue templates ES6 exports in your project.
Install
npm
npm i -g shrimpityarn
yarn global add shrimpitUsage
shrimpit path/to/your/files /another/pathGlobbing patterns are also supported:
shrimpit test/**/*.jsAdding the --tree flag will output the complete files tree with all the imports and the exports per file:
shrimpit --tree path/to/your/filesPlease note that default unnamed exports are rendered as default (unnamed):
shrimpit test --tree
Shrimpit!
> Files tree
{ test:
{ core:
{ a:
{ 'a.js':
{ imports:
[ { location: 'test/core/b/b.js',
name: 'test',
unnamedDefault: true },
{ location: 'test/core/b/b.js',
name: 'a',
unnamedDefault: false },
{ location: 'test/core/c/c.js',
name: 'User',
unnamedDefault: true } ],
exports:
[ { location: 'test/core/a/a.js',
name: 'a',
unnamedDefault: false },
{ location: 'test/core/a/a.js',
name: 'c',
unnamedDefault: false },
{ location: 'test/core/a/a.js', name: 'd', unnamedDefault: true } ] } },
b:
{ 'b.js':
{ imports:
[ { location: 'test/core/c/c.js',
name: 'Cat',
unnamedDefault: false },
{ location: 'test/core/d/d.js',
name: 'unamedFunction',
unnamedDefault: true },
{ location: 'test/core/a/a.js',
name: 'a',
unnamedDefault: false },
{ location: 'test/core/a/a.js',
name: 'c',
unnamedDefault: false },
{ location: 'test/core/a/a.js', name: 'd', unnamedDefault: true } ],
exports:
[ { location: 'test/core/b/b.js',
name: 'a',
unnamedDefault: false },
{ location: 'test/core/b/b.js',
name: 'b',
unnamedDefault: false },
{ location: 'test/core/b/b.js',
name: 'default (unnamed)',
unnamedDefault: true } ] } },
c:
{ 'c.js':
{ imports:
[ { location: 'test/core/a/a.js',
name: 'a',
unnamedDefault: false },
{ location: 'test/core/a/a.js',
name: 'c',
unnamedDefault: false },
{ location: 'test/core/a/a.js',
name: 'd',
unnamedDefault: false },
{ location: 'test/core/b/b.js',
name: 'b',
unnamedDefault: false } ],
exports:
[ { location: 'test/core/c/c.js',
name: 'Cat',
unnamedDefault: false },
{ location: 'test/core/c/c.js',
name: 'User',
unnamedDefault: true } ] } },
d:
{ 'd.js':
{ imports: [],
exports:
[ { location: 'test/core/d/d.js',
name: 'test/core/d',
unnamedDefault: true } ] } } } } }
> Unused exports
All Clear Ahead, Captain.Flow & Vue
Shrimpit supports Flow annotations and Vue templates out of the box!
TypeScript (experimental)
Since Babel 7, the TypeScript AST can directly be parsed. You can use the --typescript flag to enable it:
shrimpit --tree --typescript path/to/your/filesPlease note that the Flow and TypeScript parsers are mutually exclusive.
Linting
The code quality is checked by the JavaScript Standard Style.
License
Released under the MIT license by Davy Duperron.
6 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago