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> | |
<asset:javascript src="asset-pipeline.js"/> | |
</head> | |
<body> | |
<div> | |
<span>Current time is:</span> | |
</div> | |
<div id="app"></div> |
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> | |
<asset:javascript src="asset-pipeline.js"/> | |
</head> | |
<body> | |
<div> | |
<span>Current time is:</span> | |
</div> |
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
class TestComponent extends React.Component { | |
constructor() { | |
super(); | |
this.state = {date: new Date()}; | |
} | |
componentDidMount() { | |
this.timerID = setInterval( | |
() => this.tick(), | |
1000 |
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
//= require react/react.min.js | |
//= require react/react-dom.min.js |
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
assets { | |
minifyJs = true | |
minifyCss = true | |
enableSourceMaps = true | |
minifyOptions = [ | |
languageMode : 'ES6', | |
targetLanguage: 'ES5' | |
] | |
} |
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
buildscript { | |
dependencies { | |
classpath "com.bertramlabs.plugins:asset-pipeline-gradle:2.13.1" | |
} | |
} | |
dependencies { | |
runtime "com.bertramlabs.plugins:asset-pipeline-grails:2.13.1" | |
assets "com.bertramlabs.plugins:jsx-asset-pipeline:2.13.1" | |
} |
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 A = function() { | |
this.a = 10; | |
} | |
A.prototype.hello = function() { | |
console.log('Hello from A!'); | |
} | |
var B = function() { | |
} |
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
b.a = 25; | |
console.log(b.a) // 25 | |
delete b.a // true | |
console.log(b.a) // 10 |
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 A = function() { | |
this.a = []; | |
} | |
A.prototype.hello = function() { | |
console.log('Hello from A!'); | |
} | |
var B = function(a) { | |
if (a) { | |
this.a = a; |
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 b = new B() | |
b instanceof A //true | |
b instanceof B //true |
OlderNewer