[based on a true story]
So. Your friend's about to teach you how to make a website. Great!
You make a file, and you save it as 'index.html'. Why it's called 'index' isn't really explained to you, but whatever.
You type the following.
hello world| primary: | |
| image: mongo:3.0 | |
| volumes: | |
| - ./p:/data | |
| ports: | |
| - "27017:27017" | |
| # Our current version of docker-compose doesn't allow extra_hosts which would be the best way | |
| # to add curcular dependency container links in this case. We cant upgrade docker-compose | |
| # without upgrading docker to 1.7, and we can't do that without upgrading the kernel on our | |
| # CentOS VM's. As such we are using the hostname hask below to allow primary and secondary |
| import Relay from 'real-react-relay'; | |
| export class Mutation extends Relay.Mutation { | |
| _resolveProps(props) { | |
| this.props = props; | |
| } | |
| } | |
| export class MockStore { | |
| reset() { |
| const repl = require(‘repl’) | |
| const server = repl.start({ /* your config options */ }) | |
| // synchronous methods are fine, here. you don't want to run a REPL on any middleware that | |
| // handles user requests, anyway. | |
| fs.statSync('.node_repl_history') | |
| // load command history from a file called .node_repl history in the current directory | |
| fs.readFileSync('.node_repl_history') | |
| .split(‘\n’) |
[based on a true story]
So. Your friend's about to teach you how to make a website. Great!
You make a file, and you save it as 'index.html'. Why it's called 'index' isn't really explained to you, but whatever.
You type the following.
hello world| class ExampleForm extends React.Component<Props> { | |
| render() { | |
| return ( | |
| <View> | |
| <TextInput name={'email'} /> | |
| </View> | |
| ); | |
| } | |
| } |
| #!/bin/bash | |
| rm -rf dist && mkdir dist | |
| npx babel src --out-dir dist --ignore node_modules | |
| cp src/package.json dist | |
| cd dist && yarn install --production --modules-folder node_modules |