-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from Prasunjais/feat/husky/init
feat(husky): Added Husky for initial commit
- Loading branch information
Showing
11 changed files
with
7,433 additions
and
2,883 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,14 @@ | ||
{ | ||
"presets": ["es2015", "stage-2"] | ||
"presets": [ | ||
"env", | ||
"es2015", | ||
"stage-2" | ||
], | ||
"plugins": [ | ||
"transform-class-properties", | ||
"transform-object-rest-spread" | ||
], | ||
"test": [ | ||
"jest" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
echo \"Pre Commit Check\" | ||
|
||
npm test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
echo \"Pre Push Check\" | ||
|
||
npm test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"testRegex": "((\\.|/*.)(spec))\\.js?$" | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
const mongoose = require('mongoose'); | ||
const autopopulate = require('mongoose-autopopulate'); | ||
require('mongoose-type-email'); | ||
const Schema = mongoose.Schema; | ||
|
||
// schema | ||
const alerts = new Schema({ | ||
name: { | ||
type: String, | ||
required: true | ||
}, | ||
nameToDisplay: { | ||
type: String, | ||
required: true | ||
}, | ||
stateId: { | ||
type: 'Number', | ||
required: true | ||
}, | ||
districtId: [{ | ||
type: 'Number', | ||
required: true | ||
}], | ||
email: { | ||
type: mongoose.SchemaTypes.Email, | ||
unique: true | ||
}, | ||
status: { | ||
type: Number, | ||
default: 1, | ||
enum: [0, 1] | ||
}, | ||
isDeleted: { | ||
type: Number, | ||
default: 0, | ||
enum: [0, 1] | ||
}, | ||
}, { | ||
timestamps: true | ||
}); | ||
|
||
// creating indexes | ||
alerts.index({ | ||
'status': 1 | ||
}); | ||
|
||
alerts.plugin(autopopulate); | ||
|
||
// exporting the entire module | ||
module.exports = mongoose.model('alerts', alerts); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/** | ||
* All your Hooks Comes here | ||
*/ | ||
module.exports = { | ||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
describe('My Test Suite', () => { | ||
it('My Test Case', () => { | ||
expect(true).toEqual(true); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/** | ||
* All the third party apis comes here | ||
*/ | ||
module.exports = { | ||
|
||
}; |