 		,
 	]
 	action: (params, options, done) ->
+		fs = require('fs')
+		path = require('path')
 		resin = require('resin-sdk')
 		Promise = require('bluebird')
 		resinSync = require('resin-sync')


		Notice that explicitly passed command options override the ones set in the configuration file.

		Examples:

			$ resin sync MyApp
			$ resin sync 7cf02a6
			$ resin sync 7cf02a6 --port 8080
			$ resin sync 7cf02a6 --ignore foo,bar
			$ resin sync 7cf02a6 -v
	'''
	permission: 'user'
	primary: true
	options: [
			signature: 'source'
			parameter: 'path'
			description: 'custom source path'
			alias: 's'
		,
			signature: 'ignore'
			parameter: 'paths'


module.exports =
	signature: 'sync [uuid]'
	description: '(beta) sync your changes to a device'
	help: '''
		WARNING: If you're running Windows, this command only supports `cmd.exe`.

		Use this command to sync your local changes to a certain device on the fly.

		After every 'resin sync' the updated settings will be saved in
		'<source>/.resin-sync.yml' and will be used in later invocations. You can
		also change any option by editing '.resin-sync.yml' directly.

		Here is an example '.resin-sync.yml' :

			$ cat $PWD/.resin-sync.yml
			uuid: 7cf02a6
			destination: '/usr/src/app'
			before: 'echo Hello'
			ignore:
				- .git
