Eject npm dependencies to your source code
Last updated 2 months ago by anandchowdhary .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install eject-dependencies 
SYNC missed versions from official npm registry.

???? 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.

Node CI Travis CI Coverage Dependencies License Vulnerabilities Based on Node.ts npm type definitions npm package npm downloads Contributors semantic-release


???? Usage

Install the package globally from npm:

npm install --save-global eject-dependencies

Use the CLI:


# 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

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


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

Current Tags

  • 1.2.0                                ...           latest (2 months ago)

3 Versions

  • 1.2.0                                ...           2 months ago
  • 1.1.0                                ...           2 months ago
  • 1.0.0 [deprecated]           ...           2 months ago
Maintainers (1)
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 4
Dependencies (2)
Dev Dependencies (11)

Copyright 2014 - 2016 © taobao.org |