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

fb-flo-brunch

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fb-flo-brunch

A Brunch plugin that maintains an fb-flo server while the watcher runs

  • 1.7.22
  • latest
  • Source
  • npm
  • Socket score

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

Dead-simple live injection of Brunch-built CSS/JS files in the browser

Build Status Dependency status Dev Dependency status Code Climate Test Coverage

NPM

Brunch? fb-flo? What?

  • Brunch is a kickass front-end app assets builder; basically it's what most people trod through the swamps of Grunt, Gulp or what-have-you for, only much, much better and far, far, simpler to use.
  • fb-flo is a great little system by Facebook to let you live update CSS or JS files inside an open browser page (instead of just reloading the whole thing). As it depends on JS runtime's hotswap capabilities, it's not available everywhere yet; but for Chrome, it kinda rules.

The only thing is, you need to write your own fb-flo server, which is a tiny Node.js program; most of the time, that just means copy-pasting the (small) example code from their homepage, and then running it. But for Brunch users, the ideal way would be through a plugin that auto-starts and auto-stops the server, and figures out automatically what to watch (the final results of the build pipeline).

So we made fb-flo-brunch: your lovely Brunch plugin to have automatic fb-flo capability over your watched build!

Installing

Get in your Brunch-using project's root directory, and just install the plugin:

$ npm install --save-dev fb-flo-brunch

Configuring

As most Brunch plugins do, this one Just Works™ out of the box. But we're just as nerdy as the next developer when it comes to customization… and fb-flo itself offers quite a few options. So you can tweak the plugin's behavior to your heart's content inside Brunch's config.plugins.fbFlo main key.

In the table below, the “fb-flo?” column states whether this is just an fb-flo option, directly forward to the server or resolver. For full details on their default values and behavior, check out the fb-flo doc.

Optionfb-flo?DescriptionDefault
enabledWhether the plugin is enabled or nottrue
hostserverWhat network interface to listen tosee fb-flo
messageThe message to log on the client-side (browser) when a resource just got updated live. The %s code will be replaced by the resource's name. The presence of this automatically defines fb-flo’s update resolver option.“%s has just been updated with new content”
messageColorA CSS color name for displaying the messageblack
messageLevelWhat console level to display message onlog
messageResourceColorA CSS color name for the resource name in message
pollingIntervalserversee fb-flosee fb-flo
portserverWhat port to listen to8888
resolverMatchresolver (match)see fb-flosee fb-flo
resolverReloadresolver (reload)Extends fb-flo's boolean-only values with anymatch sets, allowing for tremendous flexibilityfalse
useFilePollingserversee fb-flosee fb-flo
useWatchmanserversee fb-flosee fb-flo
verboseserverWhether to output everything on the wire…false
watchDotFilesserversee fb-flosee fb-flo

Contributing

We welcome all contributions, most importantly bug fixes, augmented test coverage and extended docs.

See CONTRIBUTING.md for details and guidelines on how to help.

License

This work is MIT-licensed and © 2015 Christophe Porteneuve.

Check LICENSE for full details.

FAQs

Package last updated on 09 Mar 2015

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