Skip to content

Latest commit

 

History

History
33 lines (26 loc) · 879 Bytes

README.md

File metadata and controls

33 lines (26 loc) · 879 Bytes

Motivation

A easy way for cli/utils to resolve dependencies.

Use glob for entry generate, precinct for ast dependencies resolve, enhanced-resolve for dependencies absolute path resolve.

Usage

yarn add resolve-deps
const path = require('path');
const { resolveDependenciesArray } = require('resolve-deps');
const deps = await resolveDependenciesArray({
  entry: [path.join(__dirname, 'entry.ts')],
  resolve: {
    recursion: true,
    extensions: ['.ts'],
    ignore: (dep) => !(dep.startsWith('.') || dep.startsWith('/')),
  }
});

Demos

License

MIT