@travetto/compiler
Advanced tools
Comparing version 0.0.36 to 0.0.37
@@ -22,3 +22,3 @@ { | ||
"scripts": {}, | ||
"version": "0.0.36" | ||
"version": "0.0.37" | ||
} |
@@ -32,3 +32,3 @@ import * as ts from 'typescript'; | ||
if (AppInfo.DEV_PACKAGES && AppInfo.DEV_PACKAGES.length) { | ||
exclude.push(new RegExp(`${CompilerUtil.LIBRARY_PATH}/(${AppInfo.DEV_PACKAGES.join('|')})/`)); | ||
exclude.push(new RegExp(`${CompilerUtil.LIBRARY_PATH}[\\\/](${AppInfo.DEV_PACKAGES.join('|')})[\\\/]`)); | ||
} | ||
@@ -95,3 +95,3 @@ | ||
if (/\/test\//.test(tsf) && !tsf.includes(CompilerUtil.LIBRARY_PATH)) { | ||
if (/[\/\\]test[\/\\]/.test(tsf) && !tsf.includes(CompilerUtil.LIBRARY_PATH)) { | ||
console.debug(content); | ||
@@ -98,0 +98,0 @@ } |
@@ -1,2 +0,2 @@ | ||
import { Watcher, Entry, AppEnv, Handler, findAppFilesByExt } from '@travetto/base'; | ||
import { Watcher, Entry, AppEnv, Handler, findAppFiles } from '@travetto/base'; | ||
import { CompilerUtil } from './util'; | ||
@@ -60,4 +60,3 @@ import * as path from 'path'; | ||
init() { | ||
const rootFiles = findAppFilesByExt('.ts') | ||
.filter(x => x.file.includes('/src/') && this.validFile(x.file)) | ||
const rootFiles = findAppFiles('.ts', x => x.startsWith('src/') && this.validFile(x)) | ||
.filter(x => !(x.file in require.cache)) // Pre-loaded items are fundamental and non-reloadable | ||
@@ -74,3 +73,3 @@ .map(x => x.file); | ||
if (this.watch) { | ||
this.buildWatcher(`${this.cwd}/src`, [{ testFile: x => this.validFile(x) && x.endsWith('.ts') }]); | ||
this.buildWatcher(`${this.cwd}${path.sep}src`, [{ testFile: x => this.validFile(x) && x.endsWith('.ts') }]); | ||
} | ||
@@ -104,3 +103,3 @@ } | ||
} | ||
this.fileWatchers[topLevel].add([name.replace(`${topLevel}/`, '')]); | ||
this.fileWatchers[topLevel].add([name.replace(`${topLevel}${path.sep}`, '')]); | ||
} | ||
@@ -107,0 +106,0 @@ this.files.set(name, { version: 0 }); |
@@ -14,3 +14,3 @@ import { CustomTransformers } from 'typescript'; | ||
for (const trns of requireAppFiles('.ts', /transformer[.].*[.]ts$/)) { | ||
for (const trns of requireAppFiles('.ts', x => /transformer[.].*[.]ts$/.test(x))) { | ||
for (const key of Object.keys(trns)) { | ||
@@ -17,0 +17,0 @@ const item = trns[key]; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26563
722