-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
219 changed files
with
24,506 additions
and
2 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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"presets": [ | ||
[ | ||
"babel-preset-env", | ||
{ | ||
"exclude": [ | ||
"transform-async-to-generator", | ||
"transform-regenerator" | ||
] | ||
} | ||
] | ||
], | ||
"plugins": [ | ||
"babel-plugin-transform-flow-strip-types", | ||
"babel-plugin-transform-decorators-legacy", | ||
"babel-plugin-transform-class-properties", | ||
"babel-plugin-transform-object-rest-spread", | ||
[ | ||
"fast-async", | ||
{ | ||
"useRuntimeModule": true | ||
} | ||
], | ||
"babel-plugin-lodash", | ||
"babel-plugin-transform-runtime" | ||
], | ||
"env": { | ||
"coverage": { | ||
"plugins": [ | ||
"babel-plugin-istanbul" | ||
] | ||
} | ||
} | ||
} |
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,8 @@ | ||
# Ignore file for gitbook | ||
|
||
# Ignore everything | ||
* | ||
# But not these files... | ||
!*.md | ||
!book.json | ||
!docs |
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,9 @@ | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = 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,2 @@ | ||
/test/**/fixture*/** | ||
/test/**/*fixture/** |
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,28 @@ | ||
{ | ||
"parser": "babel-eslint", | ||
"extends": [ | ||
"airbnb-base", | ||
"plugin:flowtype/recommended" | ||
], | ||
"plugins": [ | ||
"flowtype", | ||
"flowtype-errors" | ||
], | ||
"env": { | ||
"node": true | ||
}, | ||
"settings": { | ||
"flowtype": { | ||
"onlyFilesWithFlowAnnotation": true | ||
} | ||
}, | ||
"rules": { | ||
"arrow-parens": ["error", "always"], | ||
"max-len": ["error", 120], | ||
"no-duplicate-imports": "off", | ||
"no-restricted-syntax": "off", | ||
"generator-star-spacing": "off", | ||
"import/no-extraneous-dependencies": ["error", {"peerDependencies": true}], | ||
"flowtype-errors/show-errors": "error" | ||
} | ||
} |
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 @@ | ||
[ignore] | ||
./lib/.* | ||
[options] | ||
module.ignore_non_literal_requires=true | ||
suppress_comment= \\(.\\|\n\\)*\\$FlowFixMe |
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,11 @@ | ||
# restore defaults | ||
* text=auto | ||
|
||
# use lf line endings at least for the following files | ||
*.js text eol=lf | ||
*.ts text eol=lf | ||
*.json text eol=lf | ||
*.md text eol=lf | ||
*.opts text eol=lf | ||
*.coffee text eol=lf | ||
*.yml text eol=lf |
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,24 @@ | ||
# IntelliJ, WebStorm, ... | ||
.idea | ||
|
||
# Node | ||
node_modules | ||
npm-debug.log | ||
|
||
# Project | ||
lib/* | ||
!lib/utils.js | ||
!lib/entry.js | ||
!lib/reporters | ||
lib/reporters/* | ||
!lib/reporters/base.js | ||
|
||
# Code Coverage | ||
.nyc_output | ||
coverage | ||
|
||
# Temp | ||
.tmp | ||
|
||
# gitbook | ||
_book |
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,95 @@ | ||
# Contributing | ||
|
||
## Issues | ||
Found an issue? Missing a feature or something else? We look forward to receive your feedback. | ||
|
||
For bug reports please make sure that you | ||
* clearly describe your problem | ||
* provide us something that allows us to reproduce the problem (a minimal failing example would be awesome) | ||
|
||
## Pull Requests | ||
|
||
We love pull requests. Here's a quick guide: | ||
|
||
1. Fork the repo. | ||
|
||
1. Run the tests. We only take pull requests with passing tests, and it's great to know that you have a clean state. | ||
|
||
1. Add a test for your change. Only refactoring and documentation changes require no new tests. If you are adding functionality or fixing a bug, we need a test to avoid regressions in future releases. | ||
|
||
1. Make the test pass. | ||
|
||
1. Push to your fork and submit a pull request. | ||
|
||
1. At this point you're waiting on us. We'll give you feedback asap. | ||
|
||
**Note:** If you have any problems with a test case don't hesitate to ask us. Just submit your PR and we'll find a solution together :) | ||
|
||
### How to run tests | ||
|
||
1. Make sure you have all dependencies installed | ||
```bash | ||
$ npm install | ||
``` | ||
|
||
1. Run the tests with: | ||
```bash | ||
$ npm run test | ||
``` | ||
|
||
### How to test against your project | ||
|
||
Wanna test your changes against your real world project? No Problem! | ||
|
||
Let's use `npm link` to symlink the fork into your project. | ||
|
||
1. switch to the root of this project | ||
|
||
1. make sure you have all dependencies installed | ||
```bash | ||
$ npm install | ||
``` | ||
|
||
1. run first step for npm link | ||
```bash | ||
$ npm link | ||
``` | ||
|
||
1. switch to your real world project | ||
|
||
1. and execute the second step for npm link | ||
```bash | ||
$ npm link mocha-webpack | ||
``` | ||
|
||
1. You need to configure loader resolution in your webpack config, like below | ||
```js | ||
var path = require('path'); | ||
|
||
module.exports = { | ||
// .. | ||
// npm link mocha-webpack hack | ||
resolveLoader: { | ||
root: [ | ||
// __dirname is the root of your project, you may need to adjust the path | ||
path.join(__dirname, "node_modules") | ||
] | ||
}; | ||
// .. | ||
}; | ||
``` | ||
|
||
1. Then you are almost ready to go. You just have to build this project initially and whenever you make code changes. | ||
```bash | ||
$ npm run build | ||
``` | ||
|
||
|
||
|
||
### Syntax rules | ||
|
||
Please pay attention on the following syntax rules: | ||
|
||
* Basic coding styles are defined within the .editorconfig file. | ||
* ESLint automatically checks the code style after tests or manually via `npm run lint`. | ||
* Follow the conventions used in the source already. |
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,95 @@ | ||
# Contributing | ||
|
||
## Issues | ||
Found an issue? Missing a feature or something else? We look forward to receive your feedback. | ||
|
||
For bug reports please make sure that you | ||
* clearly describe your problem | ||
* provide us something that allows us to reproduce the problem (a minimal failing example would be awesome) | ||
|
||
## Pull Requests | ||
|
||
We love pull requests. Here's a quick guide: | ||
|
||
1. Fork the repo. | ||
|
||
1. Run the tests. We only take pull requests with passing tests, and it's great to know that you have a clean state. | ||
|
||
1. Add a test for your change. Only refactoring and documentation changes require no new tests. If you are adding functionality or fixing a bug, we need a test to avoid regressions in future releases. | ||
|
||
1. Make the test pass. | ||
|
||
1. Push to your fork and submit a pull request. | ||
|
||
1. At this point you're waiting on us. We'll give you feedback asap. | ||
|
||
**Note:** If you have any problems with a test case don't hesitate to ask us. Just submit your PR and we'll find a solution together :) | ||
|
||
### How to run tests | ||
|
||
1. Make sure you have all dependencies installed | ||
```bash | ||
$ npm install | ||
``` | ||
|
||
1. Run the tests with: | ||
```bash | ||
$ npm run test | ||
``` | ||
|
||
### How to test against your project | ||
|
||
Wanna test your changes against your real world project? No Problem! | ||
|
||
Let's use `npm link` to symlink the fork into your project. | ||
|
||
1. switch to the root of this project | ||
|
||
1. make sure you have all dependencies installed | ||
```bash | ||
$ npm install | ||
``` | ||
|
||
1. run first step for npm link | ||
```bash | ||
$ npm link | ||
``` | ||
|
||
1. switch to your real world project | ||
|
||
1. and execute the second step for npm link | ||
```bash | ||
$ npm link mochapack | ||
``` | ||
|
||
1. You need to configure loader resolution in your webpack config, like below | ||
```js | ||
var path = require('path'); | ||
|
||
module.exports = { | ||
// .. | ||
// npm link mochapack hack | ||
resolveLoader: { | ||
root: [ | ||
// __dirname is the root of your project, you may need to adjust the path | ||
path.join(__dirname, "node_modules") | ||
] | ||
}; | ||
// .. | ||
}; | ||
``` | ||
|
||
1. Then you are almost ready to go. You just have to build this project initially and whenever you make code changes. | ||
```bash | ||
$ npm run build | ||
``` | ||
|
||
|
||
|
||
### Syntax rules | ||
|
||
Please pay attention on the following syntax rules: | ||
|
||
* Basic coding styles are defined within the .editorconfig file. | ||
* ESLint automatically checks the code style after tests or manually via `npm run lint`. | ||
* Follow the conventions used in the source already. |
Oops, something went wrong.