Skip to content

Commit 36ad2bd

Browse files
committed
Release v0.5.0
updated readme & changelog
1 parent 2862c94 commit 36ad2bd

File tree

2 files changed

+62
-30
lines changed

2 files changed

+62
-30
lines changed

CHANGELOG.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,21 @@ tsconfig update
1212
example code improvement
1313
jspm css plugin
1414
### 0.3.1
15-
remove semantic-ui dependency - don't have opinion on ui-kit
15+
remove semantic-ui dep - opinion on ui-kit should be your choice
1616
### 0.3.2
1717
usage experience update
1818
### 0.3.3
1919
added jspm clean-css dep for prod bundling
20-
### 0.4
20+
### 0.4.0
2121
re-factored to more meaningful example
2222
added simple app store
23+
### 0.5.0
24+
removed browser-sync dep - this dep has too many features for this bare minimum starter-kit and also should your rather your choice
25+
added regenerator for ES5 async/await transpilation (soon with TypeScript 2.0 release it will be not needed)
26+
added custom ambient definitions for external libraries best-practice example
27+
updated index.html and added nice css loader while waiting for React to "kick in"
28+
added new hot-module-reload dependency (jspm-hmr) for easier and cleaner hot-reload solution
29+
added static dev-bundle with external deps for quick full-page reload, this is most important as this will make JSPM very fast
30+
updated tsconfig for ES2015
31+
added editor config and linter
32+
updated typings

README.md

Lines changed: 50 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,70 @@
11
# React / TypeScript / JSPM starter-kit
2-
Modern, future-proof JavaScript Project Starter-Kit to build modular web apps with React & TypeScript using ES Modules powered by JSPM/SystemJS
2+
Modern, clean & future-proof JavaScript Project boilerplate to build modular web apps utilizing power of ES2016, async/await, ES Modules with React & TypeScript powered by JSPM/SystemJS.
33

44
## Features
5-
- just core stuff and dev server setup with hot-reload - the rest is up to you
6-
- fully automated - just npm install, npm start to run dev server and you're ready to code
7-
- React-TypeScript usage example code
8-
- React & ReactDOM typings
9-
- typescript nightly version (@next) for coolest new features, default tsconfig for ES2015
10-
- development server with browser-sync (live-reload & css inject)
11-
- JSPM 0.17.X with hot-module reload enabled and example code (chokidar-socket-emitter/systemjs-hot-reloader)
12-
- bundling for production in `~/dist/` folder - test productions available on `http://localhost/dist/`
5+
- clean with bare minimum dep to make React & TypeScript & dev server with hot-reload running - the rest is up to you
6+
- easy start - just npm install && npm start to run dev server and you're ready to start coding
7+
- simple and clean dev server with hot-module-reload for JSPM - [jspm-hmr](https://www.npmjs.com/package/jspm-hmr)
8+
- added static dev-bundle (with external deps) setup for quick full-page reload, this is most important as this will make JSPM very fast
9+
- Typescript custom ambient definitions for external libraries - best-practices & example
10+
- React with TypeScript - best-practices & example code & typings
11+
- (async/await best practices with example code in progress)
12+
- typescript nightly builds (@next) for coolest new features, tsconfig setup for ES2016 support
13+
- JSPM 0.17.X - most recent beta version up stay up-to-date with best-practices
14+
- bundling for production in `~/dist/` folder - open production build on dev server `http://localhost/dist/`
1315
- importing and bundling CSS dependencies using JSPM `plugin-css`
14-
- npm run scripts to automate bundling & dev server startup
16+
- usefull npm run scripts to automate many development workflow tasks
17+
- github hooks using husky (in progress)
18+
- nice css loader while waiting for React to "kick in"
19+
- using regenerator to transpile generators/async/await to ES5 (soon with TypeScript 2.0 release it will be not needed)
20+
21+
---
22+
23+
## Making JSPM loading fast - Static Bundle for External Deps
24+
Important point to keep in mind when running dev server with JSPM is to create a static bundle of external dependencies. As they only change when updated through NPM, it is best to bundle them all together and load as one package instead of separately making hundreds of requests slowing down page reload.
25+
That way your only your modules from src are still loaded separately making possible to hot-reload them instantly without rebundling, and do full-page reload if necessary very quickly. This is the best of two development approaches (hot-reload vs. bundling) mixed together.
26+
27+
Test:
28+
1. run `npm run unbundle` -> open network tab, reload page and check output
29+
2. run `npm run bundle-dev` -> open network tab, reload page and check output
30+
3. compare results
1531

1632
---
1733

1834
## Usage
1935

2036
#### NPM Commands
2137

22-
`npm start` - start local development server with hot-reload **(WARNING: currently working only for windows)**
23-
*other platforms please npm run server & hot-reloader processes seperately, plan to fix it in the future*
38+
`npm start` - start local dev server with hot-module-reload for JSPM [jspm-hmr](https://www.npmjs.com/package/jspm-hmr)
39+
40+
`npm run bundle-dev` - inject static dev-bundle to JSPM config for quick full-page reload
41+
42+
`npm run unbundle` - un-inject static dev-bundle from JSPM config
2443

25-
`npm run server` - start local development server (browser-sync - w/o hot-reload)
44+
`npm run build` - build production app bundle (only your app source) - optimized minified version w/o source-maps (dist/ folder)
2645

27-
`npm run hot-reloader` - start hot-reloader (chokidar-socket-emitter)
28-
29-
`npm run build-test` - build production bundle - debug version with source-maps
30-
31-
`npm run build-prod` - build production bundle - optimized minified version w/o source-maps
46+
`npm run build-debug` - same as build but debug version with source-maps
47+
48+
`npm run build-deps` - build production dependency bundle (only external dependencies) (dist/ folder)
49+
50+
#### Dev Workflow
51+
1. `npm run bundle-dev` - _**OPTIONAL:** run only when your dependencies has changed_
52+
2. `npm start`
53+
54+
#### Build for Production Workflow
55+
1. `npm run build`
56+
2. `npm run build-deps` - _**OPTIONAL:** run only when your dependencies has changed_
57+
3. open `http://localhost/dist/` to check
58+
4. deploy 'dist' contents on your server
3259

3360
---
3461

3562
## Installation
3663

3764
#### Prerequisites
3865
- node.js and git
39-
- install jspm package globally to have jspm command available: `npm install jspm -g` (otherwise you would have to use a local version from `~/node_modules/`)
40-
66+
- install JSPM with global flag to have jspm command available: `npm install jspm -g` (otherwise you'll have to use a local version from `~/node_modules/`)
67+
4168

4269
#### 1. Create new project folder
4370
mkdir my-project && cd my-project
@@ -49,21 +76,16 @@ Modern, future-proof JavaScript Project Starter-Kit to build modular web apps wi
4976
npm install
5077

5178
#### 4. Run development server and start developing
52-
###### On windows
5379
npm start
54-
###### Other platforms
55-
npm run server
56-
npm run hot-reloader
80+
5781

5882
---
5983

6084
## Dependencies
6185
- https://github.com/Microsoft/TypeScript/
6286
- https://github.com/facebook/react/
63-
- https://github.com/Browsersync/browser-sync
64-
- https://github.com/capaj/chokidar-socket-emitter
65-
- https://github.com/jspm/jspm-cli
66-
- https://github.com/capaj/systemjs-hot-reloader
87+
- https://github.com/jspm/jspm-cli/
88+
- https://github.com/piotrwitek/jspm-hmr/
6789

6890
---
6991

0 commit comments

Comments
 (0)