npm

Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript. Learn more »

This package has been deprecated

Author message:

Moved to the package @specla/autoloader

specla-autoloader

1.0.0 • Public • Published

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
  ]
})

install

npm i specla-autoloader

Downloadsweekly downloads

14

version

1.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability