clean-typescript-build
Some commands in needs for nodemonorepo
Last updated 16 days ago by khai96_ .
MIT · Bugs · Original npm · Tarball · package.json
$ cnpm install clean-typescript-build 
SYNC missed versions from official npm registry.

clean-typescript-build

Simple TypeScript build cleaning tool

Feature

  • Delete TypeScript compilation products if correspding TS source file is detected.

Requirements

  • Node.js ≥ 8.9.0

APIs

clean

declare function clean (root: string, options?: Options): Promise<Clean.Result>

// See https://git.io/fACtE for definition of Clean.Result

Parameters:

  • root: Path to the directory that contains source files.
  • options.deep (optional): Decides whether or not to dive deeper, default ignores node_modules and .git.
  • options.isSource (optional): Decides whether or not a file is a source, default chooses files with extensions of .ts or .tsx.
  • options.listTargets (optional): List corresponding build products of given source file.

Returns:

  • A promise of clean.Result.
  • clean.Result::targets is a list of all targeted files.
  • clean.Result::reports is a list of reports regarding deletion of targeted files.
  • clean.Result::success is a list of files that are successfully deleted, ideally equal to clean.Result::targets.
  • clean.Result::failure is a list of files that are targeted but failed to delete, ideally equal to [].

Effects:

  • Delete TypeScript compilation products if correspding TS source file is detected.

listAllTargets

declare function listAllTargets (root: string, options?: Options): Promise<ReadonlyArray<string>>

Parameters:

Returns:

  • A list of targeted files.

CLIs

clean-typescript-build <directory> [options]

Clean TypeScript compilation products

Options:
  --version     Show version number                                    [boolean]
  --help        Show help                                              [boolean]
  --directory   Directory that contains source files                    [string]
  --dry, -u     List files without deletion           [boolean] [default: false]
  --format, -f  Format of output to be printed to stdout
                             [choices: "text", "json", "none"] [default: "text"]
  --jsonIndent  JSON indentation when --format=json        [number] [default: 2]

License

MIT © Hoàng Văn Khải

Current Tags

  • 0.1.4                                ...           latest (16 days ago)

13 Versions

  • 0.1.4                                ...           16 days ago
  • 0.1.3                                ...           16 days ago
  • 0.1.2                                ...           16 days ago
  • 0.1.1                                ...           a month ago
  • 0.1.0                                ...           8 months ago
  • 0.0.7                                ...           a year ago
  • 0.0.6                                ...           a year ago
  • 0.0.5                                ...           a year ago
  • 0.0.4                                ...           a year ago
  • 0.0.3                                ...           a year ago
  • 0.0.2                                ...           a year ago
  • 0.0.1                                ...           a year ago
  • 0.0.0                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 100
Last Day 0
Last Week 0
Last Month 63
Dependencies (9)
Dev Dependencies (2)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |