reqfile

1.1.8 • Public • Published

reqfile

Simple module that allows to require files by name.

To require file by name or it's part, only one file with such name is allowed to exist in project.

Usage

By default only .js and .json files are allowed to be included and node_modules and .git folders are excluded.

var reqfile = require('reqfile'),
  userController = require(reqfile('user.server.controller'));

To customize inclusion/exclusion list, include .reqfileconfig file in project's root.

module.exports = {
  include: ['.html'],
  exclude: ['/public', '/typings']
};

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.1.80latest

Version History

VersionDownloads (Last 7 Days)Published
1.1.80
1.1.70
1.1.60
1.1.50
1.1.40
1.0.20
1.0.10
1.0.00

Package Sidebar

Install

npm i reqfile

Weekly Downloads

0

Version

1.1.8

License

ISC

Last publish

Collaborators

  • redscorpio