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

broccoli-ractive

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

broccoli-ractive

This [broccoli](https://github.com/broccolijs/broccoli) plugin compiles Ractive component files. If you're not yet familiar with component files, [start here](https://github.com/ractivejs/component-spec).

  • 0.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
Maintainers
1
Weekly downloads
 
Created
Source

broccoli-ractive

This broccoli plugin compiles Ractive component files. If you're not yet familiar with component files, start here.

To try it out:

# Clone this repo and set it up
git clone https://github.com/ractivejs/broccoli-ractive.git
cd broccoli-ractive
npm i

# Fire up broccoli
broccoli serve

Once you're up and running, navigate to localhost:4200. You should see a clock - the one defined in the clock.html component file.

For the demo, we're converting to an AMD module, but you can also generate node.js modules (e.g. for use with the broccoli-browserify plugin) or ES6 modules.

Installation

npm i -D broccoli-ractive    # `i` is short for `install`, `-D` means `--save-dev`

Usage

Inside your brocfile.js:

var compileRactive = require( 'broccoli-ractive' );

var tree = compileRactive( inputTree, {
	destDir: 'path/to/output'
});

The inputTree option can be a string, e.g. path/to/ractive_components. The second argument is an object with the following options:

  • destDir - self-explanatory!
  • files - optional, defaults to [**/*.html] (i.e. all HTML files in the input tree). An array of file minimatch patterns to match.
  • type - optional, defaults to amd. The type of JavaScript module to convert to. Can be either amd, cjs (node.js modules) or es6.

## License

MIT.

Keywords

FAQs

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

  • 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