Skip to content

Commit

Permalink
Make async-to-gen work on Now
Browse files Browse the repository at this point in the history
  • Loading branch information
leo committed Feb 5, 2017
1 parent f5a863c commit 1466cf7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bin/serve.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/usr/bin/env node

// Native
const path = require('path')

// Packages
const asyncToGen = require('async-to-gen/register')
const updateNotifier = require('update-notifier')
Expand All @@ -13,9 +16,10 @@ const pkg = require('../package')
// Support for keywords "async" and "await"
if (!isAsyncSupported()) {
const pathSep = process.platform === 'win32' ? '\\\\' : '/'
const directoryName = path.parse(path.join(__dirname, '..')).base

asyncToGen({
includes: new RegExp(`.*serve?${pathSep}(lib|bin).*`),
includes: new RegExp(`.*${directoryName}?${pathSep}(lib|bin).*`),
excludes: null,
sourceMaps: false
})
Expand Down

0 comments on commit 1466cf7

Please sign in to comment.