Skip to content

Commit

Permalink
Only transpile our own code
Browse files Browse the repository at this point in the history
  • Loading branch information
leo committed Jan 27, 2017
1 parent 96ce096 commit 9e67188
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bin/serve.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@ const nodeVersion = require('node-version')
const pkg = require('../package')

// Support for keywords "async" and "await"
const pathSep = process.platform === 'win32' ? '\\\\' : '/'

asyncToGen({
excludes: null
include: new RegExp(`.*serve?${pathSep}(lib|bin).*`),
exclude: null
})

// Throw an error if node version is too low
Expand Down
2 changes: 2 additions & 0 deletions lib/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ module.exports = async (req, res, flags, current, ignoredFiles) => {

// Check if directory
if (relatedExists && await pathType.dir(related)) {
// Normalize path to trailing slash
// Otherwise problems like #70 will occur
if (req.url.substr(-1) !== '/') {
const newPath = req.url + '/'

Expand Down

0 comments on commit 9e67188

Please sign in to comment.