Skip to content

Commit 97fa276

Browse files
committed
Merge pull request #20 from AlteredConstants/master
Fix CLI and ignored file bugs
2 parents 2c49ce8 + 143e175 commit 97fa276

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

cli.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ var opts = {}
1515

1616
opts.port = program.port || '5776'
1717

18+
opts.path = program.path
19+
1820
opts.dir = program.dir || path.resolve('.')
1921

2022
if (program.poll) {

server.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,10 @@ module.exports = (opts, cb) => {
3232
const pathToWatch = opts.path || baseURL || '.'
3333
let ignoredPaths = [
3434
/[\/\\]\./,
35+
// Ignore relative, top-level dotfiles as well (e.g. '.gitignore').
36+
/^\.[^\/\\]/,
3537
'node_modules/**',
36-
baseURL + '/jspm_packages/**',
38+
(baseURL ? baseURL + '/' : '') + 'jspm_packages/**',
3739
'.git/**'
3840
]
3941
let chokidarOpts = Object.assign({

0 commit comments

Comments
 (0)