Skip to main content

Broccoli - The Asset Pipeline in Ember.js

Ember CLI includes the fast asset pipeline broccoli (can be found at https://github. com/broccolijs/broccoli). Broccoli draws heavy inspiration from the Rails asset pipeline. It runs on node.js and is independent of the backend platform you are working with.
One of the most common ways to handle asset compilation and minifying is to use the Grunt task runner, or a similar tool. Let’s say you are working on an application that involves the compilation of CoffeeScript, Sass, and other similar assets. Now to make these assets available to our application, you will have to write a Grunt task that does the compilation.
When you start the active development of your application, you will realize that running the Grunt task after making any changes to your CoffeeScript or Sass files iscumbersomeandtime-consuming.So,youstartusinggrunt watchinyour application to rebuild your entire application whenever you make any changes anywhere in your application. But very soon, when your application grows in size andcomplexity,youwillrealizethatgrunt watchistakingtoomuchtimeasyouare rebuilding your entire application, even if only one of the Sass files has been changed.
Broccoli, on the other hand, figures out which files have changed and only rebuilds those that were modified. This means that rebuilding is now a constant time with the number of files in your application, as you generally only rebuild one file.
This is just one example of what broccoli is capable of. It has many more useful optimizations to make your development and build process simple and fast.

Some of the assets that are supported by Broccoli include:
• Handlebars
• Emblem
• LESS
• Sass
• Compass
• Stylus
• CoffeeScript
• EmberScript
• Minified JS and CSS

Every Ember CLI project will contain a file called Brocfile.js present at the root
of the project. This is the definition file and contains build-specific instructions for
your project.

For more information checkout “Ember.js Web Development With Ember CLI”  http://goo.gl/1ePfl1

Comments

Popular posts from this blog

Fractals and Mandelbrot Set

While mathematics is in itself quite interesting and forms the basis of any modern day research, be it computational biology, machine learning or building complex structure, it can be quite a challenge to decide where to start.  That is why i decided to explore Fractals, thinking of it as a bridge between the nature and science. It brings in some really fascinating concepts which should be good enough for me as a gateway go deeper.  Fractals are in simple language never ending patterns which keep on repeating without an end, because fractals are never ending they have an infinite perimeter but finite area.  Since the patterns repeats indefinitely but if you draw a circle around the peremeter the area will remain finite.  It is like adding 1+0.1+0.01+0.001 and never making 2 This video explains the basic concept really well  Fractals are found everywhere nature in Trees, Rivers, Branching patterns, Hurricanes and Galaxies. It tries to bring order and understanding to the patterns that w
It was a great experience to talk to a huge audience in Mumbai and Delhi about how to start your ML journey at Google Cloud Summit ’18 India

COVID-19 Lockdown

It is May 11th 2020 and most of India has been under lockdown for 46 straight days. These have been tough times for everyone. While some of the folks i know have been cribbing about being bored to death in this lockdown, for me it has been a busy time. My current field of work which is "Cloud Technology" picked up as everyone was locked up with nothing but technology to entertain and survive and hence there was a lot of work. While me and my family was trying to navigate the chaos and madness of ordering everything online, i would say we were able to deal with the situation without going out much.  This was until my phone broke, crashed, bricked, it was gone.  While i had a spare 4 year old iPhone to fall back on but you know about spare phones, they were too old to trade for a newer one is why you decided to label it as a spare and keep it. They almost never work. So after struggling to get my office and personal stuff to work on an old phone and tablet, i decided i needed t