about summary refs log tree commit diff
diff options
context:
space:
mode:
authorYamagishi Kazutoshi <ykzts@desire.sh>2017-06-26 11:49:39 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-06-26 04:49:39 +0200
commit285038972b724e646aa1a3aa2096b161524bce09 (patch)
tree9dab72c5cfb929a98f47f40fde391829c19f5068
parente5563843a2c063ab0295f778428183361e0aa326 (diff)
Stop using Babel with streaming server (#3950)
-rw-r--r--package.json2
-rw-r--r--streaming/.babelrc15
-rw-r--r--streaming/index.js22
3 files changed, 12 insertions, 27 deletions
diff --git a/package.json b/package.json
index d1fd22fb5..4b967bad7 100644
--- a/package.json
+++ b/package.json
@@ -6,7 +6,7 @@
     "build:development": "cross-env RAILS_ENV=development ./bin/webpack",
     "build:production": "cross-env RAILS_ENV=production ./bin/webpack",
     "manage:translations": "node ./config/webpack/translationRunner.js",
-    "start": "rimraf ./tmp/streaming && babel ./streaming/index.js --out-dir ./tmp && node ./tmp/streaming/index.js",
+    "start": "node ./streaming/index.js",
     "storybook": "cross-env NODE_ENV=test start-storybook -s ./public -p 9001 -c storybook",
     "test": "npm run test:lint && npm run test:mocha",
     "test:lint": "eslint -c .eslintrc.yml --ext=js app/javascript/ config/webpack/ spec/javascript/ storybook/ streaming/",
diff --git a/streaming/.babelrc b/streaming/.babelrc
deleted file mode 100644
index dc1ec4303..000000000
--- a/streaming/.babelrc
+++ /dev/null
@@ -1,15 +0,0 @@
-{
-  "presets": [
-    [
-      "env",
-      {
-        "targets": {
-          "node": "current"
-        }
-      }
-    ]
-  ],
-  "plugins": [
-    "transform-object-rest-spread"
-  ]
-}
diff --git a/streaming/index.js b/streaming/index.js
index e641c6548..400456d24 100644
--- a/streaming/index.js
+++ b/streaming/index.js
@@ -1,14 +1,14 @@
-import os from 'os';
-import throng from 'throng';
-import dotenv from 'dotenv';
-import express from 'express';
-import http from 'http';
-import redis from 'redis';
-import pg from 'pg';
-import log from 'npmlog';
-import url from 'url';
-import WebSocket from 'uws';
-import uuid from 'uuid';
+const os = require('os');
+const throng = require('throng');
+const dotenv = require('dotenv');
+const express = require('express');
+const http = require('http');
+const redis = require('redis');
+const pg = require('pg');
+const log = require('npmlog');
+const url = require('url');
+const WebSocket = require('uws');
+const uuid = require('uuid');
 
 const env = process.env.NODE_ENV || 'development';