Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ember-annotative-models

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-annotative-models

The default blueprint for ember-cli addons.

  • 0.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-60%
Maintainers
1
Weekly downloads
 
Created
Source

Ember-annotative-models

Introduces the concept of fields to models and allows for extremely annotative models

automatically registers fields based upon the models you have declared in your routes

Usage

Annotate your models like so:

`import {Importance, about, action} from 'ember-annotative-models'`
`import DS from 'ember-data'`

Friend = DS.Model.extend
  username: DS.attr "string",
    label: "User Name"
    description: "The unique gamer handle on the Playstation Now Network"
    display: ["show", "index"]
    modify: ["new"]
    priority: Importance.Important

  currentlyPlaying: DS.attr "string",
    label: "Currently Playing"
    description: "The video game this friend is playing at this moment"
    display: ["show", "index"]
    modify: ["edit"]
    priority: Importance.Important

`export default Friend`

Access field via the store

this.store.fieldsFor "friend"

Dependencies

ember-concurrency
ember-autox-core
ember-lodash

Because actions use es6 generators, be sure to include that in the polyfill

var EmberAddon = require('ember-cli/lib/broccoli/ember-addon');

module.exports = function(defaults) {
  var app = new EmberAddon(defaults, {
    babel: { includePolyfill: true }
  });

  return app.toTree();
};

Installation

  • git clone this repository
  • npm install
  • bower install

Running

  • ember server
  • Visit your app at http://localhost:4200.

Running Tests

  • npm test (Runs ember try:testall to test your addon against multiple Ember versions)
  • ember test
  • ember test --server

Building

  • ember build

For more information on using ember-cli, visit http://ember-cli.com/.

Keywords

FAQs

Package last updated on 20 May 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc