1.0.0 • Published 7 years ago

specla-autoloader v1.0.0

Weekly downloads
5
License
MIT
Repository
github
Last release
7 years ago

Specla Autoloader

npm version Build Status Dependency Status devDependencies Status Standard - JavaScript Style Guide

Autoload modules and json files with ease. This packages constructs an object that reflects your folder structure and auto require the files within the specified path.

Install

npm install --save specla-autoloader

Usage

const path = require('path')
const Autoloader = require('specla-autoloader')

const { modules } = new Autoloader(path.resolve('./modules'))

Options

const { modules } = new Autoloader(__dirname, {
  include: ['js', 'json'], // specifies which file types to include
  ignore: [
    'node_modules', // ignore folders
    'some-file.js' // ignore specific file
  ]
})
1.0.0

7 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago