es6-dev-server
Advanced tools
Comparing version 0.0.6 to 0.0.8
@@ -18,3 +18,3 @@ const express = require('express') | ||
// Middleware to map imports in JS files so that node module resolution is used | ||
app.use(moduleMiddleware(root)) | ||
app.use(moduleMiddleware({ root })) | ||
@@ -21,0 +21,0 @@ // Serve static files |
10
index.js
@@ -17,2 +17,3 @@ // ES6 DEV SERVER | ||
// TODO: | ||
// * Add https://www.npmjs.com/package/reload so that it does client reload | ||
// * Check whether we need/want `unwin()`` | ||
@@ -217,2 +218,10 @@ // * Get rid of that `require('url')` which is now obsolete | ||
// part so that the path is rewritten. | ||
// | ||
// Note that `walk.simple` is used to walk through the list of nodes | ||
// of the parsed program; a list of `patches` is created, with the | ||
// exact positions of the portion to change, and the new text. | ||
// The new text wwill be longer than the original one; so, changing `code` | ||
// would have the side effect of messing up the stores ranges; so, the patches | ||
// are applied in inverted order to the source file, so that making changes | ||
// doesn't mess up the offset of the other patches. | ||
resolveImports (moduleFilePath, code) { | ||
@@ -239,3 +248,2 @@ const patches = [] | ||
walk.simple(ast, { | ||
ExportNamedDeclaration: patchSrc, | ||
@@ -242,0 +250,0 @@ ImportDeclaration: patchSrc, |
{ | ||
"name": "es6-dev-server", | ||
"description": "Serve ES6 modules ensuring node resolution via the node algorithm. Express middleware and full server", | ||
"version": "0.0.6", | ||
"version": "0.0.8", | ||
"bin": { | ||
@@ -6,0 +6,0 @@ "es6-dev-server": "./server" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
53956
336