Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
2fc6c3d358 | |||
0c74fb3343 | |||
d821a2efa6 |
5
docs/structure.md
Normal file
5
docs/structure.md
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
name: npmts project structure
|
||||||
|
description: how npmts projects are structured
|
||||||
|
---
|
||||||
|
# npmts - Project Structure
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "npmts",
|
"name": "npmts",
|
||||||
"version": "8.0.15",
|
"version": "8.0.16",
|
||||||
"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