kopia lustrzana https://github.com/c9/core
29 wiersze
678 B
Plaintext
29 wiersze
678 B
Plaintext
![]() |
#!/usr/bin/env node
|
||
|
|
||
|
// Architect
|
||
|
var architect = require("architect");
|
||
|
|
||
|
// Add ability to load AMD modules
|
||
|
require("amd-loader");
|
||
|
|
||
|
var verbose = process.argv.indexOf("--verbose") + 1
|
||
|
|| process.argv.indexOf("-v") + 1;
|
||
|
|
||
|
architect.resolveConfig(require("../configs/cli.js")(),
|
||
|
__dirname + "/../plugins", function (err, config) {
|
||
|
if (err) throw err.message;
|
||
|
|
||
|
var cli;
|
||
|
var app = architect.createApp(config, function(err, app){
|
||
|
if (err) throw err;
|
||
|
|
||
|
cli.start();
|
||
|
});
|
||
|
app.on("service", function(name, plugin){
|
||
|
if (name == "cli")
|
||
|
cli = plugin;
|
||
|
|
||
|
if (!plugin.name)
|
||
|
plugin.name = name;
|
||
|
});
|
||
|
});
|