Open anjuliw opened 9 years ago
version: 2015-07-20 format: pdf location: page 7
Broccoli is mentioned all over this page, without any mention of ember-cli-build
Its main component is Broccoli, a builder designed to keep builds as fast as possible. When we run ember server, Broccoli compiles our project and puts it in a directory where it can be served using Express.js5, a Node.js library. Express not only serves files but also extends Ember CLI functionality using its middlewares. An example of this is http-proxy, which supports the --proxy option that allows us to develop against our development backend. Out of the box, testing is powered by QUnit and Testem. By navigating to http:/localhost:4200/tests, our tests run automatically. We can also run Testem in CI or --development mode with the ember test command. We can also use other testing frameworks like Mocha thanks to the ember-cli-mocha addon. Ember CLI makes us write our application using ES6 Modules. The code is then transpiled (compiled)6 to AMD7 and finally loaded with the minimalist AMD loader, loader.js. We can use CoffeeScript if we want, but it is recommended to use plain JS and ES6 modules where possible. In subsequent chapters, we’ll explore its syntax and features. Ember CLI ships with Babel8 support, which allows us to use next generation JavaScript without extra work. Finally, we need to cover plugins that enhance the functionality of Broccoli. Each transformation your files go through is done with a Broccoli plugin, e.g. transpiling, minifying, finger-printing, uglifying. You can have your own Broccoli plugins and plug them wherever you like throughout the build process.
@bambery Broccoli is the lib doing the magic, the ember-cli-build is just how the config file is named.
This is fact! The relationship should probably be explained early on, since any broccoli doc (which is linked to in the book) will refer to the brocfile, and the ember cli 101 book does not explain the relationship between ember-cli-build and broccoli in any place a ctrl-f "broccoli" could find. Just a blurb about how ember uses a special file and not a brocfile would be useful.
Sure thing! I'll add this, I used to explain this and removed it by mistake on the last edit, thanks!
Adolfo Builes
On Tue, Aug 18, 2015 at 7:53 PM, bambery notifications@github.com wrote:
This is fact! The relationship should probably be explained early on, since any broccoli doc (which is linked to in the book) will refer to the brocfile, and the ember cli 101 book does not explain the relationship between ember-cli-build and broccoli in any place a ctrl-f "broccoli" could find. Just a blurb about how ember uses a special file and not a brocfile would be useful.
— Reply to this email directly or view it on GitHub https://github.com/abuiles/ember-cli-101-errata/issues/240#issuecomment-132406045 .
Page 86, fifth line from the bottom:
"... we have removed app.import('bower_components/moment/moment.js');
from the Brocfile
"
( and a small typo on page 87, the first line after the code bock:
"... as if it was other module" should be "as if it was another module" or perhaps "as if it were another module." )
Page 49, last line of text: "we need to modify our Brocfile as follows:"
I will add any other 'Brocfile' instances I come across here.