Ejemplo n.º 1
0
function init (opts) {
    var options,
        yuiRoot,
        module,
        mod,
        component,
        testpaths;

    options = this.options = opts.parsed;
    yuiRoot = this.yuiRoot = path.join(git.findRoot(), '..');
    module = this.module = util.getPackage(true);
    mod = util.findModule(true);
    component = (options.component || (mod && mod.name));
    testpaths = glob.sync(path.join(yuiRoot, '/src/' + (component ? component : '*') + '/tests/performance/*.js'));

    executeTests(testpaths);
}
Ejemplo n.º 2
0
Archivo: cli.js Proyecto: derek/depcalc
var path = require('path');
var parsedArgs = nopt({
    'json' : Boolean,
    'yuipath': path,
    'help': Boolean,
    'component': Boolean
}, null, process.argv, 2);

var componentSource = (parsedArgs.component || false);
var yogiPath = process.env.YOGI_PATH;

// If this was executed via Yogi, introduce some Yogi-specific variables
if (yogiPath) {
    var yogiGit = require(path.join(yogiPath, 'lib/git'));
    var yogiUtil = require(path.join(yogiPath, 'lib/util'));
    var yogiYUIRoot = path.join(yogiGit.findRoot(), '..');
    var yogiComponent = yogiUtil.findModule(true).name;
    componentSource = true;
}

if (parsedArgs.help) {
    console.log('This is Help.  Will be populated with more details soon.');
    process.exit();
}

// IIFE to kick off the main() portion of the app
(function () {

    var Calculator = require('../lib/index');
    var YDCUtils = require('../lib/utilities');
    var depTree;