diff --git a/.gitignore b/.gitignore index 63bf42d..d44988f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ node_modules/ typings/ -public/js/app/*.js -temp/ +public/js/bundle.js \ No newline at end of file diff --git a/LICENSE b/LICENSE index 2ffcac0..7b71c7a 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,7 @@ The MIT License (MIT) -Copyright (c) 2015 Benny van Reeven +Copyright (c) 2015 Michel Weststrate +Forked from: https://github.com/bvanreeven/react-typescript Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 5132880..34ce436 100644 --- a/README.md +++ b/README.md @@ -2,19 +2,20 @@ Minimal boilerplate for a single-page app using Mobservable, Mobservable-React, React, TypeScript 1.6 with TSX, and Visual Studio Code. -Usage: +Initial install: * Install Node.js * `npm install -g tsd` * `npm install` * `tsd install` + +Build: + * `npm run build` To view the app: -* `npm install -g http-server` -* `http-server` -* Open [http://localhost:8080/](http://localhost:8080/) in your browser of choice. +* `npm start` ## Credits diff --git a/package.json b/package.json index cae0030..f47d093 100644 --- a/package.json +++ b/package.json @@ -8,19 +8,21 @@ }, "main": "index.js", "dependencies": { - "mobservable": "^1.0.0", - "mobservable-react": "^2.0.0", + "mobservable": "^1.1.4", + "mobservable-react": "^2.1.0", + "mobservable-react-devtools": "^2.0.4", "react": "^0.14", "react-dom": "^0.14" }, "devDependencies": { "browserify": "^11.1.0", - "mkdirp": "^0.5.1", + "http-server": "^0.8.5", + "tsify": "^0.13.1", "typescript": "^1.6.2" }, "scripts": { - "build": "mkdirp public/js/app && tsc && browserify ./temp/app.js -o public/js/app/bundle.js", - "start": "http-server" + "build": "browserify src/index.tsx -p tsify > public/js/bundle.js", + "start": "cd public && http-server -o index.html" }, "author": "Michel Weststrate", "license": "MIT" diff --git a/public/index.html b/public/index.html index 2397361..90aee07 100644 --- a/public/index.html +++ b/public/index.html @@ -3,17 +3,17 @@ - My First React App + Mobservable-React-Typescript boilerplate project
-

My First React App

+

Mobservable-React-Typescript boilerplate project

- + \ No newline at end of file diff --git a/app/app.tsx b/src/index.tsx similarity index 95% rename from app/app.tsx rename to src/index.tsx index a779798..dc35670 100644 --- a/app/app.tsx +++ b/src/index.tsx @@ -5,6 +5,8 @@ import ReactDOM = require('react-dom'); import {observable} from 'mobservable'; import {observer} from 'mobservable-react'; +import "mobservable-react-devtools"; + class DemoProps { public name: string; } diff --git a/tsconfig.json b/tsconfig.json index 7cd44ed..01ad5f3 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,9 +8,9 @@ "experimentalDecorators": true, "noLib": false, "jsx": "react", - "outDir": "./temp" + "outDir": "dist" }, "files": [ - "app/app.tsx" + "src/index.tsx" ] }