1.0.11 • Published 7 months ago

ghost-dep-check v1.0.11

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

Install

pnpm i ghost-dep-check

Usage

import { ghostDepCheck } from 'ghost-dep-check';

const config = {
  excludeAlias: ['js', '@', '@components'],
};

function check() {
  const directory = path.resolve('./');
  const pattern = `${directory}/src/**/*.+(vue|js|ts)`;
  glob(pattern, {
    ignore: [
      path.join(directory, '**/node_modules/**'),
    ],
  })
    .then(async files => {
      const pkgs = await ghostDepCheck(files, [path.join(directory, 'package.json')], config);

      if (pkgs.size) {
        console.log('The following deps maybe ghost deps: ', pkgs);
      } else {
        console.log('This project has no ghost dependencies.');
      }
    })
    .catch(err => {
      console.error('Error matching files:', err);
    });
}

check();

Preview

# in process
⠼  Checking files: 174/200 | 87% [============================================>      ]
# success
✔  Checking files: 200/200 | 100% [==================================================]
This project has no ghost dependencies.
1.0.9

7 months ago

1.0.8

8 months ago

1.0.7

8 months ago

1.0.6

8 months ago

1.0.11

7 months ago

1.0.10

7 months ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago