Skip to content

Commit

Permalink
fix: compilation on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
develar committed Feb 24, 2016
1 parent 0000e99 commit 64d1ffb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ts-babel",
"description": "Transform TypeScript compiler result using Babel to granular target control",
"version": "0.4.2",
"version": "0.4.3",
"license": "MIT",
"bin": {
"ts-babel": "main.js"
Expand Down
9 changes: 6 additions & 3 deletions src/builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,12 @@ async function compile(config: any) {
async function removedOld(outDir: string, emittedFiles: Set<string>, promises: Array<BluebirdPromise<any>>) {
const files = await BluebirdPromise.promisify(fse.readdir)(outDir)
for (let file of files) {
const fullPath = path.join(outDir, file)
if (file[0] !== "." && !emittedFiles.has(fullPath) && !file.endsWith(".d.ts")) {
promises.push(unlink(fullPath))
if (file[0] !== "." && !file.endsWith(".d.ts")) {
// ts uses / regardless of OS
const fullPath = outDir + '/' + file
if (!emittedFiles.has(fullPath)) {
promises.push(unlink(fullPath))
}
}
}
}
Expand Down

0 comments on commit 64d1ffb

Please sign in to comment.