fix(core): update

This commit is contained in:
Philipp Kunz 2020-07-04 10:45:56 +00:00
parent 7b777ea1a9
commit ed91da6e3f
8 changed files with 28 additions and 21 deletions

View File

@ -49,4 +49,4 @@
"npmextra.json",
"readme.md"
]
}
}

View File

@ -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

View File

@ -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();
});

View File

@ -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,
};
}
}

View File

@ -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;

View File

@ -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();

View File

@ -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());

View File

@ -21,7 +21,7 @@ export {
smartlogDestinationLocal,
smartserve,
smartshell,
taskbuffer
taskbuffer,
};
// third party scope