Skip to content
This repository has been archived by the owner on May 3, 2022. It is now read-only.

Commit

Permalink
Better default ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed Aug 18, 2017
1 parent 01a4fbd commit e2cd38a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
12 changes: 2 additions & 10 deletions bin/watch/get-watch-config.js
@@ -1,17 +1,9 @@
'use strict'

const getIgnoredFromGit = require('ignored')
const ignoredDirectories = require('ignore-by-default').directories()
const path = require('path')

const DEFAULT_IGNORED = [
'.git',
'node_modules',
'.nyc_output',
'.sass-cache',
'coverage',
/\.swp$/
]

const getIgnoredFiles = ({ cli, filepkg }) => {
const set = new Set()
const addIgnore = set.add.bind(set)
Expand All @@ -22,7 +14,7 @@ const getIgnoredFiles = ({ cli, filepkg }) => {
if (cli.flags.ignore) cli.flags.ignore.forEach(addIgnore)
if (filepkg.ignore) filepkg.ignore.forEach(addIgnore)

DEFAULT_IGNORED.forEach(addIgnore)
ignoredDirectories.forEach(addIgnore)

return Array.from(set)
}
Expand Down
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -37,6 +37,7 @@
"clear-module": "~2.1.0",
"express": "~4.15.4",
"get-port": "~3.1.0",
"ignore-by-default": "~1.0.1",
"ignored": "~2.0.4",
"ip": "~1.1.5",
"json-future": "~2.1.2",
Expand Down

0 comments on commit e2cd38a

Please sign in to comment.