Skip to content

Commit

Permalink
adding help message
Browse files Browse the repository at this point in the history
  • Loading branch information
joelklabo committed Jun 29, 2012
1 parent dec4034 commit 2dfe280
Showing 1 changed file with 27 additions and 2 deletions.
29 changes: 27 additions & 2 deletions main.js
Expand Up @@ -11,11 +11,36 @@ var argv = require('optimist')
.argv
;

var dir = argv.d
, out = argv.o
var dir = argv.d
, out = argv.o
, compress = argv.x
, help = argv.h
;

if (help) {
usage = ''
+ '\n'
+ 'Effortless\n'
+ '*********************************************************************************************\n'
+ 'With no flags, Effortless watches a directory for changes in .less files.\n'
+ 'When a change is observed the file is compiled into a new css file.\n'
+ 'Default options are current directory with no minification.\n'
+ '*********************************************************************************************\n'
+ '{Usage}: effortless [options]\n'
+ '\n'
+ '{Options}:\n'
+ ' -d, Directory to watch files in.\n'
+ ' -o, Output directory.\n'
+ ' -x, Minification flag.\n'
+ '\n'
+ '{Example}: effortless -x -d less/ -o css/\n'
+ '\n'
+ '';

console.log(usage)
process.exit()
}

var compileLess = function (f, file) {
if (compress) {
return 'lessc -x ' + f + ' > ' + out + '/' + file
Expand Down

0 comments on commit 2dfe280

Please sign in to comment.