Skip to main content
highlighted:

We.js v1.8.0: More commands in CLI and new plugin manager!

New plugin manager

The We.js the plugin system has been rewritten to gain more performance and control

Now for a npm module be recognized as a plugin it need to have the keyword wejs-plugin

Plugins can have dependencies and are specified in the configuration package.json: wejs.dependencies

Example:

Set we-plugin-user as dependency

"wejs": {
  "dependencies": {
    "we-plugin-user": true
  }
}

How to install plugins in new plugin manager?

Use the we i command for install new plugins in one project. Example:

we i we-plugin-user

we i command install the related npm module, run the plugin install function and register this plugin in project package.json wejs.plugins configuration

Examples:

Plugin package.json example: https://github.com/wejs/we-plugin-auth/blob/master/package.json

Project package.json example (wejs.org site): https://github.com/wejs/site/blob/master/package.json

New CLI commands!

we install [pluginNames ...]

Install plugins, npm modules and themes in We.js projects

Example:

Install we-plugin-user and we-plugin-acl in current project
we i we-plugin-user we-plugin-acl

we remove [pluginNames ...]

remove plugins, npm modules and themes in We.js projects

Example:

Install we-plugin-user in current project:
we remove we-plugin-user

we model:list 

List all models and model attributes defined in current project

we record:find

Find one record

Example:

Find user with id 1
we record:find user 1

All Commands:



And more!

Heroku configuration generator and documentations:
We.js framework logo
Tags:

afterContent:
Widget: Comments 14:

Comments