-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(generators/app/templates): add automatic engagement of the Backb…
…one-Debugger browser plugin when available Include automatically with debugging builds.
- Loading branch information
Showing
3 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
generators/app/templates/src/debug.backbone-debugger.coffee
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
( ( factory ) -> | ||
if typeof exports is 'object' | ||
module.exports = factory( | ||
require( 'backbone' ) | ||
) | ||
else if typeof define is 'function' and define.amd | ||
define( [ | ||
'backbone' | ||
], factory ) | ||
return | ||
)(( | ||
Backbone | ||
) -> | ||
|
||
###* | ||
# @author David Bouman | ||
# @module App | ||
### | ||
|
||
'use strict' | ||
|
||
|
||
## | ||
## Engage the [Backbone debugger browser plugin](https://github.com/Maluen/Backbone-Debugger#install-from-chrome-web-store) if present. | ||
## | ||
|
||
window.__backboneAgent?.handleBackbone( Backbone ) | ||
|
||
return | ||
|
||
) |