Last active
August 29, 2015 14:22
-
-
Save mattborn/ba78cefdb036ad8eb824 to your computer and use it in GitHub Desktop.
React + jspm
This file contains hidden or 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
# editorconfig.org | |
root = true | |
[*] | |
charset = utf-8 | |
indent_size = 2 | |
indent_style = space | |
trim_trailing_whitespace = true |
This file contains hidden or 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
.module-cache |
This file contains hidden or 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
'use strict'; | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } | |
var _npmRadium0130 = require('npm:[email protected]'); | |
var _npmRadium01302 = _interopRequireDefault(_npmRadium0130); | |
var _npmReact0133 = require('npm:[email protected]'); | |
var _npmReact01332 = _interopRequireDefault(_npmReact0133); | |
'use strict'; | |
var App = _npmReact01332['default'].createClass({ | |
displayName: 'App', | |
render: function render() { | |
var styles = { | |
base: { | |
fontSize: 100 | |
} | |
}; | |
return _npmReact01332['default'].createElement( | |
'b', | |
{ style: [styles.base] }, | |
'Hello world!' | |
); | |
} }); | |
module.exports = _npmRadium01302['default'](App); |
This file contains hidden or 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
'use strict'; | |
import Radium from 'npm:[email protected]'; | |
import React from 'npm:[email protected]'; | |
const App = React.createClass({ | |
render () { | |
const styles = { | |
base: { | |
fontSize: 100 | |
} | |
}; | |
return ( | |
<b style={[styles.base]}>Hello world!</b> | |
); | |
}, | |
}); | |
module.exports = Radium(App); |
This file contains hidden or 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 hidden or 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>React + jspm</title> | |
</head> | |
<body> | |
<script src="https://jspm.io/[email protected]"></script> | |
<script> | |
System.config({ | |
baseURL: '.', | |
transpiler: 'babel', | |
babelOptions: { | |
optional: [ | |
'runtime' | |
], | |
blacklist: [] | |
}, | |
paths: { | |
'*': '*.js' | |
} | |
}); | |
System.import('main'); | |
</script> | |
</body> | |
</html> |
This file contains hidden or 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
'use strict'; | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } | |
var _npmReact = require('npm:react'); | |
var _npmReact2 = _interopRequireDefault(_npmReact); | |
var _app = require('app'); | |
var _app2 = _interopRequireDefault(_app); | |
'use strict'; | |
_npmReact2['default'].initializeTouchEvents(true); | |
_npmReact2['default'].render(_npmReact2['default'].createElement(_app2['default'], null), document.body); |
This file contains hidden or 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
'use strict'; | |
import React from 'npm:react'; | |
import App from 'app'; | |
React.initializeTouchEvents(true); | |
React.render(<App />, document.body); |
This file contains hidden or 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
#/bin/bash | |
find . -name '*.jsx' | xargs babel $1 --watch --out-dir . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment