Skip to content

Commit 1aae212

Browse files
committed
Change main export
1 parent dc8046b commit 1aae212

File tree

8 files changed

+14
-15
lines changed

8 files changed

+14
-15
lines changed

.nycrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"include": ["dist", "{index,custom}.js"],
2+
"include": ["dist", "{index,register}.js"],
33
"all": true,
44
"reporter": ["lcov", "text"]
55
}

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,14 @@ $ node -r log-process-errors/register ...
2929

3030
# Usage (custom)
3131

32-
In order to customize options, `log-process-errors/custom` must be required
33-
like this instead:
32+
In order to customize options, this module must be required like this instead:
3433

3534
```bash
3635
$ npm install log-process-errors
3736
```
3837

3938
```js
40-
const { init } = require('log-process-errors/custom')
39+
const { init } = require('log-process-errors')
4140

4241
init(options)
4342
```
@@ -193,7 +192,7 @@ The following properties are also defined with the `getMessage` option:
193192
Logging can be stopped by firing the function returned by `logProcessErrors()`
194193

195194
```js
196-
const { init } = require('log-process-errors/custom')
195+
const { init } = require('log-process-errors')
197196

198197
const stopLogging = init(options)
199198

gulp/files.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"CHECK": [
3-
"{index,custom,gulpfile}.js",
3+
"{index,register,gulpfile}.js",
44
"{src,gulp,test}/*.js",
55
"{src,gulp,test}/**/*.js",
66
"*.md"
77
],
8-
"UNIT": ["{index,custom}.js", "src", "test"],
9-
"TEST": ["{index,custom,gulpfile}.js", "src", "gulp", "test", "*.md"],
8+
"UNIT": ["{index,register}.js", "src", "test"],
9+
"TEST": ["{index,register,gulpfile}.js", "src", "gulp", "test", "*.md"],
1010
"BUILD_SRC": ["src"],
1111
"BUILD_DIST": ["dist"],
12-
"DEV": ["{index,custom,gulpfile}.js", "src", "gulp", "test", "*.md"]
12+
"DEV": ["{index,register,gulpfile}.js", "src", "gulp", "test", "*.md"]
1313
}
File renamed without changes.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"name": "log-process-errors",
33
"version": "0.13.16",
4-
"main": "register.js",
4+
"main": "index.js",
55
"files": [
66
"dist",
7-
"custom.js",
7+
"register.js",
88
"!*~"
99
],
1010
"scripts": {

register.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// This file is unit tested but in a child process
33
'use strict'
44

5-
const { init } = require('./custom')
5+
const { init } = require('.')
66

77
// Logging init is automatically performed by `node -r log-process-errors` or
88
// `require('log-process-errors')`.
@@ -15,5 +15,5 @@ const { init } = require('./custom')
1515
// Also it ensures this code is called as early as possible, to make sure early
1616
// events are caught.
1717
// To either defer the call or to pass options, one must use instead
18-
// `require('log-process-errors/custom')(options)`
18+
// `require('log-process-errors').init(options)`
1919
init()

test/helpers/emit/fire.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
const { argv } = require('process')
44

5-
const { init } = require('../../../custom')
5+
const { init } = require('../../..')
66

77
const { ALL_EVENTS } = require('./main')
88

test/helpers/init.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
const sinon = require('sinon')
44

5-
const { init } = require('../../custom')
5+
const { init } = require('../..')
66

77
// Call `logProcessErrors()` then return spied objects and `stopLogging()`
88
const startLoggingNoOpts = function() {

0 commit comments

Comments
 (0)