Skip to content

fix: use tsc.cmd on windows for typescript #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 28, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/targets/typescript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,22 @@ import path from 'path';
import child_process from 'child_process';
import fs from 'fs-extra';
import del from 'del';
import { platform } from 'os';
import { Input } from '../types';

export default async function build({ root, output, report }: Input) {
report.info(`Cleaning up previous build at ${chalk.blue(path.relative(root, output))}`);
report.info(
`Cleaning up previous build at ${chalk.blue(path.relative(root, output))}`
);

await del([output]);

report.info(`Generating type definitions with ${chalk.blue('tsc')}`);

const tsc = path.join(root, 'node_modules', '.bin', 'tsc');
const tsc =
path.join(root, 'node_modules', '.bin', 'tsc') +
(platform() === 'win32' ? '.cmd' : '');

const tsconfig = path.join(root, 'tsconfig.json');

try {
Expand Down