1.0.6 • Published 1 year ago

fs-ops v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

fs-ops

Operators for node files.

zip

API

  • zip(destPath, outPath?): Promise<string>

make zip file, return the zip file path.

paramtyperequireddesc
destPathstring/string[]truefile/files/directory, supported glob, like: **/*.js
outPathstringfalseoutput file path or directory path, default to the destPath

Commands

fs-ops.js zip <destPath...>

make zip file

Options:
  -o, --outPath  zip file output path                                   [string]
  -v, --version  Show version number                                   [boolean]
  -h, --help     Show help                                             [boolean]

ext

API

  • extTo(glob, ext?, options?): void

change files extensions.

paramtyperequireddesc
globstring/string[]truepattern of matching files, use glob, like: **/*.js
extjs/jsx/ts/tsx/stringfalsetarget extension, default: ts
options.injectNoCheckbooleanfalseinject // @ts-nocheck to file header
options.injectESLintDisablebooleanfalseinject / eslint-disable / to file header
options.encodingbooleanfalsefile encoding type, like: utf-8

Commands

fs-ops.js ext-to <glob...>

change files extensions

Options:
  -f, --ext                  replace to extension, default: ts          [string]
  -n, --injectNoCheck        inject // @ts-nocheck to file header      [boolean]
  -d, --injectESLintDisable  inject /* eslint-disable */ to file header[boolean]
  -e, --encoding             file encoding type, like: utf-8            [string]
  -v, --version              Show version number                       [boolean]
  -h, --help                 Show help                                 [boolean]
1.0.6

1 year ago

1.0.5

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

2 years ago

1.0.0

2 years ago