 # -- DEPENDENCIES --------------------------------------------------------------
 
-Args      = require 'args-js'
-fs        = require 'fs-extra'
-wrench    = require 'wrench'
-path      = require 'path'
-chalk     = require 'chalk'
-sh        = require 'execSync'
-_         = require 'lodash'
-Sails     = require 'sails/lib/app'
-sailsBin  = path.join __dirname, '../node_modules/sails/bin/sails.js'
-sailsLift = require 'sails/bin/sails-lift'
-_ioClient = require('./sails.io')(require('socket.io-client'))
+Args             = require 'args-js'
+fs               = require 'fs-extra'
+wrench           = require 'wrench'
+path             = require 'path'
+chalk            = require 'chalk'
+sh               = require 'execSync'
+_                = require 'lodash'
+localDependecies = path.join __dirname, '../node_modules'
+sailsBin         = path.join localDependecies, 'sails/bin/sails.js'
+Sails            = require (path.join localDependecies, 'sails/lib/app')
+sailsLift        = require (path.join localDependecies, 'sails/bin/sails-lift')
+_ioClient        = require('./sails.io')(require('socket.io-client'))
 
 # -- GLOBALS ------------------------------------------------------------------
 

  @writePluginFile: (source, dir, done) ->
    args = Args([
      {src:  Args.STRING   | Args.Required}
      {dir : Args.STRING   | Args.Optional, _default: "#{DEFAULT.PATH}/config/plugins.coffee"}
      {done: Args.FUNCTION | Args.Optional, _default: undefined}
    ], arguments)


  ###
  @clean: (dir, done) ->
    args = Args([
      {dir : Args.STRING   | Args.Optional, _default: "#{process.cwd()}/#{OPTIONS.NAME}"}
      {done: Args.FUNCTION | Args.Optional, _default: undefined}
    ], arguments)

