O'Reilly logo

Backbone.js Cookbook by Vadim Mirgorod

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a Backbone.js extension with Grunt

It could be very important for the developer to create a Backbone extension that will be shared with the rest of the world or even re-used in future projects. In this recipe, we are going to learn how to create our own extension using Grunt, and we will upload it on GitHub.

Grunt is the JavaScript task runner that allows automating different tasks such as minification, compilation, unit testing, and linting. These repetitive tasks are defined in the Gruntfile.js file and are triggered from a console. There are many different packages for Grunt that are available as npm extensions. We are going to use one of them, named grunt-init, for scaffolding the Backbone extension from a template.

Our extension ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required