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

ember-cli-tree-shake

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-tree-shake

Use tree shaking to discover dead code in your Ember app

  • 0.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6
increased by50%
Maintainers
1
Weekly downloads
 
Created
Source

ember-cli-tree-shake

This Ember CLI addon uses tree shaking to discover dead code within an Ember application.

Currently, only dead/unused computed properties are considered, with a few caveats:

  • Mixins don't get considered when considering aliveness of a property

Installation

  • npm install --save-dev ember-cli-tree-shake

Running

  • ember tree-shake

This addon will currently look for computed properties and observers that are not actually used in either internal methods or in the associated template. For example:

Ember.Component.extend({
  foo: true,

  used: Ember.computed.alias('foo'),

  unused: Ember.computed.not('used')
});

ember-cli-tree-shake will identity that the unused property isn't actually used within the component.

However, if there was an associated template:

{{#if (or used unused)}}
  Hello, world!
{{/if}}

In this case, the "unused" property is actually being evaluated in the template, and therefor isn't actually dead code. ember-cli-tree-shake would no longer identify it as such.

Finally, ember-cli-tree-shake will do a 2nd, 3rd ... nth pass over the tree and keep shaking until no more dead code falls off.

Contributing

  • npm test

Keywords

FAQs

Package last updated on 29 Dec 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