Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "swag",
"version": "0.6.1",
"version": "0.7.1",
"main": "lib/swag.js",
"ignore": [
"**/.*",
"node_modules",
"bower_components"
],
"dependencies": {
"handlebars": "1.3.x"
"handlebars": ">=1.3.0"
}
}
25 changes: 18 additions & 7 deletions lib/swag.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,29 @@

/*
Swag v0.6.1 <http://elving.github.com/swag/>
Swag v0.7.0 <http://elving.github.com/swag/>
Copyright 2012 Elving Rodriguez <http://elving.me/>
Available under MIT license <https://raw.github.com/elving/swag/master/LICENSE>
*/

*/

(function() {
var Dates, HTML, Swag, Utils,
var Dates, HTML, Swag, Utils, exports,
__indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };

if (typeof window !== "undefined" && window !== null) {
window.Swag = Swag = {};
Swag = {};

if (typeof exports !== "undefined" && exports !== null) {
if ((typeof module !== "undefined" && module !== null) && (module.exports != null)) {
exports = module.exports = Swag;
}
exports.Swag = Swag;
} else if ((typeof define !== "undefined" && define !== null) && (define.amd != null)) {
define([], function() {
return Swag;
});
} else if (typeof window !== "undefined" && window !== null) {
window.Swag = Swag;
} else if (typeof module !== "undefined" && module !== null) {
module.exports = Swag = {};
module.exports = Swag;
}

Swag.helpers = {};
Expand Down
6 changes: 3 additions & 3 deletions lib/swag.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "swag",
"version": "0.6.1",
"version": "0.7.1",
"author": "Elving Rodriguez <elving.pr@gmail.com>",
"description": "Give your handlebars.js templates some swag son!",
"main": "./index.js",
Expand Down
24 changes: 20 additions & 4 deletions src/swag.coffee
Original file line number Diff line number Diff line change
@@ -1,14 +1,30 @@
###
Swag v0.6.1 <http://elving.github.com/swag/>
Swag v0.7.0 <http://elving.github.com/swag/>
Copyright 2012 Elving Rodriguez <http://elving.me/>
Available under MIT license <https://raw.github.com/elving/swag/master/LICENSE>
###

if window?
window.Swag = Swag = {}
Swag = {}

# Export Swag for CommonJS. If being loaded as an AMD module, define it as such.
# Otherwise, just add `Swag` to the global object
if exports?
if module? && module.exports?
exports = module.exports = Swag
exports.Swag = Swag
else if define? && define.amd?
# Return the library as an AMD module:
define [], () ->
return Swag
else if window?
# Otherwise expose Swag to the global object as usual
window.Swag = Swag
else if module?
module.exports = Swag = {}
# Expose Swag as module.exports in loaders that implement the Node
# module pattern (including browserify). Do not create the global, since
# the user will be storing it themselves locally, and globals are frowned
# upon in the Node module world.
module.exports = Swag

Swag.helpers = {}

Expand Down