Skip to content
Snippets Groups Projects
Unverified Commit 083e3a61 authored by valzav's avatar valzav Committed by Iain Maitland
Browse files

make more modules plain node compatible

parent bc86bf69
No related branches found
No related tags found
No related merge requests found
......@@ -16,8 +16,8 @@
"eslint": "LIST=`git diff-index --name-only HEAD | grep .*\\.js | grep -v json`; if [ \"$LIST\" ]; then eslint $LIST; fi",
"fmt": "prettier --config .prettierrc --write 'src/**/*.js*'",
"production": "NODE_ENV=production node lib/server/index.js",
"start": "NODE_ENV=development ./node_modules/babel-cli/bin/babel-node.js ./webpack/dev-server.js",
"webpush": "./node_modules/babel-cli/bin/babel-node.js ./scripts/webpush_notify.js",
"start": "NODE_ENV=development babel-node ./webpack/dev-server.js",
"webpush": "node ./scripts/webpush_notify.js",
"checktranslations": "node scripts/check_translations.js"
},
"author": "Steemit, Inc.",
......
import config from 'config';
import webPush from 'web-push';
import Tarantool from '../src/db/tarantool';
const config = require('config');
const webPush = require('web-push');
const Tarantool = require('../src/db/tarantool');
webPush.setGCMAPIKey(config.get('notify.gcm_key'));
......
import config from 'config';
import TarantoolDriver from 'tarantool-driver';
const config = require('config');
const TarantoolDriver = require('tarantool-driver');
let instance = null;
......@@ -67,4 +67,4 @@ Tarantool.instance = function () {
return instance;
};
export default Tarantool;
module.exports = Tarantool;
......@@ -5,10 +5,10 @@ if(!fs.existsSync('tmp'))
process.env.BABEL_ENV = 'browser';
process.env.NODE_ENV = 'development';
import Koa from 'koa';
import webpack from 'webpack';
const Koa = require('koa');
const webpack = require('webpack');
import webpackDevConfig from './dev.config';
const webpackDevConfig = require('./dev.config');
const app = new Koa();
const compiler = webpack(webpackDevConfig);
......
import webpack from 'webpack';
import git from 'git-rev-sync';
import baseConfig from './base.config';
import startKoa from './utils/start-koa';
const webpack = require('webpack');
const git = require('git-rev-sync');
const baseConfig = require('./base.config');
const startKoa = require('./utils/start-koa');
// var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
// baseConfig.plugins.push(new BundleAnalyzerPlugin());
export default {
module.exports = {
...baseConfig,
devtool: 'cheap-module-eval-source-map',
output: {
......
import cp from 'child_process';
import path from 'path';
import watch from 'node-watch';
const cp = require('child_process');
const path = require('path');
const watch = require('node-watch');
let server;
let started;
......@@ -50,4 +50,7 @@ const startServer = () => {
// kill server on exit
process.on('exit', () => server.kill('SIGTERM'));
export default () => !server ? startServer() : () => ({});
module.exports = function () {
return !server ? startServer() : () => ({});
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment