// Generated by CoffeeScript 1.3.3
var bootstrap, concatRead, dirname, fs, jade, join, mandala, nib, path, resolve, stylus, utils;

bootstrap = require('die-bootstrap');

fs = require('fs');

jade = require('jade');

mandala = require('mandala');

nib = require('nib');

stylus = require('stylus');

path = require('path');

dirname = path.dirname;

join = path.join;

utils = require('./utils');

concatRead = utils.concatRead;

resolve = utils.resolve;

module.exports = {
  css: function(_arg, base) {
    var bundler, filename, main;
    main = _arg.main;
    if (base == null) {
      base = '';
    }
    main = join(base, main);
    filename = resolve(['.css', '.styl'], main);
    return bundler = {
      bundle: function() {
        var body, result;
        body = fs.readFileSync(filename, 'utf8');
        result = '';
        stylus(body).set('filename', filename).include(dirname(filename)).use(bootstrap()).use(nib()).render(function(err, css) {
          if (err) {
            throw err;
          }
          return result = css;
        });
        return result;
      }
    };
  },
  js: function(_arg, base, symlink) {
    var lib, libs, main;
    main = _arg.main, libs = _arg.libs;
    if (base == null) {
      base = '';
    }
    if (symlink == null) {
      symlink = true;
    }
    return mandala.createBundle({
      entry: join(base, main),
      prepend: (function() {
        var _i, _len, _results;
        _results = [];
        for (_i = 0, _len = libs.length; _i < _len; _i++) {
          lib = libs[_i];
          _results.push(join(base, lib));
        }
        return _results;
      })()
    });
  }
};

// Generated by CoffeeScript 1.3.3
var bootstrap, concatRead, dirname, fs, jade, join, mandala, nib, path, resolve, stylus, utils;

bootstrap = require('die-bootstrap');

fs = require('fs');

jade = require('jade');

requisite = require('requisite');

nib = require('nib');

stylus = require('stylus');

path = require('path');

dirname = path.dirname;

join = path.join;

utils = require('./utils');

concatRead = utils.concatRead;

resolve = utils.resolve;

module.exports = {
  css: function(_arg, base) {
    var bundler, filename, main;
    main = _arg.main;
    if (base == null) {
      base = '';
    }
    main = join(base, main);
    filename = resolve(['.css', '.styl'], main);
    return bundler = {
      bundle: function() {
        var body, result;
        body = fs.readFileSync(filename, 'utf8');
        result = '';
        stylus(body).set('filename', filename).include(dirname(filename)).use(bootstrap()).use(nib()).render(function(err, css) {
          if (err) {
            throw err;
          }
          return result = css;
        });
        return result;
      }
    };
  },
  js: function(_arg, base, symlink) {
    var lib, libs, main;
    main = _arg.main, libs = _arg.libs;
    if (base == null) {
      base = '';
    }
    if (symlink == null) {
      symlink = true;
    }
    return requisite.createBundle({
      entry: join(base, main),
      prepend: (function() {
        var _i, _len, _results;
        _results = [];
        for (_i = 0, _len = libs.length; _i < _len; _i++) {
          lib = libs[_i];
          _results.push(join(base, lib));
        }
        return _results;
      })()
    });
  }
};

Update master