@wynd/wynd-script v1.6.1
Wynd Script
List of various useful Javascript related scripts compiled in one repository.
Usage
yarn add -D @wynd/wynd-script
# or
yarn --global add -D @wynd/wynd-script # deprecatedThen use the command as follow in you project root:
./node_modules/.bin/wscor through your package.json scripts with: wsc <command> [options]
Options list
-por--project: default:./package.json- specify the package json file to use
Command list
wsc diffTslint [./tslint.json]: expose a diff between you tslint.json file and alors tslint config rules that your config extends. It helps for deduping and cleaning tslint config files.wsc pub [--no-build] [--npm] [--public]: publish your package on "@latest" npm tag relatively to your version. Make sure to be logged once with npm and yarn to your registry. If--no-buildis specified, noyarn buildcommand will be called. By default, yarn client will be used to publish, you can set--npmto use npm instead. :warning: In npm mode, when publishing a scoped package, npm will use.npmrcregistry option before cli flag orpackage.jsonpublishConfigobject. In case of scopped package, you can also provide the--publicflag if you want to publish it with a public access.wsc pub:dev [--no-build]: like the command before but on "@next" npm tag. The version used is computed to be like<your version patch bumped>-dev.x(e.g. if your on version1.0.0, the next version will be1.0.1-dev.0thendev.1and so on).wsc pub:rc [--no-build]: like the command before but on "@rc" npm tag. The version used is computed to be like<your version patch bumped>-rc.x(e.g. if your on version1.0.0, the next version will be1.0.1-rc.0thenrc.1and so on).wsc syncPeer: it will modify your package json file to synchronize your peerDependencies with your devDependencies. It can be set to thepostinstallandpostupdatenpm hooks.wsc pack: it will generate a "tgz" file for your module. For dev purposes, you should handle the "build" step by your. (e.g. if you need to build in debug mode)wsc coverage: reveal the coverage average (line, statements, functions, branches) :warning: your coverageReporters must be setup withjson-summary.
:warning: Only for gitlab-ci usage.
you have to declare in gitlab's var : CI_API_URL( gitlab api url ) and GITLAB_API_READ_ONLY_TOKEN( gitlab private access token ).
wsc compareCoverage [--ref] [--threshold]: compare your current average from the last merge request average merged on--refbranch.--refdefault value isdevelop.--thresholdis the percent delta authorized between your ref branch and your current coverage.--thresholddefault value is 0. :warning: your coverageReporters must be setup withjson-summary.