convert require to import statements
This commit is contained in:
parent
283a74f657
commit
c2b4a4ce6e
|
@ -17,7 +17,7 @@
|
|||
},
|
||||
"scripts": {
|
||||
"start": "nodemon --exec babel-node --presets env,stage-2 src/index.js",
|
||||
"build": "node_modules/.bin/babel src/index.js -o out/counter.js"
|
||||
"build": "babel src -o out/counter.js"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
|
|
10
src/index.js
10
src/index.js
|
@ -1,9 +1,9 @@
|
|||
const Koa = require('koa')
|
||||
const Router = require('koa-router')
|
||||
const JSON = require('koa-json')
|
||||
import Koa from 'koa'
|
||||
import Router from 'koa-router'
|
||||
import JSON from 'koa-json'
|
||||
|
||||
const Counter = require('./counter')
|
||||
const Redis = require('async-redis')
|
||||
import Counter from './counter'
|
||||
import Redis from 'async-redis'
|
||||
|
||||
/* DEFAULTS */
|
||||
const REDIS_HOST = 'localhost'
|
||||
|
|
Loading…
Reference in New Issue