Skip to content

Commit

Permalink
fix: include object-spread-syntax plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Dec 17, 2017
1 parent 7045a03 commit 060d3de
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"lib"
],
"dependencies": {
"babel-plugin-syntax-object-rest-spread": "^6.13.0",
"find-up": "^2.1.0",
"istanbul-lib-instrument": "^1.7.5",
"test-exclude": "^4.1.1"
Expand Down
4 changes: 3 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {realpathSync} from 'fs'
import {dirname} from 'path'
import {programVisitor} from 'istanbul-lib-instrument'
import babelSyntaxObjectRestSpread from 'babel-plugin-syntax-object-rest-spread'

const testExclude = require('test-exclude')
const findUp = require('find-up')
Expand All @@ -23,7 +24,7 @@ function makeShouldSkip () {
let config = {}
if (Object.keys(opts).length > 0) {
// explicitly configuring options in babel
// takes precendence.
// takes precedence.
config = opts
} else if (nycConfig.include || nycConfig.exclude) {
// nyc was configured in a parent process (keep these settings).
Expand Down Expand Up @@ -52,6 +53,7 @@ function makeShouldSkip () {
function makeVisitor ({types: t}) {
const shouldSkip = makeShouldSkip()
return {
inherits: babelSyntaxObjectRestSpread,
visitor: {
Program: {
enter (path) {
Expand Down

0 comments on commit 060d3de

Please sign in to comment.