How to use the egg-bin.Command function in egg-bin

To help you get started, we’ve selected a few egg-bin examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github midwayjs / midway / packages / midway-bin / lib / cmd / clean.js View on Github external
'use strict';

const Command = require('egg-bin').Command;
const rimraf = require('mz-modules/rimraf');
const cp = require('child_process');
const path = require('path');
const fs = require('fs');

class CleanCommand extends Command {
  constructor(rawArgv) {
    super(rawArgv);
    this.usage = 'Usage: midway-bin clean';
  }

  get description() {
    return 'clean application temporary files';
  }

  async run(context) {
github midwayjs / midway / packages / midway-bin / lib / cmd / build.js View on Github external
'use strict';

const Command = require('egg-bin').Command;
const path = require('path');
const fs = require('fs');
const rimraf = require('mz-modules/rimraf');
const fse = require('fs-extra');
const globby = require('globby');
const ncc = require('@zeit/ncc');

const shebangRegEx = /^#![^\n\r]*[\r\n]/;

class BuildCommand extends Command {
  constructor(rawArgv) {
    super(rawArgv);
    this.usage = 'Usage: midway-bin build [options]';

    this.options = {
      clean: {
github midwayjs / midway / packages / midway-bin / lib / cmd / doc.js View on Github external
'use strict';

const Command = require('egg-bin').Command;

class DocCommand extends Command {
  constructor(rawArgv) {
    super(rawArgv);
    this.usage = 'Usage: midway-bin doc [options]';

    this.options = {
      out: {
        description: 'Specifies the location the documentation should be written to.',
        type: 'string',
        default: 'doc',
        alias: 'o',
      },
      mode: {
        description: 'Specifies the output mode the project is used to be compiled with.',
        type: 'string',

egg-bin

egg developer tool

MIT
Latest version published 11 days ago

Package Health Score

78 / 100
Full package analysis

Popular egg-bin functions

Similar packages