0.2.0 • Published 9 years ago

requirist v0.2.0

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

YSON

Give you all the modules you need in a single expression.

Features

  • Globstar patterns support
  • Single expression to get all what you need

Usage

Given the following files structure:

/tasks
  to-png.js,
  attach-meta.js,
  crop-resize.js
/utils
  object.js,
  collection.js
/config
  theme.js,
  controls.js
package.json  

And expression:

var $ = require('requirist')(
    // Natives
    'fs',
    'path',
    
    // Node Modules
    'lodash as _'
    
    // Local Modules
    './tasks/*',
    './utils/* as utils',
    './config/theme as themeManager',
    './package.json as config'
);

Bundle object $ will look like:

  {
    fs: {},    // Native node fs module
    path: {},  // Native node path module,
    
    _: {},     // Lodash itself,
    
    toPng: {}, // Exports of 'to-png.js'
    ...
    
    utilsobject: {}, // Exports of './utils/object.js'm
    ...
    
    themeManager: {}, // Exports of './config/theme.js',
    config: {}        // Package information
  }
0.2.0

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago