Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
2b1f371d8a | |||
8196ca50a7 | |||
ad96661dda | |||
2fc6c3d358 | |||
0c74fb3343 | |||
d821a2efa6 | |||
66f2321d99 | |||
816f4f57fb |
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
|||||||
|
.nogit/
|
||||||
node_modules/
|
node_modules/
|
||||||
test/
|
test/
|
||||||
pages/
|
pages/
|
||||||
|
@ -15,7 +15,9 @@ stages:
|
|||||||
testLEGACY:
|
testLEGACY:
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- npmci test legacy
|
- npmci node install legacy
|
||||||
|
- npmci npm install
|
||||||
|
- npmci npm test
|
||||||
coverage: /\d+.?\d+?\%\s*coverage/
|
coverage: /\d+.?\d+?\%\s*coverage/
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
@ -24,7 +26,9 @@ testLEGACY:
|
|||||||
testLTS:
|
testLTS:
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- npmci test lts
|
- npmci node install lts
|
||||||
|
- npmci npm install
|
||||||
|
- npmci npm test
|
||||||
coverage: /\d+.?\d+?\%\s*coverage/
|
coverage: /\d+.?\d+?\%\s*coverage/
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
@ -32,7 +36,9 @@ testLTS:
|
|||||||
testSTABLE:
|
testSTABLE:
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- npmci test stable
|
- npmci node install stable
|
||||||
|
- npmci npm install
|
||||||
|
- npmci npm test
|
||||||
coverage: /\d+.?\d+?\%\s*coverage/
|
coverage: /\d+.?\d+?\%\s*coverage/
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
@ -40,7 +46,8 @@ testSTABLE:
|
|||||||
release:
|
release:
|
||||||
stage: release
|
stage: release
|
||||||
script:
|
script:
|
||||||
- npmci publish
|
- npmci npm prepare
|
||||||
|
- npmci npm publish
|
||||||
only:
|
only:
|
||||||
- tags
|
- tags
|
||||||
tags:
|
tags:
|
||||||
|
26
docs/structure.md
Normal file
26
docs/structure.md
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
---
|
||||||
|
name: npmts project structure
|
||||||
|
description: how npmts projects are structured
|
||||||
|
---
|
||||||
|
# npmts - Project Structure
|
||||||
|
|
||||||
|
**locally**
|
||||||
|
|
||||||
|
```text
|
||||||
|
projectroot
|
||||||
|
|- .nogit/ # contains files that should not be checked into git - NOgit
|
||||||
|
|- dist/ # contains compiled js files and their corresponding typings - git
|
||||||
|
|- node_modules/ # contains the installed node modules - NOgit
|
||||||
|
|- test/ # contains the test files - git
|
||||||
|
|- ts/ # contains the source TypeScript files - git
|
||||||
|
|
|
||||||
|
|- .gitignore # the normal gitignore file
|
||||||
|
|- .gitlab-ci.yml # the gitlab ci yml file
|
||||||
|
|- npmextra.json # npmextra.json
|
||||||
|
|- package.json # the standard npm module package.json file
|
||||||
|
|- readme.md # the standard project readme
|
||||||
|
|- tslint.json # the standard tslint.json for TypeScript
|
||||||
|
|- yarn.lock # yarn.lock - the standard yarn.lock file
|
||||||
|
```
|
||||||
|
|
||||||
|
**in git**
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "npmts",
|
"name": "npmts",
|
||||||
"version": "8.0.14",
|
"version": "8.0.17",
|
||||||
"description": "best practice npm TypeScript modules",
|
"description": "best practice npm TypeScript modules",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
|
@ -8,27 +8,27 @@ import { INpmtsConfig } from './npmts.config'
|
|||||||
|
|
||||||
let npmtsSmartchok: smartchok.Smartchok = null
|
let npmtsSmartchok: smartchok.Smartchok = null
|
||||||
export let run = (configArg: INpmtsConfig) => {
|
export let run = (configArg: INpmtsConfig) => {
|
||||||
let done = q.defer()
|
let done = q.defer()
|
||||||
if (configArg.watch && npmtsSmartchok === null) {
|
if (configArg.watch && npmtsSmartchok === null) {
|
||||||
let pathsToWatch: string[] = []
|
let pathsToWatch: string[] = []
|
||||||
for (let key in configArg.ts) {
|
for (let key in configArg.ts) {
|
||||||
pathsToWatch.push(key)
|
pathsToWatch.push(key)
|
||||||
}
|
|
||||||
for (let key in configArg.testTs) {
|
|
||||||
pathsToWatch.push(key)
|
|
||||||
}
|
|
||||||
npmtsSmartchok = new smartchok.Smartchok(pathsToWatch)
|
|
||||||
npmtsSmartchok.getObservableFor('change').then((changeObservableArg) => {
|
|
||||||
plugins.beautylog.info('now watching...')
|
|
||||||
changeObservableArg.subscribe(() => {
|
|
||||||
cli.run()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
npmtsSmartchok.start()
|
|
||||||
done.resolve(configArg)
|
|
||||||
} else {
|
|
||||||
plugins.beautylog.info('not watching')
|
|
||||||
done.resolve(configArg)
|
|
||||||
}
|
}
|
||||||
return done.promise
|
for (let key in configArg.testTs) {
|
||||||
|
pathsToWatch.push(key)
|
||||||
|
}
|
||||||
|
npmtsSmartchok = new smartchok.Smartchok(pathsToWatch)
|
||||||
|
npmtsSmartchok.getObservableFor('change').then((changeObservableArg) => {
|
||||||
|
plugins.beautylog.info('now watching...')
|
||||||
|
changeObservableArg.subscribe(() => {
|
||||||
|
cli.run()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
npmtsSmartchok.start()
|
||||||
|
done.resolve(configArg)
|
||||||
|
} else {
|
||||||
|
plugins.beautylog.info('not watching')
|
||||||
|
done.resolve(configArg)
|
||||||
|
}
|
||||||
|
return done.promise
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user