Skip to content

Commit bd67b53

Browse files
committed
Merged release/3.2.0 into master
2 parents 53bf310 + e55d6b5 commit bd67b53

24 files changed

+45
-1593
lines changed

.gitignore

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
node_modules
2-
.idea/
3-
reports
4-
test/output/
1+
node_modules
2+
.idea/
3+
reports
4+
test/output/
5+
build/

.npmignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@ samples/
22
reports/
33
node_modules/
44
test/
5+
.idea/
56
.editorconfig
67
.eslintignore
78
.eslintrc
89
.travis.yml
9-
yarn.lock
1010
.git*
1111
.babelrc
12+
yarn.lock

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/)
66
and this project adheres to [Semantic Versioning](http://semver.org/).
77

8+
## Unreleased
9+
10+
### Added
11+
12+
- **cli**: add a '-c, --config <path>' option (Closes [#18](https://github.com/groupe-sii/sonar-web-frontend-reporters/issues/18)) [@ValentinGot]
13+
814
## 3.1.1 - 2017-01-11
915

1016
### Fixed

CONTRIBUTING.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,7 @@ After writing your new reporter, you should build the library to keep the ES5 ba
5454

5555
```js
5656
module.exports = {
57-
NewReporter: require('./reporters/new-reporter.reporter'),
58-
ES5 : {
59-
NewReporter: require('../build/reporters/new-reporter.reporter')
60-
}
57+
NewReporter: require('./reporters/new-reporter.reporter')
6158
};
6259
```
6360
1. Create related tests in `/test/reporters` folder

README.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,25 @@ $ npm install sonar-web-frontend-reporters --save-dev // For NodeJS use
2727
Launch the CLI by calling:
2828

2929
```sh
30-
$ sreporter
30+
$ sreporter [options]
3131
```
3232

33-
The Command-Line Interface uses a `.sreporterrc` file to define the reporters configuration. The `.sreporterrc` file is mandatory in order to use the CLI.
33+
#### Options
34+
35+
The command line utility has several options. You can view the options by running `eslint -h`.
36+
37+
```sh
38+
Usage: sreporter [options]
39+
40+
Options:
41+
42+
-h, --help output usage information
43+
-V, --version output the version number
44+
-c, --config <path> Use configuration from this file. Defaults to ./.sreporterrc
45+
--es5 launch CLI with ES5 backward compatibility
46+
```
47+
48+
The Command-Line Interface uses a configuration file (default is `.sreporterrc`) to define the reporters configuration. The configuration file is mandatory in order to use the CLI.
3449

3550
Default options are as follows:
3651

bin/sreporter

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,14 @@ var CLI = {
1919
CLIEngine = require('../lib/cli');
2020
}
2121

22-
(new CLIEngine()).launchReporters();
22+
(new CLIEngine(program.config)).launchReporters();
2323
}
2424

2525
};
2626

2727
program
2828
.version(version)
29+
.option('-c, --config <path>', 'Use configuration from this file. Defaults to ./.sreporterrc')
2930
.option('--es5', 'launch CLI with ES5 backward compatibility')
3031
.parse(process.argv);
3132

build/api.js

Lines changed: 0 additions & 13 deletions
This file was deleted.

build/cli.js

Lines changed: 0 additions & 67 deletions
This file was deleted.

build/reporter.enum.js

Lines changed: 0 additions & 14 deletions
This file was deleted.

build/reporter.factory.js

Lines changed: 0 additions & 115 deletions
This file was deleted.

0 commit comments

Comments
 (0)