Skip to content

Instantly share code, notes, and snippets.

@bwhitty
bwhitty / package.json
Created April 13, 2016 06:15
simple meteor package file
{
"dependencies": {
"react": "^15.0.1",
"react-dom": "^15.0.1",
"react-router": "^2.1.1"
}
}
@bwhitty
bwhitty / index.html
Created April 13, 2016 06:02
Meteor index file
<body>
<div id="root"></div>
</body>
@bwhitty
bwhitty / gist:e9902e09ddefc5d665ce1a5a043124a9
Created April 13, 2016 05:53
Meteor directory structure
client/
hello.tsx
index.html
package.json
typings.json
{
"compilerOptions": {
"outDir": "./dist/",
"sourceMap": true,
"noImplicitAny": true,
"module": "commonjs",
"target": "es5",
"jsx": "react"
},
"files": [
import * as React from "react";
import { render } from "react-dom";
class Hello extends React.Component<{}, {}> {
render() {
return (
<div>
<h1>Hello from boilerplate-land!</h1>
</div>
);
@bwhitty
bwhitty / index.html
Created April 13, 2016 05:34
Baseline index.html
<!DOCTYPE html>
<html>
<head>
...
</head>
<body>
<div id="root"></div>
<!-- Dependencies -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.0.1/react.js"></script>
@bwhitty
bwhitty / package.json
Last active April 13, 2016 05:47
Boilerplate package.json
{
"main": "./lib/bundle.js",
"scripts": {
"webpack": "webpack",
"dev-server": "webpack-dev-server",
},
"devDependencies": {
"source-map-loader": "^0.1.5",
"ts-loader": "^0.8.1",
"webpack": "^1.12.14",
@bwhitty
bwhitty / gist:7c89ab7a156cf9319d9a188942fe2526
Last active April 13, 2016 05:50
Boilerplate directory structure
src/
index.tsx
dist/
index.html
package.json
tsconfig.json
typings.json
webpack.config.js
@bwhitty
bwhitty / webpack.config.js
Last active April 13, 2016 05:21
Example typescript + react + react router webpack config
module.exports = {
entry: "./src/index.tsx",
output: {
filename: "./dist/bundle.js",
},
// Enable sourcemaps for debugging webpack's output.
devtool: "source-map",
// Makes webpack-dev-server run on port 300