New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ember-cli-puppet

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-cli-puppet

Send component actions from parent components / controllers.

  • 0.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

ember-cli-puppet Build Status

Turn components into puppets. Calling their actions or even functions from parent components / controllers.

Installation

ember install ember-cli-puppet

Usage

Assuming you mix in ember-cli-puppet/mixins/puppet into your-component, this addon allows you to do:

{{your-component onPuppet=(action (mut instance))}}

<button {{action (puppet-call instance 'func_name')}}>Call the func_name function of the component</button>
<button {{action (puppet-send instance 'act_name')}}>Invoke the act_name action of the component</button>

Alternatives

  • ember-component-inbound-actions - okay but can lead to rerender issues
  • Modifying parameters and having the component monitor for changes - pure ugliness

FAQ

  • Doesn't this break the DDAU principle? Absolutely! Use at your own risk.
  • When should I handle the offPuppet event? If you modify a controller's state during the onPuppet event, then it makes sense to clean up during offPuppet. You can skip that for components since they clean up after themselves once they get destroyed.

Contributing

Installation

  • git clone <repository-url>
  • cd ember-cli-puppet
  • npm install

Linting

  • npm run lint:js
  • npm run lint:js -- --fix

Running tests

  • ember test – Runs the test suite on the current Ember version
  • ember test --server – Runs the test suite in "watch mode"
  • npm test – Runs ember try:each to test your addon against multiple Ember versions

Running the dummy application

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

License

This project is licensed under the MIT License.

Keywords

FAQs

Package last updated on 02 Sep 2018

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