#!/usr/bin/env coffee # module dependencies Hey = require '../' program = require 'commander' fs = require 'fs' # Hey, Jack! hey = new Hey # set a default cli option process.argv.push '--server' if process.argv.length is 2 # setup cli program.version(JSON.parse(fs.readFileSync(__dirname + '/../package.json').toString()).version) .option('-i, --init', 'create a new blog in current directory') .option('-b, --build', 'update the cache and build out blog') .option('-p, --publish', 'update webserver with new/updated blog files') .option('-s, --server', 'test server') .parse process.argv # run do hey.build if program.build do hey.init if program.init do hey.publish if program.publish do hey.server if program.server