Socket
Book a DemoInstallSign in
Socket

config-export

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

config-export

Exporting modules of nodejs through index files

0.0.3
latest
Source
npmnpm
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

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

Keywords

require

FAQs

Package last updated on 30 Mar 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.