fix(core): update
This commit is contained in:
parent
72297d2f58
commit
b11d03dd41
5
.gitignore
vendored
5
.gitignore
vendored
@ -8,9 +8,12 @@ pages/
|
|||||||
# installs
|
# installs
|
||||||
node_modules/
|
node_modules/
|
||||||
|
|
||||||
# caches and builds
|
# caches
|
||||||
.yarn/
|
.yarn/
|
||||||
.cache/
|
.cache/
|
||||||
|
.rpt2_cache
|
||||||
|
|
||||||
|
# builds
|
||||||
dist/
|
dist/
|
||||||
dist_web/
|
dist_web/
|
||||||
dist_serve/
|
dist_serve/
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# gitzone standard
|
# gitzone ci_default
|
||||||
image: hosttoday/ht-docker-node:npmci
|
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
paths:
|
paths:
|
||||||
@ -38,19 +38,7 @@ snyk:
|
|||||||
# test stage
|
# test stage
|
||||||
# ====================
|
# ====================
|
||||||
|
|
||||||
testLTS:
|
testStable:
|
||||||
stage: test
|
|
||||||
script:
|
|
||||||
- npmci npm prepare
|
|
||||||
- npmci node install lts
|
|
||||||
- npmci npm install
|
|
||||||
- npmci npm test
|
|
||||||
coverage: /\d+.?\d+?\%\s*coverage/
|
|
||||||
tags:
|
|
||||||
- docker
|
|
||||||
- notpriv
|
|
||||||
|
|
||||||
testSTABLE:
|
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- npmci npm prepare
|
- npmci npm prepare
|
||||||
@ -60,6 +48,18 @@ testSTABLE:
|
|||||||
coverage: /\d+.?\d+?\%\s*coverage/
|
coverage: /\d+.?\d+?\%\s*coverage/
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
|
- priv
|
||||||
|
|
||||||
|
testBuild:
|
||||||
|
stage: test
|
||||||
|
script:
|
||||||
|
- npmci npm prepare
|
||||||
|
- npmci node install stable
|
||||||
|
- npmci npm install
|
||||||
|
- npmci command npm run build
|
||||||
|
coverage: /\d+.?\d+?\%\s*coverage/
|
||||||
|
tags:
|
||||||
|
- docker
|
||||||
- notpriv
|
- notpriv
|
||||||
|
|
||||||
release:
|
release:
|
||||||
@ -78,19 +78,12 @@ release:
|
|||||||
# ====================
|
# ====================
|
||||||
codequality:
|
codequality:
|
||||||
stage: metadata
|
stage: metadata
|
||||||
image: docker:stable
|
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
services:
|
|
||||||
- docker:stable-dind
|
|
||||||
script:
|
script:
|
||||||
- export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/')
|
- npmci command npm install -g tslint typescript
|
||||||
- docker run
|
- npmci npm prepare
|
||||||
--env SOURCE_CODE="$PWD"
|
- npmci npm install
|
||||||
--volume "$PWD":/code
|
- npmci command "tslint -c tslint.json ./ts/**/*.ts"
|
||||||
--volume /var/run/docker.sock:/var/run/docker.sock
|
|
||||||
"registry.gitlab.com/gitlab-org/security-products/codequality:$SP_VERSION" /code
|
|
||||||
artifacts:
|
|
||||||
paths: [codeclimate.json]
|
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
- priv
|
- priv
|
||||||
@ -106,13 +99,15 @@ trigger:
|
|||||||
- notpriv
|
- notpriv
|
||||||
|
|
||||||
pages:
|
pages:
|
||||||
image: hosttoday/ht-docker-node:npmci
|
image: hosttoday/ht-docker-dbase:npmci
|
||||||
|
services:
|
||||||
|
- docker:stable-dind
|
||||||
stage: metadata
|
stage: metadata
|
||||||
script:
|
script:
|
||||||
- npmci command npm install -g typedoc typescript
|
- npmci command npm install -g @gitzone/tsdoc
|
||||||
- npmci npm prepare
|
- npmci npm prepare
|
||||||
- npmci npm install
|
- npmci npm install
|
||||||
- npmci command typedoc --module "commonjs" --target "ES2016" --out public/ ts/
|
- npmci command tsdoc
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
- notpriv
|
- notpriv
|
||||||
|
1020
package-lock.json
generated
1020
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
33
package.json
33
package.json
@ -16,22 +16,33 @@
|
|||||||
"format": "(gitzone format)"
|
"format": "(gitzone format)"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@gitzone/tsbuild": "^2.1.11",
|
"@gitzone/tsbuild": "^2.1.17",
|
||||||
"@gitzone/tstest": "^1.0.24",
|
"@gitzone/tstest": "^1.0.28",
|
||||||
"@pushrocks/tapbundle": "^3.0.9",
|
"@pushrocks/tapbundle": "^3.0.13",
|
||||||
"@types/node": "^12.0.2",
|
"@types/node": "^12.7.12",
|
||||||
"tslint": "^5.16.0",
|
"tslint": "^5.20.0",
|
||||||
"tslint-config-prettier": "^1.18.0"
|
"tslint-config-prettier": "^1.18.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@gitzone/tsrun": "^1.2.6",
|
"@gitzone/tsrun": "^1.2.8",
|
||||||
"@pushrocks/early": "^3.0.3",
|
"@pushrocks/early": "^3.0.3",
|
||||||
"@pushrocks/lik": "^3.0.5",
|
"@pushrocks/lik": "^3.0.11",
|
||||||
"@pushrocks/smartchok": "^1.0.18",
|
"@pushrocks/smartchok": "^1.0.23",
|
||||||
"@pushrocks/smartcli": "^3.0.7",
|
"@pushrocks/smartcli": "^3.0.7",
|
||||||
"@pushrocks/smartdelay": "^2.0.3",
|
"@pushrocks/smartdelay": "^2.0.3",
|
||||||
"@pushrocks/smartlog": "^2.0.19",
|
"@pushrocks/smartlog": "^2.0.19",
|
||||||
"@pushrocks/smartlog-destination-local": "^7.0.5",
|
"@pushrocks/smartlog-destination-local": "^8.0.2",
|
||||||
"@pushrocks/smartshell": "^2.0.22"
|
"@pushrocks/smartshell": "^2.0.25"
|
||||||
}
|
},
|
||||||
|
"files": [
|
||||||
|
"ts/**/*",
|
||||||
|
"ts_web/**/*",
|
||||||
|
"dist/**/*",
|
||||||
|
"dist_web/**/*",
|
||||||
|
"dist_ts_web/**/*",
|
||||||
|
"assets/**/*",
|
||||||
|
"cli.js",
|
||||||
|
"npmextra.json",
|
||||||
|
"readme.md"
|
||||||
|
]
|
||||||
}
|
}
|
@ -21,6 +21,6 @@ watch typescript projects during development
|
|||||||
For further information read the linked docs at the top of this readme.
|
For further information read the linked docs at the top of this readme.
|
||||||
|
|
||||||
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
||||||
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html)
|
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy)
|
||||||
|
|
||||||
[![repo-footer](https://gitzone.gitlab.io/assets/repo-footer.svg)](https://maintainedby.lossless.com)
|
[![repo-footer](https://lossless.gitlab.io/publicrelations/repofooter.svg)](https://maintainedby.lossless.com)
|
||||||
|
@ -12,7 +12,7 @@ tap.test('should start the tswatch instance', async () => {
|
|||||||
await testTsWatchInstance.start();
|
await testTsWatchInstance.start();
|
||||||
});
|
});
|
||||||
|
|
||||||
tap.test('should stop the instance', async (tools) => {
|
tap.test('should stop the instance', async tools => {
|
||||||
tools.delayFor(2000);
|
tools.delayFor(2000);
|
||||||
testTsWatchInstance.stop();
|
testTsWatchInstance.stop();
|
||||||
});
|
});
|
||||||
|
@ -1 +1,7 @@
|
|||||||
export type TWatchModes = 'test' | 'gitzone_npm' | 'gitzone_service' | 'gitzone_website' | 'echoSomething';
|
export type TWatchModes =
|
||||||
|
| 'test'
|
||||||
|
| 'gitzone_npm'
|
||||||
|
| 'gitzone_service'
|
||||||
|
| 'gitzone_element'
|
||||||
|
| 'gitzone_website'
|
||||||
|
| 'echoSomething';
|
||||||
|
@ -18,35 +18,49 @@ export class TsWatch {
|
|||||||
public async start() {
|
public async start() {
|
||||||
switch (this.watchmode) {
|
switch (this.watchmode) {
|
||||||
case 'test':
|
case 'test':
|
||||||
this.watcherMap.add(new Watcher({
|
this.watcherMap.add(
|
||||||
|
new Watcher({
|
||||||
filePathToWatch: paths.cwd,
|
filePathToWatch: paths.cwd,
|
||||||
commandToExecute: 'npm run test2',
|
commandToExecute: 'npm run test2',
|
||||||
timeout: null
|
timeout: null
|
||||||
}));
|
})
|
||||||
|
);
|
||||||
break;
|
break;
|
||||||
case 'gitzone_npm':
|
case 'gitzone_npm':
|
||||||
this.watcherMap.add(new Watcher({
|
this.watcherMap.add(
|
||||||
|
new Watcher({
|
||||||
filePathToWatch: paths.cwd,
|
filePathToWatch: paths.cwd,
|
||||||
commandToExecute: 'npm run test',
|
commandToExecute: 'npm run test',
|
||||||
timeout: null
|
timeout: null
|
||||||
}));
|
})
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
case 'gitzone_element':
|
||||||
|
this.watcherMap.add(
|
||||||
|
new Watcher({
|
||||||
|
filePathToWatch: plugins.path.join(paths.cwd, 'ts_web'),
|
||||||
|
commandToExecute: 'npm run build',
|
||||||
|
timeout: null
|
||||||
|
})
|
||||||
|
);
|
||||||
break;
|
break;
|
||||||
case 'gitzone_website':
|
case 'gitzone_website':
|
||||||
// server directory
|
|
||||||
this.watcherMap.add(
|
this.watcherMap.add(
|
||||||
new Watcher({
|
new Watcher({
|
||||||
filePathToWatch: plugins.path.join(paths.cwd, './ts/'),
|
filePathToWatch: plugins.path.join(paths.cwd, './ts/'),
|
||||||
commandToExecute: 'npm run start',
|
commandToExecute: 'npm run startTs',
|
||||||
timeout: null
|
timeout: null
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
// client directory
|
// client directory
|
||||||
this.watcherMap.add(new Watcher({
|
this.watcherMap.add(
|
||||||
|
new Watcher({
|
||||||
filePathToWatch: plugins.path.join(paths.cwd, './ts_web/'),
|
filePathToWatch: plugins.path.join(paths.cwd, './ts_web/'),
|
||||||
commandToExecute: 'npm run build',
|
commandToExecute: 'npm run build',
|
||||||
timeout: null
|
timeout: null
|
||||||
}));
|
})
|
||||||
|
);
|
||||||
break;
|
break;
|
||||||
case 'echoSomething':
|
case 'echoSomething':
|
||||||
const tsWatchInstanceEchoSomething = new Watcher({
|
const tsWatchInstanceEchoSomething = new Watcher({
|
||||||
|
@ -26,7 +26,7 @@ export class Watcher {
|
|||||||
* start the file
|
* start the file
|
||||||
*/
|
*/
|
||||||
public async start() {
|
public async start() {
|
||||||
this.setupCleanup();
|
await this.setupCleanup();
|
||||||
console.log(`Looking at ${this.options.filePathToWatch} for changes`);
|
console.log(`Looking at ${this.options.filePathToWatch} for changes`);
|
||||||
this.smartchokWatcher.add([this.options.filePathToWatch]); // __dirname refers to the directory of this very file
|
this.smartchokWatcher.add([this.options.filePathToWatch]); // __dirname refers to the directory of this very file
|
||||||
await this.smartchokWatcher.start();
|
await this.smartchokWatcher.start();
|
||||||
|
@ -20,4 +20,10 @@ tswatchCli.addCommand('website').subscribe(async argvArg => {
|
|||||||
await tsWatch.start();
|
await tsWatch.start();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
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.startParse();
|
tswatchCli.startParse();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user