1.0.0 • Published 4 years ago

dir-imported v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
4 years ago

Directory importer

dir-importer is a package that let's you import all js and json files in the directory it is called from.

It puts all the imports inside an object, this is usefull to create an index.js file that automatically import everything inside a certain directory and exports it again like this :

// index.js
module.exports = require('dir-importer')(__filename);

Installation

npm install dir-importer

Usage

const imports = require('dir-importer')(__filename);

Contributing

Pull requests are welcome.

License

MIT

1.0.0

4 years ago