lib/builder.js
function (bbsource) {
    var parts = {
      Header: '',
      Setup: '// Initial Setup',
      Events: '// Backbone.Events',
      Model: '// Backbone.Model',
      Collection: '// Backbone.Collection',
      Router: '// Backbone.Router',
      History: '// Backbone.History',
      View: '// Backbone.View',
      Sync: '// Backbone.sync',
      Helpers: '// Helpers'
    };


    // index & module helper
    var lastPos = 0;
    var temp = 0;
    var keys = Object.keys(parts);

    // extract every module
    keys.forEach(function (key, idx) {
      temp = typeof keys[idx + 1] !== 'undefined' ? bbsource.search(parts[keys[idx + 1]]) : bbsource.length;
      parts[key] = extract(bbsource, lastPos, temp);
      lastPos = temp;
    });

    return parts;
  }
function (bbsource) {
    var parts = {
      Header: '',
      Setup: '// Initial Setup',
      Events: '// Backbone.Events',
      Model: '// Backbone.Model',
      Collection: '// Backbone.Collection',
      Router: '// Backbone.Router',
      History: '// Backbone.History',
      View: '// Backbone.View',
      Sync: '// Backbone.sync',
      Helpers: '// Helpers'
    };


    // index & module helper
    var lastPos = 0;
    var temp = 0;
    var keys = Object.keys(parts);

    // extract every module
    keys.forEach(function (key, idx) {
      temp = typeof keys[idx + 1] !== 'undefined' ? bbsource.search(parts[keys[idx + 1]]) : bbsource.length;
      parts[key] = extract(bbsource, lastPos, temp);
      lastPos = temp;
    });

    return parts;
  }
function ( bbsource ) { var parts = { Header : '' , Setup : '// Initial Setup' , Events : '// Backbone.Events' , Model : '// Backbone.Model' , Collection : '// Backbone.Collection' , Router : '// Backbone.Router' , History : '// Backbone.History' , View : '// Backbone.View' , Sync : '// Backbone.sync' , Helpers : '// Helpers' } ; // index & module helper var lastPos = 0 ; var temp = 0 ; var keys = Object . keys ( parts ) ; // extract every module keys . forEach ( function ( key , idx ) { temp = typeof keys [ idx + 1 ] !== 'undefined' ? bbsource . search ( parts [ keys [ idx + 1 ] ] ) : bbsource . length ; parts [ key ] = extract ( bbsource , lastPos , temp ) ; lastPos = temp ; } ) ; return parts ; }
parts are seperated by annotations
parts are seperated by annotations