Init
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
// Depedencies
|
||||
var chokidar = require( 'chokidar' ),
|
||||
path = require( 'path' ),
|
||||
colors = require( 'colors' );
|
||||
|
||||
// Working directory
|
||||
var cwd = process.cwd();
|
||||
|
||||
// Watcher
|
||||
var watcher = chokidar.watch(
|
||||
cwd,
|
||||
{
|
||||
ignored : /[\/\\]\./,
|
||||
ignoreInitial : true
|
||||
}
|
||||
);
|
||||
|
||||
watcher.on( 'add', ( path ) =>
|
||||
{
|
||||
console.log( 'add:'.green.bold, path );
|
||||
} );
|
||||
|
||||
watcher.on( 'change', ( path ) =>
|
||||
{
|
||||
console.log( 'change:'.green.bold, path );
|
||||
} );
|
||||
|
||||
watcher.on( 'unlink', ( path ) =>
|
||||
{
|
||||
console.log( 'unlink:'.green.bold, path );
|
||||
} );
|
||||
|
||||
watcher.on( 'addDir', ( path ) =>
|
||||
{
|
||||
console.log( 'addDir:'.green.bold, path );
|
||||
} );
|
||||
|
||||
watcher.on( 'unlinkDir', ( path ) =>
|
||||
{
|
||||
console.log( 'unlinkDir:'.green.bold, path );
|
||||
} );
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"name": "code-spectator-app",
|
||||
"version": "0.0.1",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/brunosimon/code-spectactor"
|
||||
},
|
||||
"author": "Bruno Simon",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/brunosimon/code-spectactor/issues"
|
||||
},
|
||||
"homepage": "https://github.com/brunosimon/code-spectactor",
|
||||
"dependencies": {
|
||||
"chokidar": "^1.5.1",
|
||||
"colors": "^1.1.2"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user