Skip to content

youngBrain1893/resolve-deps

Repository files navigation

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published