config-export

0.0.3 • Public • Published

config-export NPM version Build Status

Yet another NPM package for exporting all files inside the directory

Install

$ npm install --save config-export

Getting Started

Create index.js file inside your directory, which you want to require. e.g.

├── app
│   ├── controllers
│   │   └── index.js
│   ├── dao
│   │   └── index.js
│   ├── express-config.js
│   ├── index.js
│   ├── middleware
│   │   ├── index.js
│   │   ├── role.js
│   ├── routes.js
│   ├── util
│   │   ├── db.js
│   │   ├── index.js
│   └── views
│       └── help

inside every index.js put following code module.exports = require('configexport')(__dirname); It finds all the files in the folder and adds them to the exports namespace.

If you need to excluded any file names it with _ e.g. you don't want to export private_config.js, rename this with _ _private_config.js

Run Test

npm test

Contribute or Report Issue

For bugs and feature requests, please create an issue.

License

MIT © Yashprit

Package Sidebar

Install

npm i config-export

Weekly Downloads

1

Version

0.0.3

License

MIT

Last publish

Collaborators

  • yashprit