c9 / architect

A simple yet powerful plugin system for large-scale node applications
MIT License
982 stars 129 forks source link

package.json provide before #34

Open bmatusiak opened 10 years ago

bmatusiak commented 10 years ago

it would be ideal to have a "before" under plugins.package.json

so one can tell a plugin to load before a provided plugin (if provided plugin is defined)

{
    "name": "auth",
    "version": "0.0.1",
    "main": "auth.js",
    "private": true,
    "plugin": {
        "consumes": ["database"],
        "provides": ["auth"]
    }
}
{
    "name": "auth-env",
    "version": "0.0.1",
    "main": "auth-env.js",
    "private": true,
    "plugin": {
        "before": ["auth"]
    }
}

this would allow plugin "auth-env" to register before "auth" without knowing "auth-env" is there, and allow for testing and dev plugins without the main plugin knowing about it