Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

cleanup for plugin.js

  • Loading branch information...
commit 0c10c5e8543078bff256d53ce59119907bbdf6ed 1 parent 40a895d
@crcn authored
Showing with 29 additions and 11 deletions.
  1. BIN  .DS_Store
  2. 0  .npmignore
  3. BIN  conf/.DS_Store
  4. BIN  lib/.DS_Store
  5. BIN  lib/beans/.DS_Store
  6. +6 −6 lib/bootstrap.js
  7. +1 −1  lib/{beans → plugins}/cbd.command.details/index.js
  8. +1 −0  lib/{beans → plugins}/cbd.command.dir/index.js
  9. +1 −0  lib/{beans → plugins}/cbd.command.execute/index.js
  10. +1 −0  lib/{beans → plugins}/cbd.command.helpmenu/index.js
  11. +3 −2 lib/{beans → plugins}/cbd.command.install/index.js
  12. +1 −0  lib/{beans → plugins}/cbd.command.link/index.js
  13. +1 −0  lib/{beans → plugins}/cbd.command.list/index.js
  14. +1 −0  lib/{beans → plugins}/cbd.command.prls/index.js
  15. +1 −0  lib/{beans → plugins}/cbd.command.publish/index.js
  16. +1 −0  lib/{beans → plugins}/cbd.command.untouch/index.js
  17. +1 −0  lib/{beans → plugins}/cbd.command.version/index.js
  18. +1 −0  lib/{beans → plugins}/cbd.core/index.js
  19. 0  lib/{beans → plugins}/cbd.projects/config.js
  20. 0  lib/{beans → plugins}/cbd.projects/execute
  21. 0  lib/{beans → plugins}/cbd.projects/getUpdatedFiles.js
  22. +3 −1 lib/{beans → plugins}/cbd.projects/index.js
  23. 0  lib/{beans → plugins}/cbd.projects/model.js
  24. 0  lib/{beans → plugins}/cbd.projects/mostRecent
  25. 0  lib/{beans → plugins}/cbd.projects/processor.js
  26. 0  lib/{beans → plugins}/cbd.projects/watcher.js
  27. +5 −0 lib/plugins/router/index.js
  28. +1 −1  package.json
