UNPKG
electronmon
Version:
latest (2.0.4)
2.0.4
2.0.3
2.0.2
2.0.1
2.0.0
1.1.2
1.1.1
1.1.0
1.0.1
1.0.0
0.7.1
0.7.0
0.6.0
0.5.1
0.5.0
0.4.0
0.3.0
0.2.0
0.1.3
0.1.2
0.1.1
0.1.0
0.0.2
0.0.1
watch and reload your electron app the easy way
github.com/catdad/electronmon
catdad/electronmon
electronmon
/
src
/
watch.js
12 lines
(8 loc)
•
285 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
const
watchboy =
require
(
'watchboy'
);
const
PATTERNS
= [
'**/*'
,
'!node_modules'
,
'!node_modules/**/*'
,
'!.*'
,
'!**/*.map'
];
module
.
exports
=
(
{ root, patterns }
) =>
{
const
watcher =
watchboy
([...
PATTERNS
, ...patterns.
map
(
s
=>
`
${s}
`
)], {
cwd
: root });
return
watcher; };