Make tsc command use full path to tsconfig

This commit is contained in:
Garrett Mills 2022-01-09 15:54:38 -06:00
parent e4143e0b8e
commit 24d615c2a0
2 changed files with 4 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "@extollo/cc", "name": "@extollo/cc",
"version": "0.3.0", "version": "0.4.0",
"description": "Early-phase compiler for Extollo projects", "description": "Early-phase compiler for Extollo projects",
"main": "lib/index.js", "main": "lib/index.js",
"types": "lib/index.d.ts", "types": "lib/index.d.ts",

View File

@ -1,4 +1,5 @@
import * as childProcess from 'child_process' import * as childProcess from 'child_process'
import * as path from 'path'
import {Phase} from './Phase' import {Phase} from './Phase'
import {ExtolloCompileConfig} from '../types' import {ExtolloCompileConfig} from '../types'
import {Logger} from '../Logger' import {Logger} from '../Logger'
@ -15,7 +16,8 @@ export class CompilePhase extends Phase {
public run(): Promise<void> { public run(): Promise<void> {
Logger.verb('tsc', 'transpile sources') Logger.verb('tsc', 'transpile sources')
const tsc = childProcess.spawn('tsc', ['-p', this.tsconfigPath]) Logger.verb('++', `tsc -p ${path.resolve(this.tsconfigPath)}`)
const tsc = childProcess.spawn('tsc', ['-p', path.resolve(this.tsconfigPath)])
tsc.stdout.on('data', (output: Buffer) => { tsc.stdout.on('data', (output: Buffer) => {
Logger.info('tsc', output.toString('utf-8')) Logger.info('tsc', output.toString('utf-8'))