midway-bin
Midway Command Tools
Last updated 20 days ago by czy88840616 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install midway-bin 
SYNC missed versions from official npm registry.

midway-bin

Package Quality PRs Welcome

this is a sub package for midway.

midway developer tool, extends [egg-bin].


Install

$ npm i midway-bin --save-dev

Usage

Add midway-bin to package.json scripts like [egg-bin], but just replace command by `midway-bin:

{
  "scripts": {
    "dev": "midway-bin dev",
    "debug": "midway-bin debug",
    "test-local": "midway-bin test",
    "test": "npm run lint -- --fix && npm run midway-local",
    "cov": "midway-bin cov",
    "lint": "eslint .",
    "pkgfiles": "midway-bin pkgfiles",
    "autod": "midway-bin autod",
    "ci": "npm run lint && npm run autod -- --check && npm run pkgfiles -- --check && npm run cov"
  }
}

Command

midway-bin add new command

  • build
  • clean
  • doc

build

build typescript source file to dist directory like tsc and copy js/css/html file to same place.

$ midway-bin build

options

  • --clean -c clean dist directory before build
  • --entrypoint <entrypoint-file> bundle the output with the specified file as entrypoint

copy static file

we can copy static file when ts file compiling.

// in package.json
  "midway-bin-build": {
    "include": [
      "app/public",
      "app/view"
    ]
  }

it will be copy src/app/public to ${outDir}/app/public.

The outDir field is configured in the tsconfig.json File, see compiler-options.

clean

clean a dist directory by build

$ midway-bin clean

doc

generate application document by typedoc

$ midway-bin doc

options

like typedoc, see link

  • --options [typedoc.js] Specify a js option file that should be loaded.
  • --out -o [outPath] Specifies the location the documentation should be written to.
  • --mode -m default value is file, Specifies the output mode the project is used to be compiled with.
  • --exclude Exclude files by the given pattern when a path is provided as source.
  • --theme default value is default Specify the path to the theme that should be used.
  • --excludeExternals default value is true Prevent externally resolved TypeScript files from being documented.
  • --ignoreCompilerErrors default value is true Generates documentation, even if the project does not TypeScript compile.
  • --hideGenerator default value is true Do not print the TypeDoc link at the end of the page.

Tips: If the options parameter is supplied, the other default parameters are invalid

License

MIT

Current Tags

  • 1.20.1                                ...           beta (20 days ago)
  • 0.2.0-alpha.1663751b                                ...           canary (2 years ago)
  • 1.20.1                                ...           latest (20 days ago)
  • 2.0.15                                ...           next (3 months ago)

79 Versions

  • 1.20.1                                ...           20 days ago
  • 2.0.15                                ...           3 months ago
  • 1.18.6                                ...           3 months ago
  • 1.18.5                                ...           3 months ago
  • 2.0.10                                ...           3 months ago
  • 2.0.9                                ...           3 months ago
  • 2.0.8                                ...           3 months ago
  • 2.0.7                                ...           3 months ago
  • 2.0.5                                ...           3 months ago
  • 2.0.4                                ...           4 months ago
  • 2.0.2                                ...           4 months ago
  • 2.0.0                                ...           4 months ago
  • 2.0.0-beta.16                                ...           4 months ago
  • 2.0.0-beta.15                                ...           4 months ago
  • 2.0.0-beta.14                                ...           4 months ago
  • 2.0.0-beta.13                                ...           4 months ago
  • 2.0.0-beta.12                                ...           4 months ago
  • 2.0.0-beta.11                                ...           4 months ago
  • 2.0.0-beta.10                                ...           5 months ago
  • 2.0.0-beta.9                                ...           5 months ago
  • 2.0.0-beta.8                                ...           5 months ago
  • 2.0.0-beta.7                                ...           5 months ago
  • 2.0.0-beta.6                                ...           5 months ago
  • 2.0.0-beta.5                                ...           5 months ago
  • 1.17.1                                ...           5 months ago
  • 1.17.0                                ...           5 months ago
  • 2.0.0-beta.4                                ...           5 months ago
  • 1.16.4                                ...           5 months ago
  • 1.16.3                                ...           6 months ago
  • 1.16.2                                ...           6 months ago
  • 1.16.1                                ...           7 months ago
  • 1.15.1                                ...           7 months ago
  • 1.15.0                                ...           7 months ago
  • 1.14.4                                ...           8 months ago
  • 1.14.3                                ...           8 months ago
  • 1.14.1                                ...           8 months ago
  • 1.14.0                                ...           8 months ago
  • 1.12.1                                ...           9 months ago
  • 1.12.0                                ...           9 months ago
  • 1.11.4                                ...           10 months ago
  • 1.11.3                                ...           10 months ago
  • 1.11.2                                ...           10 months ago
  • 1.10.8                                ...           a year ago
  • 1.10.7                                ...           a year ago
  • 1.10.5                                ...           a year ago
  • 1.10.2                                ...           a year ago
  • 1.9.0                                ...           a year ago
  • 1.5.6                                ...           a year ago
  • 1.5.0                                ...           a year ago
  • 1.4.7                                ...           a year ago
  • 1.4.3                                ...           a year ago
  • 1.4.1                                ...           a year ago
  • 1.3.0                                ...           a year ago
  • 1.2.0                                ...           a year ago
  • 1.1.0                                ...           a year ago
  • 1.0.2                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
  • 0.7.0                                ...           2 years ago
  • 0.6.5                                ...           2 years ago
  • 0.6.4                                ...           2 years ago
  • 0.6.3                                ...           2 years ago
  • 0.6.2                                ...           2 years ago
  • 0.6.0                                ...           2 years ago
  • 0.5.0                                ...           2 years ago
  • 0.3.8                                ...           2 years ago
  • 0.3.2                                ...           2 years ago
  • 0.3.1                                ...           2 years ago
  • 0.3.0                                ...           2 years ago
  • 0.2.4                                ...           2 years ago
  • 0.2.1                                ...           2 years ago
  • 0.1.6                                ...           2 years ago
  • 0.2.0-alpha.1663751b                                ...           2 years ago
  • 0.1.5                                ...           2 years ago
  • 0.1.4                                ...           2 years ago
  • 0.1.3                                ...           2 years ago
  • 0.1.2                                ...           2 years ago
  • 0.1.1                                ...           2 years ago
  • 0.1.0                                ...           2 years ago
Downloads
Today 10
This Week 10
This Month 121
Last Day 18
Last Week 204
Last Month 724
Dependencies (9)
Dev Dependencies (5)

Copyright 2014 - 2016 © taobao.org |