@letscomunica/loopback-company-scope-mixin

0.0.4 • Public • Published

CompanyScope Loopback Mixin

This module is designed for the Strongloop Loopback framework. The mixin focus in the company scope, defining its relationship, hook before saving (adding it to user) and method to find it.

To implement copy this file to mixins folder or clone this private repository (requires adding the package folder path to mixins inside model-config json file), and add "BaseModel": true in mixins on YourModel.json file.

Author: Lets Comunica

LAST VERSION: 0.0.4

Install

  npm install --save git+ssh://git@bitbucket.org/letscomunicadev/loopback-lets-company-scope-mixin.git#v0.0.2

Updates

Made a modification? Test it at least in one project before submiting a version. It still needs unit testing and CI with projects. After everything seems perfectly up-to-date, run the following steps:

1. Commit and push your updates using Let's Bitbucket credentials

2. Change and commit a new tag version (always check and update the last version here and in package.json):

$ git tag -a vX.X.X -m "version_message"

3. Push the new tag version to remote repository:

$ git push origin vX.X.X  # Version needs to be the same from commit

4. Run npm installation with the newest version:

  npm install --save git+ssh://git@bitbucket.org/letscomunicadev/loopback-lets-company-scope-mixin.git#vX.X.X

Configure

To use with your Models add the mixins attribute to the definition object of your model config.

  {
    "name": "Widget",
    "properties": {
      "name": {
        "type": "string",
      },
    },
    "mixins": {
      "CompanyScope" : true,
    },
  },

Package Sidebar

Install

npm i @letscomunica/loopback-company-scope-mixin

Weekly Downloads

0

Version

0.0.4

License

ISC

Unpacked Size

5.43 kB

Total Files

4

Last publish

Collaborators

  • juniodesouza
  • davikawasaki
  • viniciusromano
  • matheusflausino