mirror of
https://github.com/mtan93/homebridge.git
synced 2026-03-08 05:31:55 +00:00
Plugin support
- Homebridge is now designed to be `npm install`d globally and executed via "homebridge" script - Remove all specific accessories/platforms except for an example - New internal structure and "cli"
This commit is contained in:
29
lib/cli.js
Normal file
29
lib/cli.js
Normal file
@@ -0,0 +1,29 @@
|
||||
var program = require('commander');
|
||||
var hap = require("hap-nodejs");
|
||||
var version = require('./version');
|
||||
var Server = require('./server').Server;
|
||||
var Plugin = require('./plugin').Plugin;
|
||||
var User = require('./user').User;
|
||||
|
||||
'use strict';
|
||||
|
||||
module.exports = function() {
|
||||
|
||||
console.log("_____________________________________________________________________");
|
||||
console.log("IMPORTANT: Homebridge is in the middle of some big changes.");
|
||||
console.log(" Read more about it here:");
|
||||
console.log(" https://github.com/nfarina/homebridge/wiki/Migration-Guide");
|
||||
console.log("_____________________________________________________________________");
|
||||
console.log("");
|
||||
|
||||
program
|
||||
.version(version)
|
||||
.option('-P, --plugin-path [path]', 'look for plugins installed at [path] as well as node_modules', function(p) { Plugin.addPluginPath(p); })
|
||||
.option('-D, --debug', 'turn on debug level logging', function() { logger.setDebugEnabled(true) })
|
||||
.parse(process.argv);
|
||||
|
||||
// Initialize HAP-NodeJS with a custom persist directory
|
||||
hap.init(User.persistPath());
|
||||
|
||||
new Server().run();
|
||||
}
|
||||
Reference in New Issue
Block a user