Comparing version
23
catn8.js
@@ -11,6 +11,8 @@ var pkg = require( './lib/packages' ), | ||
watching_config = {}, | ||
watching_dir = {}; | ||
watching_dir = {}, | ||
nowatch = false; | ||
function catn8( path ) { | ||
pwd = pkg.path.resolve( process.cwd(), path ); | ||
function catn8( path, nw ) { | ||
nowatch = !!nw; | ||
pwd = pkg.path.resolve( process.cwd(), path ); | ||
@@ -51,8 +53,10 @@ var walkies = walker.start( pwd, onfindconfig ); | ||
console.log( 'found configuration and listening to: ', conf.__meta__.pwd ); | ||
if ( nowatch !== true ) { | ||
console.log( 'found configuration and listening to: ', conf.__meta__.pwd ); | ||
conf.__meta__.watcher = | ||
watching_config[config_path] = | ||
watching_dir[conf.__meta__.pwd] = | ||
watching_dir[conf.source.dir] = watcher.start( conf.source.dir, onchange, conf ); | ||
conf.__meta__.watcher = | ||
watching_config[config_path] = | ||
watching_dir[conf.__meta__.pwd] = | ||
watching_dir[conf.source.dir] = watcher.start( conf.source.dir, onchange, conf ); | ||
} | ||
@@ -66,3 +70,4 @@ file.create( conf ); | ||
watching_dir[dir_path] = watcher.start( dir_path, ondirchange, dir_path ); | ||
if ( nowatch !== true ) | ||
watching_dir[dir_path] = watcher.start( dir_path, ondirchange, dir_path ); | ||
} | ||
@@ -69,0 +74,0 @@ |
var Templ8 = require( 'Templ8' ); | ||
module.exports = new Templ8( '{{begin.contents if begin|exists}}', | ||
module.exports = new Templ8( '{{ begin.contents if begin|exists }}', | ||
'{% for file in file_list %}', | ||
'\n/*~ {{ file.path }} ~*/\n', | ||
'{{ file.contents if file.contents|exists }}', | ||
'{% if file.contents|exists %}', | ||
'{{ file.contents }}', | ||
'{% endif %}', | ||
'{% forempty %}', | ||
'\n/*~ NO FILES FOUND ~*/\n', | ||
'{% endfor %}', | ||
'\n{{end.contents if end|exists}}', { | ||
'\n{{ end.contents if end|exists }}', { | ||
compiled : true, | ||
id : 'catn8r' | ||
} ); |
@@ -12,6 +12,6 @@ { | ||
"dependencies" : { | ||
"Templ8" : ">= 0.9.20", | ||
"Templ8" : ">= 0.9.21", | ||
"clean-css" : ">= 0.6.0", | ||
"d8" : ">= 0.4.0", | ||
"m8" : ">= 0.3.4", | ||
"m8" : ">= 0.3.8", | ||
"mime" : ">= 1.2.7", | ||
@@ -38,3 +38,3 @@ "mkdirp" : ">= 0.3.4", | ||
}, | ||
"version" : "0.0.5" | ||
"version" : "0.0.7" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
14687
-11.6%17
-63.04%275
-12.14%Updated
Updated