 #!/usr/bin/env coffee
-
-#{
-#    "type": "object",
-#    "properties": {
-#      "on": {
-#        "type": "boolean",
-#        "required": true,
-#        "default": false
-#      },
-#      "color": {
-#        "type": "string",
-#        "required": true
-#      }
-#    }
-#  }
-
 
 fs = require 'fs'
 _  = require 'lodash'

debug = require('debug')('channel-to-json-schema')

class ParseChannelSchemaToJSONSchema
  constructor: () ->
    @channel_infile = commander.infile
    @channel_outfile = commander.outfile
    @channel_form_outfile = commander.form

  channel: =>
    JSON.parse fs.readFileSync @channel_infile

  run: =>
    newForm = []
    newChannel =

  .option('-i, --infile [path]',  'Path to the channel file to input')
  .option('-o, --outfile [path]',  'Path to the channel file to output')
  .option('-f, --form [path]',  'Path to the schema form file to output')
  .option('-c, --channel-config [path]',  'Path to the channel-config file to output')
  .parse(process.argv);

commander.help() unless commander.infile?

converter = new ParseChannelSchemaToJSONSchema channel_infile: commander.infile?,
  messageSchemaFile: commander.outfile?
converter.run2()
