From 7ce62452866420c972fe67cfb93d0dfec31d038e Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Wed, 8 May 2019 11:16:24 +0200 Subject: [PATCH] fix(core): update --- .gitignore | 15 ++++++++++++++- .gitlab-ci.yml | 22 ---------------------- npmextra.json | 12 +++++++++++- package.json | 2 +- readme.md | 26 ++++++++++++++++++++++++++ test/test.ts | 4 +--- ts/index.ts | 2 +- ts/tswatch.classes.tswatch.ts | 6 ++++-- ts/tswatch.logging.ts | 2 +- ts/tswatch.plugins.ts | 2 +- tslint.json | 9 ++++++++- 11 files changed, 68 insertions(+), 34 deletions(-) create mode 100644 readme.md diff --git a/.gitignore b/.gitignore index 344b0dc..e713ab4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,19 @@ .nogit/ -node_modules/ + +# artifacts coverage/ public/ pages/ + +# installs +node_modules/ + +# caches and builds .yarn/ +.cache/ +dist/ +dist_web/ +dist_serve/ +dist_ts_web/ + +# custom \ No newline at end of file diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 67fd2eb..8321aed 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -37,18 +37,6 @@ snyk: # ==================== # test stage # ==================== -testLEGACY: - stage: test - script: - - npmci npm prepare - - npmci node install legacy - - npmci npm install - - npmci npm test - coverage: /\d+.?\d+?\%\s*coverage/ - tags: - - docker - - notpriv - allow_failure: true testLTS: stage: test @@ -135,13 +123,3 @@ pages: paths: - public allow_failure: true - -windowsCompatibility: - image: stefanscherer/node-windows:10-build-tools - stage: metadata - script: - - npm install & npm test - coverage: /\d+.?\d+?\%\s*coverage/ - tags: - - windows - allow_failure: true diff --git a/npmextra.json b/npmextra.json index 193d59b..10c090b 100644 --- a/npmextra.json +++ b/npmextra.json @@ -2,5 +2,15 @@ "npmci": { "npmGlobalTools": [], "npmAccessLevel": "public" + }, + "gitzone": { + "module": { + "githost": "gitlab.com", + "gitscope": "gitzone", + "gitrepo": "tswatch", + "shortDescription": "watch typescript projects during development", + "npmPackagename": "@gitzone/tswatch", + "license": "MIT" + } } -} +} \ No newline at end of file diff --git a/package.json b/package.json index 3410c4b..5f500a6 100644 --- a/package.json +++ b/package.json @@ -31,4 +31,4 @@ "@pushrocks/smartlog-destination-local": "^7.0.5", "@pushrocks/smartshell": "^2.0.13" } -} +} \ No newline at end of file diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..c4bfd57 --- /dev/null +++ b/readme.md @@ -0,0 +1,26 @@ +# @gitzone/tswatch +watch typescript projects during development + +## Availabililty and Links +* [npmjs.org (npm package)](https://www.npmjs.com/package/@gitzone/tswatch) +* [gitlab.com (source)](https://gitlab.com/gitzone/tswatch) +* [github.com (source mirror)](https://github.com/gitzone/tswatch) +* [docs (typedoc)](https://gitzone.gitlab.io/tswatch/) + +## Status for master +[![build status](https://gitlab.com/gitzone/tswatch/badges/master/build.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/) + +## Usage + +For further information read the linked docs at the top of this readme. + +> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh) +| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html) + +[![repo-footer](https://gitzone.gitlab.io/assets/repo-footer.svg)](https://maintainedby.lossless.com) diff --git a/test/test.ts b/test/test.ts index 77284fa..fd421cb 100644 --- a/test/test.ts +++ b/test/test.ts @@ -16,8 +16,6 @@ tap.test('should start the tswatch instance', async () => { console.log('test executed'); }); -tap.test('should run abitrary commands', async () => { - -}); +tap.test('should run abitrary commands', async () => {}); tap.start(); diff --git a/ts/index.ts b/ts/index.ts index 30b288c..86d7933 100644 --- a/ts/index.ts +++ b/ts/index.ts @@ -2,4 +2,4 @@ import * as early from '@pushrocks/early'; early.start('tswatch'); export * from './tswatch.classes.tswatch'; import './tswatch.cli'; -early.stop(); \ No newline at end of file +early.stop(); diff --git a/ts/tswatch.classes.tswatch.ts b/ts/tswatch.classes.tswatch.ts index eefcec8..b1fc25d 100644 --- a/ts/tswatch.classes.tswatch.ts +++ b/ts/tswatch.classes.tswatch.ts @@ -31,7 +31,7 @@ export class TsWatch { const changeObservable = await this.watcher.getObservableFor('change'); changeObservable.subscribe(() => { this.updateCurrentExecution(); - }) + }); this.updateCurrentExecution(); } @@ -39,7 +39,9 @@ export class TsWatch { if (this.currentExecution) { process.kill(-this.currentExecution.childProcess.pid); } - this.currentExecution = await this.smartshellInstance.execStreaming(this.options.commandToExecute); + this.currentExecution = await this.smartshellInstance.execStreaming( + this.options.commandToExecute + ); this.currentExecution = null; } diff --git a/ts/tswatch.logging.ts b/ts/tswatch.logging.ts index bb97069..f6cde21 100644 --- a/ts/tswatch.logging.ts +++ b/ts/tswatch.logging.ts @@ -5,7 +5,7 @@ export const logger = new plugins.smartlog.Smartlog({ company: 'Some Company', companyunit: 'Some CompanyUnit', containerName: 'Some Containername', - environment: "local", + environment: 'local', runtime: 'node', zone: 'gitzone' }, diff --git a/ts/tswatch.plugins.ts b/ts/tswatch.plugins.ts index 59eb095..68ae49e 100644 --- a/ts/tswatch.plugins.ts +++ b/ts/tswatch.plugins.ts @@ -9,4 +9,4 @@ import * as smartlog from '@pushrocks/smartlog'; import * as smartlogDestinationLocal from '@pushrocks/smartlog-destination-local'; import * as smartshell from '@pushrocks/smartshell'; -export { smartchok, smartcli, smartdelay, smartlog, smartlogDestinationLocal, smartshell, }; +export { smartchok, smartcli, smartdelay, smartlog, smartlogDestinationLocal, smartshell }; diff --git a/tslint.json b/tslint.json index 4424397..d4ea2e9 100644 --- a/tslint.json +++ b/tslint.json @@ -4,7 +4,14 @@ "semicolon": [true, "always"], "no-console": false, "ordered-imports": false, - "object-literal-sort-keys": false + "object-literal-sort-keys": false, + "member-ordering": { + "options":{ + "order": [ + "static-method" + ] + } + } }, "defaultSeverity": "warning" }