- Quirks Mode - Peter-Paul Koch
- Can I Use? - Alexis Deveria
- HTML5 Please
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
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Jasmine Spec Runner</title> | |
<% css.forEach(function(style){ %> | |
<link rel="stylesheet" type="text/css" href="<%= style %>"> | |
<% }) %> | |
<% with (scripts) { %> |
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
var template = './tests/template/app-measurement-template.tmpl'; | |
exports.process = function(grunt, task, context) { | |
var packageJson = grunt.file.readJSON('package.json'); | |
var myLibrary = './AppMeasurment'; | |
var myLibraryVersion = packageJson.version + '.js'; | |
if (context.options.minified) { | |
myLibrary += '.min-' + myLibraryVersion; |
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
jasmine: { | |
unmodified: { | |
options: { | |
vendor: [ | |
'vendor/jquery-1.11.0.min.js', | |
'tests/lib/jasmine-jquery-2.1.0.js' | |
], | |
specs: ['tests/spec/app-measurement-spec.js'], | |
template: require('./tests/templates/app-measurement-template.js'), | |
templateOptions: { |
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
// ------------------------------------- | |
// PAGE TEMPLATE *********************** | |
// ------------------------------------- | |
// ------------------------------------- | |
// my-app.js | |
// ------------------------------------- | |
define('app', function(require, exports, module) { |
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
// requireJS simplified commonJS wrapper | |
// do this so can use the commonJS style | |
// make switch to browserify easier | |
define('page-one-view', function(require, exports, module) { | |
'use strict'; | |
var Backbone = require('backbone'); | |
var PageOneView = Backbone.View.extend({ |
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
// ------------------------------------- | |
// hand-written ajax | |
// ------------------------------------- | |
var PageOneView = Backbone.View.extend({ | |
el: '#pageOneMainContainer', | |
initialize: function() { | |
this.getSomeData(); |
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
// ------------------------------------- | |
// my-app.js | |
// ------------------------------------- | |
var myApp = myApp || {}; | |
(function($, myApp) { | |
'use strict'; |
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
// ------------------------------------- | |
// my-app.js | |
// ------------------------------------- | |
// prefix with semi-colon as safety net against concatenated | |
// scripts and/or other plugins that are not closed properly | |
; | |
// check for existence of myApp in the global namespace | |
var myApp = myApp || {}; |
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
// ------------------------------------- | |
// my-app.js | |
// ------------------------------------- | |
; | |
var myApp = myApp || {}; | |
(function($, myApp) { | |
'use strict'; |
NewerOlder