You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ Table of Contents
20
20
## Innovations
21
21
22
22
### RAPID-SPEED DEVELOPMENT WORKFLOW - TypeScript source file hot-reload and in-the-browser transpilation
23
-
Super-fast development experience by loading TypeScript source files directly in the browser (using (plugin-typescript)[https://github.com/frankwallis/plugin-typescript]) while seperately type-checking them in the IDE or in the command-line in watch mode, without transpilation for intermediate JS files or bundling.
23
+
Super-fast development experience by loading TypeScript source files directly in the browser (using [plugin-typescript](https://github.com/frankwallis/plugin-typescript)) while seperately type-checking them in the IDE or in the command-line in watch mode, without transpilation for intermediate JS files or bundling.
24
24
Joined together with single-file hot-reload gives you almost instant feedback-loop as there is no costly project-wide transpilation or bundling step involved.
25
25
26
26
### SCALABLE-HOT-RELOAD
@@ -32,15 +32,15 @@ This approach gives you great scalability with increasing modules count as you r
32
32
If you are coding in a NO-IDE environment (notepad/vim) or expecting to have a common way across a team to target a specific version of typescript compiler even while using different Editors/IDEs, you can utilize __CLI type-checking workflow__ using `tsc -p src --watch` command for fast incremental type-checking or `tsc -p src` command for project-wide type-check, there is no JS emit so it will not clutter your project or disrupt different build processes based on various IDE plugins or gulp/grunt based tasks.
33
33
34
34
### CSS-MODULES WITH TYPED CLASS-NAMES
35
-
Own concept to achieve locally scoped CSS styles with statically typed CSS class-names using TypeScript.
35
+
Own concept to achieve locally scoped CSS styles using [csjs](https://github.com/rtsao/csjs#faq)with statically typed CSS class-names using TypeScript.
36
36
- Full CSS support with pseudo-classes & media queries, encapsulated in ES6 Modules that can be nicely imported by your UI components.
37
37
- Define interfaces with your CSS classes and you get className property type-checking, solid auto-completion and easy refactoring. You can also add doc comments and auto-generate docs of your styles library for your team and utilize IntelliSense features of your IDE.
38
-
EXAMPLE: (css-modules-container component)[src/containers/about-container/index.tsx] and it's (about-styles css-module)[src/containers/about-container/about-styles.tsx]
38
+
__EXAMPLE:__[Consumer Component](src/containers/css-modules-container/index.tsx) and it's [CSS Module Styles in TypeScript Format with Class-Names Interface](src/containers/css-modules-container/container-styles.tsx)
39
39
(animated gif placeholder...)
40
40
41
41
### ASYNC/AWAIT/GENERATORS transformation when targeting ES3/ES5 (without Babel)
42
42
Many TS boilerplates are using Babel transpilation step after the TypeScript compiler output to get support for "async & generator functions transformation" when targeting ES3/ES5. This is costly process and introduces additional build step into the build workflow.
43
-
My solution promote using only (Facebook Regenerator Project)[https://github.com/facebook/regenerator] (Babel internally doing the same!) which is executed only when running build for production. Use CLI command `npm run regenerator` after building for production.
43
+
My solution promote using only [Facebook Regenerator Project](https://github.com/facebook/regenerator) (Babel internally doing the same!) which is executed only when running build for production. Use CLI command `npm run regenerator` after building for production.
44
44
__NOTE: This is the same as Babel, because Babel is using "regenerator runtime" internally for async/generator functions transformations. So, why in the TS world we shouldn't be doing the same?__ (reference: https://babeljs.io/docs/usage/caveats/)
45
45
__NOTE (06/10/2016): As TypeScript Team have dropped adding support for downlevel (ES3/ES5) generator transformation in the near future, I believe this is the most optimal solution to use at the moment__ (reference: https://github.com/Microsoft/TypeScript/issues/3975#issuecomment-250859415)
46
46
@@ -54,7 +54,7 @@ __NOTE (06/10/2016): As TypeScript Team have dropped adding support for downleve
54
54
- IMMUTABLE-STORE - using `seamless-immutable` for simplicity and backwards-compatibility with vanilla JS (no hassle with `toJS()`, `get()`, `getIn()` in your containers and components)
55
55
- BEM & ITCSS - using BEM with Inverted Triangle conventions to give meaning and context to CSS classes
56
56
- EASY TESTING IN TYPESCRIPT - write your tests only in TypeScript - don't worry about transpilation, easily import and run your TS source files from a command line (use `npm test` CLI command).
57
-
Test harness with (Tape)[https://github.com/substack/tape] with Promise support from (blue-tape)[https://github.com/spion/blue-tape]
57
+
Test harness with [Tape](https://github.com/substack/tape) with Promise support from [blue-tape](https://github.com/spion/blue-tape)
58
58
59
59
#### React Best Practices & Optimizations
60
60
- no mixins -> use ES6 style PureRenderMixin with PureComponent
Define interfaces with your CSS classes and you get className property
23
+
type-checking, solid auto-completion and easy refactoring.
24
+
You can also add doc comments and auto-generate docs of your styles
25
+
library for your team and utilize IntelliSense features of your IDE.
17
26
</li>
18
-
<li>Define interfaces with your CSS classes and you get className property type-checking, solid auto-completion and easy refactoring. You can also add doc comments and auto-generate docs of your styles library for your team and utilize IntelliSense features of your IDE.</li>
@@ -36,7 +44,10 @@ export function CssModulesContainer() {
36
44
</PageSection>
37
45
<br/>
38
46
<pclassName="u-centered">
39
-
Source code: <ahref="https://github.com/piotrwitek/react-redux-typescript-starter-kit/tree/master/src/containers/css-modules-container">Link to GitHub</a>
0 commit comments