View
BIN  .DS_Store
Binary file not shown
View
0  .npmignore
No changes.
View
BIN  conf/.DS_Store
Binary file not shown
View
BIN  lib/.DS_Store
Binary file not shown
View
BIN  lib/beans/.DS_Store
Binary file not shown
View
12 lib/bootstrap.js
@@ -1,5 +1,4 @@
-var router = require("beanpoll").router(),
-pluginLoader = require("plugin").loader(),
+var plugin = require("plugin")(),
EventEmitter = require('events').EventEmitter;
require('./config');
@@ -13,7 +12,7 @@ exports.init = function(callback) {
- if(initialized) return callback(router);
+ if(initialized) return callback(loaer.module("router"));
em.addListener('init', callback);
@@ -22,9 +21,10 @@ exports.init = function(callback) {
initialized = true;
- pluginLoader.options(router).
- require(__dirname + '/beans').
- init();
+ var router = plugin.
+ require(__dirname + '/plugins').
+ load().
+ module("router");
router.pull('load/config', function() {
View
2  lib/beans/cbd.command.details/index.js → lib/plugins/cbd.command.details/index.js
@@ -7,7 +7,7 @@ vine = require('vine');
*/
-
+exports.require = ["router"];
exports.plugin = function(router) {
router.on({
View
1  lib/beans/cbd.command.dir/index.js → lib/plugins/cbd.command.dir/index.js
@@ -5,6 +5,7 @@
var vine = require('vine'),
exec = require('child_process').exec;
+exports.require = ["router"];
exports.plugin = function(router) {
router.on({
View
1  lib/beans/cbd.command.execute/index.js → lib/plugins/cbd.command.execute/index.js
@@ -1,3 +1,4 @@
+exports.require = ["router"];
exports.plugin = function(router) {
router.on({
View
1  lib/beans/cbd.command.helpmenu/index.js → lib/plugins/cbd.command.helpmenu/index.js
@@ -1,5 +1,6 @@
var celeri = require('celeri');
+exports.require = ["router"];
exports.plugin = function(router) {
var helpMenu = {};
View
5 lib/beans/cbd.command.install/index.js → lib/plugins/cbd.command.install/index.js
@@ -2,7 +2,8 @@ var vine = require('vine'),
exec = require('child_process').exec,
fs = require('fs');
-exports.plugin = function(router) {
+exports.require = ["router"];
+exports.plugin = function(router, loader) {
//include third-party modules now.
@@ -15,7 +16,7 @@ exports.plugin = function(router) {
}
- this.require(pluginsDir);
+ loader.require(pluginsDir);
function exec2(cmd, cwd, callback) {
View
1  lib/beans/cbd.command.link/index.js → lib/plugins/cbd.command.link/index.js
@@ -5,6 +5,7 @@ fs = require('fs');
* "Untouches" target projects so they appear to be updated in cupboard
*/
+exports.require = ["router"];
exports.plugin = function(router) {
function findLink(path, moduleName, callback) {
View
1  lib/beans/cbd.command.list/index.js → lib/plugins/cbd.command.list/index.js
@@ -9,6 +9,7 @@ _ = require('underscore');
* lists all projects within cupboard
*/
+exports.require = ["router"];
exports.plugin = function(router) {
View
1  lib/beans/cbd.command.prls/index.js → lib/plugins/cbd.command.prls/index.js
@@ -1,3 +1,4 @@
+exports.require = ["router"];
exports.plugin = function(router) {
router.on({
View
1  lib/beans/cbd.command.publish/index.js → lib/plugins/cbd.command.publish/index.js
@@ -1,5 +1,6 @@
var vine = require('vine');
+exports.require = ["router"];
exports.plugin = function(router) {
router.on({
View
1  lib/beans/cbd.command.untouch/index.js → lib/plugins/cbd.command.untouch/index.js
@@ -2,6 +2,7 @@
* "Untouches" target projects so they appear to be updated in cupboard
*/
+exports.require = ["router"];
exports.plugin = function(router) {
router.on({
View
1  lib/beans/cbd.command.version/index.js → lib/plugins/cbd.command.version/index.js
@@ -5,6 +5,7 @@
var vine = require('vine'),
fs = require('fs');
+exports.require = ["router"];
exports.plugin = function(router) {
router.on({
View
1  lib/beans/cbd.core/index.js → lib/plugins/cbd.core/index.js
@@ -2,6 +2,7 @@ var chowder = require('chowder'),
vine = require('vine'),
path = require('path');
+exports.require = ["router"];
exports.plugin = function(router) {
var include = [process.env.MAIN_CFG];
View
0  lib/beans/cbd.projects/config.js → lib/plugins/cbd.projects/config.js
File renamed without changes
View
0  lib/beans/cbd.projects/execute → lib/plugins/cbd.projects/execute
File renamed without changes
View
0  lib/beans/cbd.projects/getUpdatedFiles.js → lib/plugins/cbd.projects/getUpdatedFiles.js
File renamed without changes
View
4 lib/beans/cbd.projects/index.js → lib/plugins/cbd.projects/index.js
@@ -3,8 +3,10 @@ vine = require('vine'),
path = require('path'),
exec = require('child_process').exec;
+exports.require = ["router"];
exports.plugin = function(router) {
-
+
+
var Project, config, commands = {};
router.on({
View
0  lib/beans/cbd.projects/model.js → lib/plugins/cbd.projects/model.js
File renamed without changes
View
0  lib/beans/cbd.projects/mostRecent → lib/plugins/cbd.projects/mostRecent
File renamed without changes
View
0  lib/beans/cbd.projects/processor.js → lib/plugins/cbd.projects/processor.js
File renamed without changes
View
0  lib/beans/cbd.projects/watcher.js → lib/plugins/cbd.projects/watcher.js
File renamed without changes
View
5 lib/plugins/router/index.js
@@ -0,0 +1,5 @@
+var beanpoll = require("beanpoll");
+
+exports.plugin = function () {
+ return beanpoll.router();
+}
View
2  package.json
@@ -17,7 +17,7 @@
"underscore": "*",
"structr": "0.2.x",
"beanpoll": "<0.3.0",
- "plugin": "<0.2.0",
+ "plugin": "<0.3.0",
"vine": "0.0.10",
"chowder": "*",
"watch_r": "*",
Please sign in to comment.
Something went wrong with that request. Please try again.