Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

es6-dev-server

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

es6-dev-server - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

5

app.js

@@ -17,6 +17,10 @@ const express = require('express')

// Middleware to map imports in JS files so that node module resolution is used
app.use(moduleMiddleware(root))
// Serve static files
app.use(express.static(path.join(root)))
// If there is a defalt entry defined, then always return that one
// for not found entries
if (entry) {

@@ -30,2 +34,3 @@ app.use((req, res, next) => {

// Default "not found"
app.use(function (req, res, next) {

@@ -32,0 +37,0 @@ res

5

index.js

@@ -68,5 +68,2 @@ const path = require('path')

}
// if (/\.map$/.test(moduleFilePath)) {
// cached = this.cache[path] = new Cached(code, "application/json")
// } else {
const { resolvedCode, error } = this.resolveImports(moduleFilePath, code)

@@ -78,3 +75,3 @@ if (error) {

cached = this.cache[pathname] = new Cached(resolvedCode, 'application/javascript')
// }
// Drop cache entry when the file changes.

@@ -81,0 +78,0 @@ const watching = fs.watch(moduleFilePath, () => {

2

package.json
{
"name": "es6-dev-server",
"version": "0.0.3",
"version": "0.0.4",
"bin": {

@@ -5,0 +5,0 @@ "es6-dev-server": "./server"

@@ -7,2 +7,5 @@ # Serve ES6 modules

_NOTE: this module draws strong inspiration (and large chunks of repurposed code) from
Marijn Haverbeke's awesome [esmoduleserve](https://github.com/marijnh/esmoduleserve)._
## Usage as a stand alone server

@@ -49,3 +52,3 @@

const mm = new ModuleMiddleware({ root })
const mm = new ModuleMiddleware({ root: '.' })
app.use((req, res, next) => {

@@ -52,0 +55,0 @@ if (mm.handleRequest(req, res)) {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc