pagarme / bundler

Node.js private package manager

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nbundler

NodeJS private package manager

Usage

See test directory for a complete example.

Initialization

You must require nbundler/setup prior to including any dependency. This need to be done only once.

Bundlefile.js

bundle.name        = 'pagarme-api';
bundle.requirePath = 'lib';

bundle.dependency('pagarme-core', 'deps/pagarme-core');

Require Path

Bundle automatically augments the require path with packages own directories. So, if you have the following structure:

/
  Bundlefile.js
  lib
    server.js
  deps
    Bundlefile.js
    pagarme-core
      lib
        transaction.js

You can do the following:

var Server = require('pagarme/server');
var Transaction = require('pagarme/transaction');

As the module do not manage files, you can use whatever you want to manage them(e.g.: Git).

About

Node.js private package manager

License:MIT License


Languages

Language:JavaScript 100.0%