eject-dependencies

๐Ÿช‚ CLI to eject your npm dependencies to your source code

MIT License

Downloads
59
Stars
1
Committers
2

๐Ÿช‚ Eject dependencies

If you have dependencies in your node_modules folder, this package copies them to your source directory and changes all import references. It's like create-react-app's eject function but for all or some dependencies.

๐Ÿ’ก Usage

Install the package globally from npm:

npm install --save-global eject-dependencies

Use the CLI:

eject-dependencies

# With configuration (see options below)
eject-dependencies --source-dir './node_modules'

Or, use without installation using npx:

npx eject-dependencies

Or, use programmatically with the API:

import { eject } from "eject-dependencies";

// Default
eject();

// With configuration
eject({ sourceDir: "./node_modules" });

Configuration

Option Description Example value
sourceDir string with dependencies dir "./node_modules"
destDir string with dir to copy in "./ejected"
codeFiles string[] with glob files ["src/**/*.{js,jsx"]
updateTestFiles boolean to also update specfiles true
dependenciesFilter ๐Ÿ“ฆ Function to filter dependencies (Set) dependencies => dependencies

๐Ÿ“ฆ โ†’ This option is only supported by the API, not the CLI

๐Ÿ‘ฉโ€๐Ÿ’ป Development

Build TypeScript:

npm run build

Run unit tests and view coverage:

npm run test-without-reporting

๐Ÿ“„ License

MIT ยฉ Anand Chowdhary

Package Rankings
Top 11.53% on Npmjs.org
Badges
Extracted from project README
Node CI Travis CI Coverage Dependencies License Vulnerabilities Based on Node.ts npm type definitions npm package npm downloads Contributors semantic-release