Socket
Book a DemoInstallSign in
Socket

broccoli-duplicate-watched-tree-finder

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

broccoli-duplicate-watched-tree-finder

A utility to find duplicated watched Broccoli trees.

0.1.0
latest
Source
npmnpm
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

broccoli-duplicate-watched-tree-finder

A utility to list all watched Broccoli trees and find duplicates.

Duplicate watched trees might consume extra resources on your machine. So why not avoid them?

Installation

npm install -g broccoli-duplicate-watched-tree-finder

Usage

cd into a directory that contains a Brocfile.js. An example Brocfile.js with duplicate watched trees could be:

var pickFiles = require('broccoli-static-compiler'),
    compileSass = require('broccoli-sass'),
    mergeTrees = require('broccoli-merge-trees');

var app = 'app';

var styles = 'app/styles'
var styles = compileSass(styles, 'app.scss', 'assets/app.css');

module.exports = mergeTrees([app, styles]);

Then run the broccoli-duplicate-watched-tree-finder command within the directory and you will see output like:

$ broccoli-duplicate-watched-tree-finder
All watched trees:
  - app
  - app/styles

Duplicate watched trees:
 - app/styles is inside app
You should wrap the trees shown in blue in broccoli-unwatched-tree.

You can fix the problem by requiring broccoli-unwatched-tree and wrapping '/app/styles' in it:

var pickFiles = require('broccoli-static-compiler'),
    unwatched = require('broccoli-unwatched-tree'),
    compileSass = require('broccoli-sass'),
    mergeTrees = require('broccoli-merge-trees');

var app = 'app';

var styles = unwatched('app/styles')
var styles = compileSass(styles, 'app.scss', 'assets/app.css');

module.exports = mergeTrees([app, styles]);

Running the command again will now give you:

$ broccoli-duplicate-watched-tree-finder
All watched trees:
  - app

Nice! You do not have any duplicate watched paths.

Notice: The finder performs a full Broccoli build, so the command might take a few seconds to finish depending on how complex your build is.

FAQs

Package last updated on 27 Aug 2014

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.