broccoli

Post on 26-Jun-2015

1.472 Views

Category:

Business

2 Downloads

Preview:

Click to see full reader

TRANSCRIPT

BroccoliEmberConf 2014

@jo_liss

Background

packages: Bower

build tool: ???packages: Bower

grunt watch

.coffee

.scss

concat

minify

.handlebars

...

10 sec

O_O

Broccoli

3 parts

will not talk about design choices

PART 1build definitions:

Brocfile.js current syntax will change slightly

yayvaporware :p

editor time

PART 2plugin API

Broccoli only knowstrees

tree of files

string or obj

{ read: function() { ... }, cleanup: function() { ... }}

tree.read()

must return a directory

.read()

.read()

.read().cleanup()

tiny API

big helper packages

broccoli-transformfor 1 input tree

broccoli-transform:

transform = function(srcDir, destDir)

broccoli-filter

for 1:1 file relationshipson top of broccoli-transform

e.g. CoffeeScript

broccoli-filter:

processString = function (string) { return newString }

broccoli-filterhas cache :)

doesn’t work forSass

PART 3

integration

Broccoli is asmall library

Broccoli <3 Grunt

Integrate with backends

Pairing anyone?

top related