#!/usr/bin/env coffee #+--------------------------------------------------------------------+ #| Huginn #+--------------------------------------------------------------------+ #| Copyright DarkOverlordOfData (c) 2013 #+--------------------------------------------------------------------+ #| #| This file is a part of Huginn #| #| Hugin is free software; you can copy, modify, and distribute #| it under the terms of the MIT License #| #+--------------------------------------------------------------------+ # hugin = require("../lib/huginn") $usage = """ Usage: huginn create PATH [-b ] cd PATH huginn build [--drafts] [--dev] huginn serve [--dev] Options: -b [--branch] # branch name subfolder, defaults to master -d [--drafts] # publish _drafts folder -h [--help] # display this message -p [--port] # port to use -v [--version] # display version --dev # use config-dev.yml """ switch process.argv[2] when 'create' then hugin.create process.argv.slice(3)... when 'build' then hugin.build process.argv.slice(3) when 'serve' then hugin.serve process.argv.slice(3) when '--version' then console.log "huginn v"+require('../package.json').version when '-v' then console.log "huginn v"+require('../package.json').version when '--help' then console.log $usage when '-h' then console.log $usage else console.log $usage