Skip to content

Commit

Permalink
fix(docz-core): watcher close
Browse files Browse the repository at this point in the history
  • Loading branch information
pedronauck committed Dec 4, 2018
1 parent 8b3fdc9 commit caa8151
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions packages/docz-core/src/states/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const state = (config: Config): State => {

return {
init: updateConfig(config),
close: watcher.close,
close: () => watcher.close(),
update: async params => {
const update = updateConfig(config)
const fn = async () => update(params)
Expand All @@ -58,7 +58,7 @@ export const state = (config: Config): State => {
watcher.on('change', fn)
watcher.on('unlink', fn)

return watcher.close
return () => watcher.close()
},
}
}
4 changes: 2 additions & 2 deletions packages/docz-core/src/states/entries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const state = (entries: Entries, config: Config): State => {

return {
init: updateEntries(entries),
close: watcher.close,
close: () => watcher.close(),
update: async params => {
const update = updateEntries(entries)

Expand All @@ -48,7 +48,7 @@ export const state = (entries: Entries, config: Config): State => {
}
})

return watcher.close
return () => watcher.close()
},
}
}
4 changes: 2 additions & 2 deletions packages/docz-theme-default/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ module.exports = {
devtool: 'source-map',
output: {
path: path.join(__dirname, '/dist'),
filename: `index.js`,
libraryTarget: 'commonjs2',
filename: 'index.js',
libraryTarget: 'umd',
},
module: {
rules: [
Expand Down

0 comments on commit caa8151

Please sign in to comment.