Skip to content

Commit

Permalink
Fix transpilation on Windows platform
Browse files Browse the repository at this point in the history
This closes #159 and resolves #145
  • Loading branch information
leo committed Mar 6, 2017
1 parent ab5c8a2 commit 8a597c0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bin/micro.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ if (!isAsyncSupported()) {
// Support for keywords "async" and "await"
const pathSep = process.platform === 'win32' ? '\\\\' : '/'
const directoryName = path.parse(path.join(__dirname, '..')).base
const fileDirectoryPath = path.parse(file).dir

// This is required to make transpilation work on Windows
const fileDirectoryPath = path.parse(file).dir.split(path.sep).join(pathSep)

asyncToGen({
includes: new RegExp(`.*${directoryName}?${pathSep}(lib|bin)|${fileDirectoryPath}.*`),
Expand Down

0 comments on commit 8a597c0

Please sign in to comment.