This package has been deprecated

Author message:

renamed to depcheck-parser-babel

depcheck-babel-parser

1.1.0 • Public • Published

depcheck-babel-parser

NPM version Linux macOS Windows compatible Build status Coverage status Dependency status Renovate enabled

Open in Gitpod

A depcheck babel parser that uses an existing babel config instead of a fixed set of plugins.

Install

# NPM 
$ npm install depcheck-babel-parser
 
# Yarn 
$ yarn add depcheck-babel-parser

Usage

Start by creating a .babelrc.json file with your babel config, if needed.

Custom parsers are currently only supported when using depcheck via the Node.js API. Simply add the parser to your parser config and run depcheck:

import depcheck from 'depcheck'
import babelParser from 'depcheck-babel-parser'
 
const options = {
  parsers: {
    '*.js': babelParser,
  },
}
 
depcheck('/path/to/your/project', options, (unused) => {
  console.log(unused.dependencies); // an array containing the unused dependencies
  console.log(unused.devDependencies); // an array containing the unused devDependencies
  console.log(unused.missing); // a lookup containing the dependencies missing in `package.json` and where they are used
  console.log(unused.using); // a lookup indicating each dependency is used by which files
  console.log(unused.invalidFiles); // files that cannot access or parse
  console.log(unused.invalidDirs); // directories that cannot access
})

License

Unless stated otherwise all works are:

Copyright © Sebastian Landwehr info@dword-design.de

and licensed under:

MIT License

Readme

Keywords

none

Package Sidebar

Install

npm i depcheck-babel-parser

Weekly Downloads

1

Version

1.1.0

License

MIT

Unpacked Size

6.16 kB

Total Files

5

Last publish

Collaborators

  • dword-design