mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-03-10 22:44:29 +00:00
Reinit commit
This commit is contained in:
parent
e1622813aa
commit
ebe036e02a
15
app.coffee
15
app.coffee
@ -1,9 +1,10 @@
|
|||||||
chokidar = require("chokidar")
|
wrench = require("wrench")
|
||||||
|
|
||||||
watcher = chokidar.watch('/media/', {ignored: /^\./, persistent: true})
|
files = []
|
||||||
watcher.on('add', (path, stats) ->
|
|
||||||
console.log('File', path, 'has been added')
|
wrench.readdirRecursive('/media', (error, curFiles) ->
|
||||||
|
if error?
|
||||||
|
console.error error
|
||||||
|
else
|
||||||
|
console.log curFiles
|
||||||
)
|
)
|
||||||
|
|
||||||
# Only needed if watching is persistent.
|
|
||||||
#watcher.close()
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"coffee-script": "1.6.x",
|
"coffee-script": "1.6.x",
|
||||||
"chokidar": "0.6.x"
|
"wrench": "1.5.x"
|
||||||
},
|
},
|
||||||
"engines": [
|
"engines": [
|
||||||
"node >= 0.10.x"
|
"node >= 0.10.x"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user