Skip to content

Commit

Permalink
Upload original source code
Browse files Browse the repository at this point in the history
  • Loading branch information
larixer committed Dec 18, 2018
1 parent 2bc5f5a commit adcd4cc
Show file tree
Hide file tree
Showing 219 changed files with 24,506 additions and 2 deletions.
34 changes: 34 additions & 0 deletions .babelrc
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"
]
}
}
}
8 changes: 8 additions & 0 deletions .bookignore
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
9 changes: 9 additions & 0 deletions .editorconfig
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
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/test/**/fixture*/**
/test/**/*fixture/**
28 changes: 28 additions & 0 deletions .eslintrc
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"
}
}
5 changes: 5 additions & 0 deletions .flowconfig
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
11 changes: 11 additions & 0 deletions .gitattributes
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
24 changes: 24 additions & 0 deletions .gitignore
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
95 changes: 95 additions & 0 deletions .history/CONTRIBUTING_20181218102615.md
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.
95 changes: 95 additions & 0 deletions .history/CONTRIBUTING_20181218103328.md
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.
Loading

0 comments on commit adcd4cc

Please sign in to comment.