lib/cli.js
function exec() {

  // NOTE: pardon this cli target to Couchpenter methods mapping,
  // needed to preserve backward compatibility w/ v0.1.x
  const FUNCTIONS = {
    setup: 'setUp',
    'setup-db': 'setUpDatabases',
    'setup-doc': 'setUpDocuments',
    'setup-doc-overwrite': 'setUpDocumentsOverwrite',
    teardown: 'tearDown',
    'teardown-db': 'tearDownDatabases',
    'teardown-doc': 'tearDownDocuments',
    reset: 'reset',
    'reset-db': 'resetDatabases',
    'reset-doc': 'resetDocuments',
    clean: 'clean',
    'clean-db': 'cleanDatabases',
    'warm-view': 'warmViews',
    'live-deploy-view': 'liveDeployView'
  };

  var actions = {
    commands: {
      init: { action: _init }
    }
  };

  _.keys(FUNCTIONS).forEach(function (task) {
    actions.commands[task] = { action: _task(FUNCTIONS[task]) };
  });

  cli.command(__dirname, actions);
}
function exec() {

  // NOTE: pardon this cli target to Couchpenter methods mapping,
  // needed to preserve backward compatibility w/ v0.1.x
  const FUNCTIONS = {
    setup: 'setUp',
    'setup-db': 'setUpDatabases',
    'setup-doc': 'setUpDocuments',
    'setup-doc-overwrite': 'setUpDocumentsOverwrite',
    teardown: 'tearDown',
    'teardown-db': 'tearDownDatabases',
    'teardown-doc': 'tearDownDocuments',
    reset: 'reset',
    'reset-db': 'resetDatabases',
    'reset-doc': 'resetDocuments',
    clean: 'clean',
    'clean-db': 'cleanDatabases',
    'warm-view': 'warmViews',
    'live-deploy-view': 'liveDeployView'
  };

  var actions = {
    commands: {
      init: { action: _init }
    }
  };

  _.keys(FUNCTIONS).forEach(function (task) {
    actions.commands[task] = { action: _task(FUNCTIONS[task]) };
  });

  cli.command(__dirname, actions);
}
function exec ( ) { // NOTE: pardon this cli target to Couchpenter methods mapping, // needed to preserve backward compatibility w/ v0.1.x const FUNCTIONS = { setup : 'setUp' , 'setup-db' : 'setUpDatabases' , 'setup-doc' : 'setUpDocuments' , 'setup-doc-overwrite' : 'setUpDocumentsOverwrite' , teardown : 'tearDown' , 'teardown-db' : 'tearDownDatabases' , 'teardown-doc' : 'tearDownDocuments' , reset : 'reset' , 'reset-db' : 'resetDatabases' , 'reset-doc' : 'resetDocuments' , clean : 'clean' , 'clean-db' : 'cleanDatabases' , 'warm-view' : 'warmViews' , 'live-deploy-view' : 'liveDeployView' } ; var actions = { commands : { init : { action : _init } } } ; _ . keys ( FUNCTIONS ) . forEach ( function ( task ) { actions . commands [ task ] = { action : _task ( FUNCTIONS [ task ] ) } ; } ) ; cli . command ( __dirname , actions ) ; }
Execute Couchpenter CLI.
Execute Couchpenter CLI .