#!/usr/bin/env coffee global._ = require 'underscore' global.Backbone = require 'backbone' fs = require 'fs' Logger = require '../src/scripts/logger' ModVersionParser = require '../src/scripts/models/mod_version_parser' require '../src/scripts/underscore_mixins' ######################################################################################################################## if process.argv.length is 3 sourceFileName = process.argv[2] else console.error """ USAGE: verify Verifies that a recipe book is in the proper format. If there is a problem, then a message will be displayed. Otherwise, the command has no output. """ process.exit -1 global.logger = new Logger level:Logger.WARNING try text = fs.readFileSync sourceFileName, 'UTF-8' parser = new ModVersionParser showAllErrors:true modVersion = parser.parse text catch e console.error e.message