From ed91da6e3f60886ffab16c588e1f689c06e0bbd4 Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Sat, 4 Jul 2020 10:45:56 +0000 Subject: [PATCH] fix(core): update --- package.json | 2 +- readme.md | 21 ++++++++++++++------- test/test.ts | 2 +- ts/tswatch.classes.parcel.ts | 6 +++--- ts/tswatch.classes.watcher.ts | 2 +- ts/tswatch.cli.ts | 10 +++++----- ts/tswatch.logging.ts | 4 ++-- ts/tswatch.plugins.ts | 2 +- 8 files changed, 28 insertions(+), 21 deletions(-) diff --git a/package.json b/package.json index 2b3086f..409a683 100644 --- a/package.json +++ b/package.json @@ -49,4 +49,4 @@ "npmextra.json", "readme.md" ] -} +} \ No newline at end of file diff --git a/readme.md b/readme.md index 0bfad1e..2a43d7f 100644 --- a/readme.md +++ b/readme.md @@ -8,13 +8,20 @@ watch typescript projects during development * [docs (typedoc)](https://gitzone.gitlab.io/tswatch/) ## Status for master -[![pipeline status](https://gitlab.com/gitzone/tswatch/badges/master/pipeline.svg)](https://gitlab.com/gitzone/tswatch/commits/master) -[![coverage report](https://gitlab.com/gitzone/tswatch/badges/master/coverage.svg)](https://gitlab.com/gitzone/tswatch/commits/master) -[![npm downloads per month](https://img.shields.io/npm/dm/@gitzone/tswatch.svg)](https://www.npmjs.com/package/@gitzone/tswatch) -[![Known Vulnerabilities](https://snyk.io/test/npm/@gitzone/tswatch/badge.svg)](https://snyk.io/test/npm/@gitzone/tswatch) -[![TypeScript](https://img.shields.io/badge/TypeScript->=%203.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/) -[![node](https://img.shields.io/badge/node->=%2010.x.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/) -[![JavaScript Style Guide](https://img.shields.io/badge/code%20style-prettier-ff69b4.svg)](https://prettier.io/) + +Status Category | Status Badge +-- | -- +GitLab Pipelines | [![pipeline status](https://gitlab.com/gitzone/tswatch/badges/master/pipeline.svg)](https://lossless.cloud) +GitLab Pipline Test Coverage | [![coverage report](https://gitlab.com/gitzone/tswatch/badges/master/coverage.svg)](https://lossless.cloud) +npm | [![npm downloads per month](https://badgen.net/npm/dy/@gitzone/tswatch)](https://lossless.cloud) +Snyk | [![Known Vulnerabilities](https://badgen.net/snyk/gitzone/tswatch)](https://lossless.cloud) +TypeScript Support | [![TypeScript](https://badgen.net/badge/TypeScript/>=%203.x/blue?icon=typescript)](https://lossless.cloud) +node Support | [![node](https://img.shields.io/badge/node->=%2010.x.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/) +Code Style | [![Code Style](https://badgen.net/badge/style/prettier/purple)](https://lossless.cloud) +PackagePhobia (total standalone install weight) | [![PackagePhobia](https://badgen.net/packagephobia/install/@gitzone/tswatch)](https://lossless.cloud) +PackagePhobia (package size on registry) | [![PackagePhobia](https://badgen.net/packagephobia/publish/@gitzone/tswatch)](https://lossless.cloud) +BundlePhobia (total size when bundled) | [![BundlePhobia](https://badgen.net/bundlephobia/minzip/@gitzone/tswatch)](https://lossless.cloud) +Platform support | [![Supports Windows 10](https://badgen.net/badge/supports%20Windows%2010/yes/green?icon=windows)](https://lossless.cloud) [![Supports Mac OS X](https://badgen.net/badge/supports%20Mac%20OS%20X/yes/green?icon=apple)](https://lossless.cloud) ## Usage diff --git a/test/test.ts b/test/test.ts index cf4cfaa..0c27628 100644 --- a/test/test.ts +++ b/test/test.ts @@ -12,7 +12,7 @@ tap.test('should start the tswatch instance', async () => { await testTsWatchInstance.start(); }); -tap.test('should stop the instance', async tools => { +tap.test('should stop the instance', async (tools) => { tools.delayFor(2000); testTsWatchInstance.stop(); }); diff --git a/ts/tswatch.classes.parcel.ts b/ts/tswatch.classes.parcel.ts index 22bb0c5..49d5e09 100644 --- a/ts/tswatch.classes.parcel.ts +++ b/ts/tswatch.classes.parcel.ts @@ -21,10 +21,10 @@ export class Parcel { hmrPort: 3003, // The port the HMR socket runs on, defaults to a random free port (0 in node.js resolves to a random free port) sourceMaps: true, // Enable or disable sourcemaps, defaults to enabled (minified builds currently always create sourcemaps) hmrHostname: '', // A hostname for hot module reload, default to '' - detailedReport: false // Prints a detailed report of the bundles, assets, filesizes and times, defaults to false, reports are only printed if watch is disabled + detailedReport: false, // Prints a detailed report of the bundles, assets, filesizes and times, defaults to false, reports are only printed if watch is disabled }; public options: plugins.parcel.ParcelOptions; - public entryFiles: string | string [] = plugins.path.join(paths.cwd, './html/index.html'); + public entryFiles: string | string[] = plugins.path.join(paths.cwd, './html/index.html'); public async start() { const bundler = new plugins.parcel(this.entryFiles, this.options); @@ -39,7 +39,7 @@ export class Parcel { this.options = { ...this.defaultOptions, outDir: outputDirArg, - outFile: outputFileArg + outFile: outputFileArg, }; } } diff --git a/ts/tswatch.classes.watcher.ts b/ts/tswatch.classes.watcher.ts index 39420b7..09884d1 100644 --- a/ts/tswatch.classes.watcher.ts +++ b/ts/tswatch.classes.watcher.ts @@ -17,7 +17,7 @@ export class Watcher { * used to execute shell commands */ private smartshellInstance = new plugins.smartshell.Smartshell({ - executor: 'bash' + executor: 'bash', }); private currentExecution: plugins.smartshell.IExecResultStreaming; diff --git a/ts/tswatch.cli.ts b/ts/tswatch.cli.ts index 31cce21..a4767cb 100644 --- a/ts/tswatch.cli.ts +++ b/ts/tswatch.cli.ts @@ -8,31 +8,31 @@ const tswatchCli = new plugins.smartcli.Smartcli(); // standard behaviour will assume gitzone setup -tswatchCli.addCommand('element').subscribe(async argvArg => { +tswatchCli.addCommand('element').subscribe(async (argvArg) => { logger.log('info', `running watch task for a gitzone element project`); const tsWatch = new TsWatch('gitzone_element'); await tsWatch.start(); }); -tswatchCli.addCommand('npm').subscribe(async argvArg => { +tswatchCli.addCommand('npm').subscribe(async (argvArg) => { logger.log('info', `running watch task for a gitzone element project`); const tsWatch = new TsWatch('gitzone_npm'); await tsWatch.start(); }); -tswatchCli.addCommand('service').subscribe(async argvArg => { +tswatchCli.addCommand('service').subscribe(async (argvArg) => { logger.log('info', `running test task`); const tsWatch = new TsWatch('gitzone_service'); await tsWatch.start(); }); -tswatchCli.addCommand('test').subscribe(async argvArg => { +tswatchCli.addCommand('test').subscribe(async (argvArg) => { logger.log('info', `running test task`); const tsWatch = new TsWatch('test'); await tsWatch.start(); }); -tswatchCli.addCommand('website').subscribe(async argvArg => { +tswatchCli.addCommand('website').subscribe(async (argvArg) => { logger.log('info', `running watch task for a gitzone website project`); const tsWatch = new TsWatch('gitzone_website'); await tsWatch.start(); diff --git a/ts/tswatch.logging.ts b/ts/tswatch.logging.ts index f6cde21..7f7d158 100644 --- a/ts/tswatch.logging.ts +++ b/ts/tswatch.logging.ts @@ -7,9 +7,9 @@ export const logger = new plugins.smartlog.Smartlog({ containerName: 'Some Containername', environment: 'local', runtime: 'node', - zone: 'gitzone' + zone: 'gitzone', }, - minimumLogLevel: 'silly' + minimumLogLevel: 'silly', }); logger.addLogDestination(new plugins.smartlogDestinationLocal.DestinationLocal()); diff --git a/ts/tswatch.plugins.ts b/ts/tswatch.plugins.ts index 4ddf104..e3465b5 100644 --- a/ts/tswatch.plugins.ts +++ b/ts/tswatch.plugins.ts @@ -21,7 +21,7 @@ export { smartlogDestinationLocal, smartserve, smartshell, - taskbuffer + taskbuffer, }; // third party scope