Watch The Full Episode, FREE
In the previous episode, I built a plugin for BackboneJS from the ground up and created a release of the plugin before pushing it up to Github. I’ve made few changes to the project already, I’ve done another release, and I’m starting to think about additional features and changes that need to be put in place.
One of the features that I want to include is not a functional feature, but packing and deployment feature. I want to make sure my plugin is compatible with AMD – the asynchronous module definition – so that it can run in side of RequireJS and other AMD loaders. But I also want to make sure I don’t break the plugin for those that aren’t using RequireJS – which includes me.
To make both of these scenarios work, then, I’m going to modify the grunt build process to produce both a standard version of the library and an AMD compatible version. And to do this, I’m going to use some code from the UMDJS repository on github, a tool called rigger, and a grunt plugin for rigger.
In this episode, you’ll see:
- UMDJS Repository For Module Definitions
- Project Dependencies With NPM
- Grunt, Rigger and Grunt-Rigger
- Creating An AMD Build
- Minifying The AMD Build
- And More!
Want To Learn More And See ALL of The Other Screencasts?
Sign up for WatchMeCode’s monthly subscription and you’ll get instant access to every paid episode!