From 1466cf76d4cfd3607143b2a30e3e0796673b94e3 Mon Sep 17 00:00:00 2001 From: Leo Lamprecht Date: Sun, 5 Feb 2017 23:17:12 +0100 Subject: [PATCH] Make `async-to-gen` work on Now --- bin/serve.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/serve.js b/bin/serve.js index 905662c4..4edfb611 100755 --- a/bin/serve.js +++ b/bin/serve.js @@ -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') @@ -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 })