Skip to content
This repository was archived by the owner on Apr 13, 2023. It is now read-only.

Commit 1525226

Browse files
committed
Merge branch 'master' of https://github.com/SpringRoll/SpringRollConnect into bugfix/162931909_group_twice
2 parents f7b8df7 + 28ae6ff commit 1525226

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+20109
-3242
lines changed

.babelrc

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"presets": [
3+
[
4+
"@babel/preset-env",
5+
{
6+
"useBuiltIns": "entry",
7+
"targets": {
8+
"node": true
9+
}
10+
}
11+
]
12+
],
13+
"plugins": [
14+
"@babel/plugin-transform-runtime",
15+
"@babel/plugin-transform-modules-commonjs"
16+
]
17+
}

.eslintrc.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,20 @@
88
"node": true,
99
"done": true,
1010
"render": true,
11-
"CONFIGURATION": true
11+
"CONFIGURATION": true,
12+
"before": true,
13+
"afterEach": true,
14+
"after": true,
15+
"describe": true,
16+
"it": true,
17+
"beforeEach": true
1218
},
1319
"parserOptions": {
1420
"ecmaVersion": 2018,
1521
"sourceType": "module"
1622
},
1723
"rules": {
18-
"no-console": "error",
19-
"no-undef": [
20-
"error"
21-
],
22-
"semi": [
23-
"error",
24-
"always"
25-
]
24+
"no-undef": ["error"],
25+
"semi": ["error", "always"]
2626
}
2727
}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ node_modules
44
springroll.log
55
log.txt
66
app/output.log
7+
.nyc_output

.travis.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
language: node_js
22
node_js:
33
- "10.9.0"
4+
sudo: required
5+
addons:
6+
chrome: stable
7+
services:
8+
- mongodb
49
before_install:
510
- npm install -g grunt-cli
11+
- sleep 5 # give time for mongo to wake up: https://docs.travis-ci.com/user/database-setup/#mongodb
12+
- cp sample.env .env

Gruntfile.js

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ module.exports = function(grunt)
66
grunt.loadNpmTasks('grunt-contrib-concat');
77
grunt.loadNpmTasks('grunt-contrib-less');
88
grunt.loadNpmTasks('grunt-eslint');
9+
grunt.loadNpmTasks('grunt-prettier');
910

1011
// load the configuration
1112
grunt.initConfig({
@@ -58,8 +59,31 @@ module.exports = function(grunt)
5859
}
5960
]
6061
}
62+
},
63+
prettier: {
64+
options: {
65+
progress: true,
66+
singleQuote: true
67+
},
68+
tests: {
69+
src: [
70+
'test/**/*.js'
71+
]
72+
},
73+
// src: {
74+
// src: [
75+
// 'src/**/*.js',
76+
// '!src/libs/*.js'
77+
// ]
78+
// },
79+
// app: {
80+
// src: [
81+
// 'app/**/*.js',
82+
// '!app/public/**'
83+
// ]
84+
// }
6185
}
6286
});
6387

64-
grunt.registerTask('default', ['copy', 'concat', 'less', 'eslint']);
88+
grunt.registerTask('default', ['copy', 'concat', 'less', 'eslint', 'prettier:tests']);
6589
};

app/helpers/database.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ module.exports = function(app)
2323
{
2424
log.info('Springroll API is now operational');
2525

26+
// if we're spawned in a child process, notify any listeners
27+
if (process.send) {
28+
process.send({ message: 'Springroll API is now operational' });
29+
}
30+
2631
// Attempt to connect to database
2732
mongoose.connect(process.env.MONGO_DATABASE, function()
2833
{

0 commit comments

Comments
 (0)