Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[10:28:53] Requiring external module ts-node/register project/node_modules/ts-node/dist/ts-node.js:68 var result = output.outputFiles[1].text; ^ TypeError: Cannot read property 'text' of undefined at getOutput (project/node_modules/ts-node/dist/ts-node.js:68:43) at compile (project/node_modules/ts-node/dist/ts-node.js:91:16) at Object.loader (project/node_modules/ts-node/dist/ts-node.js:94:27) at Module.load (module.js:355:32) at Function.Module._load (module.js:310:12) at Module.require (module.js:365:17) at require (module.js:384:17) at Liftoff.handleArguments (project/node_modules/gulp/bin/gulp.js:116:3) at Liftoff.<anonymous> (project/node_modules/gulp/node_modules/liftoff/index.js:192:16) at module.exports (project/node_modules/gulp/node_modules/liftoff/node_modules/flagged-respawn/index.js:17:3)
- Loading branch information
1 parent
e1e027d
commit d6fc57f
Showing
10 changed files
with
47 additions
and
9 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,48 @@ | ||
const Radium = require('radium'); | ||
|
||
import * as React from 'react'; | ||
|
||
enum Kinds { | ||
primary, | ||
warning | ||
} | ||
|
||
interface HelloWorldProps extends React.Props<any> { | ||
name: string; | ||
kind: Kinds; | ||
} | ||
|
||
var styles = { | ||
base: { | ||
color: '#fff' | ||
}, | ||
|
||
[Kinds.primary]: { | ||
background: '#0074D9' | ||
}, | ||
|
||
[Kinds.warning]: { | ||
background: '#FF4136' | ||
} | ||
}; | ||
|
||
// @Radium | ||
export default class App extends React.Component<HelloWorldProps, any> { | ||
static propTypes: React.ValidationMap<any> = { | ||
kind: React.PropTypes.oneOf([Kinds.primary, Kinds.warning]).isRequired | ||
}; | ||
|
||
render() { | ||
return ( | ||
<h1>Hello, {this.props.name}...</h1> | ||
<div style={[ | ||
styles.base, | ||
styles[this.props.kind] | ||
]}> | ||
<h1>Hello, {this.props.name}...</h1> | ||
<div src="[[ ./images/twitter.svg ]]" /> | ||
</div> | ||
); | ||
} | ||
} | ||
|
||
module.exports = App; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
import * as React from 'react'; | ||
import App from './App'; | ||
import App1 = require('./App'); | ||
|
||
React.render(<App name="World" />, document.getElementById('root')); | ||
React.render(<App name="World" kind={App.Kinds.primary} />, document.getElementById('root')); | ||
|
||
document.getElementById('time').innerHTML = new Date().toString(); |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,10 +24,6 @@ module.exports = { | |
], | ||
loaders: [ | ||
common.loaders.react, | ||
{ | ||
test: /[.]html$/, | ||
loader: 'file' | ||
} | ||
] | ||
} | ||
}; |