Skip to content

Commit 4346204

Browse files
committed
added support for async/await
1 parent e4f868a commit 4346204

File tree

3 files changed

+20
-8
lines changed

3 files changed

+20
-8
lines changed

index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import 'babel-polyfill';
12
import config from './config/config';
23
import app from './config/express';
34
/* eslint-disable no-unused-vars */

package.json

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
{
22
"name": "express-postgresql-sequelize-es6-rest-api",
33
"version": "0.0.1",
4-
"description":
5-
"A Boilerplate application for building REST APIs using express, sequelize in ES6 with code coverage",
4+
"description": "A Boilerplate application for building REST APIs using express, sequelize in ES6 with code coverage",
65
"author": "Gaurav Porwal <[email protected]>",
76
"main": "index.js",
87
"private": false,
@@ -18,11 +17,9 @@
1817
"lint": "esw *.js server config --color",
1918
"lint:watch": "yarn lint -- --watch",
2019
"beautify": "es-beautifier -u -c .eslintrc.js *.js server config",
21-
"test":
22-
"cross-env NODE_ENV=test ./node_modules/.bin/mocha --ui bdd --reporter spec --colors --compilers js:babel-core/register server/tests --recursive",
20+
"test": "cross-env NODE_ENV=test, PG_DB=test-express-postgresql-sequelize-es6-rest-api ./node_modules/.bin/mocha --ui bdd --reporter spec --colors --compilers js:babel-core/register server/tests --recursive",
2321
"test:watch": "yarn test -- --watch",
24-
"test:coverage":
25-
"cross-env NODE_ENV=test ./node_modules/.bin/istanbul cover _mocha -- --ui bdd --reporter spec --colors --compilers js:babel-core/register server/tests --recursive",
22+
"test:coverage": "cross-env NODE_ENV=test ./node_modules/.bin/istanbul cover _mocha -- --ui bdd --reporter spec --colors --compilers js:babel-core/register server/tests --recursive",
2623
"test:check-coverage": "yarn test:coverage && istanbul check-coverage",
2724
"report-coverage": "coveralls < ./coverage/lcov.info"
2825
},
@@ -79,6 +76,7 @@
7976
"babel-core": "6.26.0",
8077
"babel-plugin-add-module-exports": "0.2.1",
8178
"babel-preset-env": "1.6.1",
79+
"babel-preset-es2017": "6.24.1",
8280
"babel-preset-stage-2": "6.24.1",
8381
"chai": "4.1.2",
8482
"commitizen": "2.9.6",
@@ -99,8 +97,14 @@
9997
"validate-commit-msg": "^2.6.1"
10098
},
10199
"babel": {
102-
"presets": ["env", "stage-2"],
103-
"plugins": ["add-module-exports"]
100+
"presets": [
101+
"env",
102+
"es2017",
103+
"stage-2"
104+
],
105+
"plugins": [
106+
"add-module-exports"
107+
]
104108
},
105109
"license": "MIT",
106110
"config": {

yarn.lock

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -820,6 +820,13 @@ [email protected]:
820820
invariant "^2.2.2"
821821
semver "^5.3.0"
822822

823+
824+
version "6.24.1"
825+
resolved "https://registry.yarnpkg.com/babel-preset-es2017/-/babel-preset-es2017-6.24.1.tgz#597beadfb9f7f208bcfd8a12e9b2b29b8b2f14d1"
826+
dependencies:
827+
babel-plugin-syntax-trailing-function-commas "^6.22.0"
828+
babel-plugin-transform-async-to-generator "^6.24.1"
829+
823830
824831
version "6.24.1"
825832
resolved "https://registry.yarnpkg.com/babel-preset-stage-2/-/babel-preset-stage-2-6.24.1.tgz#d9e2960fb3d71187f0e64eec62bc07767219bdc1"

0 commit comments

Comments
 (0)