1.0.2 • Published 3 years ago

@nlib/resolve-imports v1.0.2

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
3 years ago

@nlib/resolve-imports

Test codecov

A command line tool to disambiguates import statements.

Assume there's a.js and b.js:

// a.js
import {b} from './b';
console.info(b);

// b.js
export const b = 1;

This tool converts the import statement in the a.js:

import {b} from './b';
// ↓
import {b} from './b.js';

Usage

npx @nlib/resolve-imports --directory path/to/dir

  --include, -d [string]         Specify patterns to include
  --exclude [string]             Specify patterns to exclude
  --cjs                          Resolve the commonjs require() statements
  --verbose                      Output more information for debugging
  --help, -h                     Show help
  --version, -v                  Output the version number
1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago