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 contact = function(name, gender) { | |
this.name = name; | |
this.gender = gender; | |
} | |
exports.contact = contact; |
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 Contact = require("./contact").contact; | |
var contacts = [ | |
new Contact("Jack", "M"), | |
new Contact("Eugenia", "F") | |
]; | |
exports.contacts = contacts; |
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
define(function () { | |
var contact = function(name, gender) { | |
this.name = name; | |
this.gender = gender; | |
} | |
return contact; | |
}); |
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
define(["contact.amd"], function(Contact) { | |
var contacts = [ | |
new Contact("Jack", "M"), | |
new Contact("Eugenia", "F") | |
]; | |
return contacts; | |
}); |
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
export class Contact { | |
constructor(name, gender) { | |
this.name = name; | |
this.gender = gender; | |
} | |
} |
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
import { Contact } from "./contact.es6"; | |
export var contacts = [ | |
new Contact("Jack", "M"), | |
new Contact("Eugnenia", "F") | |
]; |
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
<input type="text" onmouseover="javascript:this.select()" value="This is to be selected when hovering over the mouse"></input> |
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
less.render(lessInput, options) | |
.then(function(output) { | |
// output.css = string of css | |
// output.map = string of sourcemap | |
// output.imports = array of string filenames of the imports referenced | |
}, | |
function(error) { | |
}); |
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
exports.translate = function (load) { | |
return System.import("less/lib/less-browser") | |
.then(function (lesscWrapper) { | |
return lesscWrapper(window, { | |
async: true, | |
errorReporting: "Console" | |
}); | |
}) | |
.then(function (lessc) { | |
return lessc.render(load.source, { |
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 cssInject = "(function(c){var d=document,a='appendChild',i='styleSheet',s=d.createElement('style');s.type='text/css';d.getElementsByTagName('head')[0][a](s);s[i]?s[i].cssText=c:s[a](d.createTextNode(c));})"; | |
var escape = function (source) { | |
return source | |
.replace(/(["\\])/g, '\\$1') | |
.replace(/[\f]/g, '\\f') | |
.replace(/[\b]/g, '\\b') | |
.replace(/[\n]/g, '\\n') | |
.replace(/[\t]/g, '\\t') | |
.replace(/[\r]/g, '\\r') |
OlderNewer