remove babel for esm

Signed-off-by: Alexis Tyler <xo@wvvw.me>
This commit is contained in:
Alexis Tyler
2018-11-11 16:35:32 +10:30
parent 11ef5f2cad
commit 685e64b58d
6 changed files with 12 additions and 17 deletions
-3
View File
@@ -1,3 +0,0 @@
{
presets: ["es2015"]
}
-1
View File
@@ -1,5 +1,4 @@
node_modules/
lib/
*.sw[po]
yarn.lock
package-lock.json
+1 -4
View File
@@ -105,7 +105,4 @@ In most cases, you won't need this at all.
## Development
This module is written in ES6, and uses Babel for compilation. What this means in practice:
* The source code lives in the `src/` directory.
* After changing this code, make sure to run `npm run build` to compile it.
This module is written in ES6 and uses ESM.
+4 -1
View File
@@ -1 +1,4 @@
module.exports = require("./lib").default;
/* eslint-disable-next-line no-underscore-dangle */
const _require = require('esm')(module);
module.exports = _require('./src/index').default;
+6 -7
View File
@@ -1,11 +1,10 @@
{
"name": "express-ws",
"version": "4.0.0",
"version": "5.0.0",
"description": "WebSocket endpoints for Express applications",
"main": "index.js",
"main": "index",
"module": "src/index",
"scripts": {
"prepublish": "npm run build",
"build": "babel src/ -d lib/",
"lint": "eslint src/"
},
"author": "Henning Morud <henning@morud.org>",
@@ -15,10 +14,12 @@
"Andrew Phillips <theasp@gmail.com>",
"Nicholas Schell <nschell@gmail.com>",
"Max Truxa <dev@maxtruxa.com>",
"Kræn Hansen <mail@kraenhansen.dk>"
"Kræn Hansen <mail@kraenhansen.dk>",
"Alexis Tyler <xo@wvvw.me>"
],
"license": "BSD-2-Clause",
"dependencies": {
"esm": "^3.0.84",
"ws": "^6.0.0"
},
"peerDependencies": {
@@ -44,8 +45,6 @@
},
"homepage": "https://github.com/HenningM/express-ws",
"devDependencies": {
"babel-cli": "^6.26.0",
"babel-preset-es2015": "^6.5.0",
"eslint": "^4.19.0",
"eslint-config-airbnb": "^14.1.0",
"eslint-plugin-import": "^2.12.0",
+1 -1
View File
@@ -60,7 +60,7 @@ export default function expressWs(app, httpServer, options = {}) {
dummyResponse.writeHead = function writeHead(statusCode) {
if (statusCode > 200) {
/* Something in the middleware chain signalled an error. */
dummyResponse._header = '';
dummyResponse._header = ''; // eslint-disable-line no-underscore-dangle
socket.close();
}
};