Skip to content

Commit 03c98fe

Browse files
committed
prerelease fixes
1 parent dbf4b9f commit 03c98fe

File tree

2 files changed

+20
-9
lines changed

2 files changed

+20
-9
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Table of Contents
2020
## Innovations
2121

2222
### 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.
2424
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.
2525

2626
### SCALABLE-HOT-RELOAD
@@ -32,15 +32,15 @@ This approach gives you great scalability with increasing modules count as you r
3232
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.
3333

3434
### 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.
3636
- Full CSS support with pseudo-classes & media queries, encapsulated in ES6 Modules that can be nicely imported by your UI components.
3737
- 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)
3939
(animated gif placeholder...)
4040

4141
### ASYNC/AWAIT/GENERATORS transformation when targeting ES3/ES5 (without Babel)
4242
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.
4444
__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/)
4545
__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)
4646

@@ -54,7 +54,7 @@ __NOTE (06/10/2016): As TypeScript Team have dropped adding support for downleve
5454
- IMMUTABLE-STORE - using `seamless-immutable` for simplicity and backwards-compatibility with vanilla JS (no hassle with `toJS()`, `get()`, `getIn()` in your containers and components)
5555
- BEM & ITCSS - using BEM with Inverted Triangle conventions to give meaning and context to CSS classes
5656
- 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)
5858

5959
#### React Best Practices & Optimizations
6060
- no mixins -> use ES6 style PureRenderMixin with PureComponent

src/containers/css-modules-container/index.tsx

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,21 @@ export function CssModulesContainer() {
99
<article>
1010
<PageHeader>CSS Modules</PageHeader>
1111
<p>
12-
Own concept to achieve locally scoped CSS styles with statically typed CSS class names using TypeScript.
12+
Own concept to achieve locally scoped CSS styles
13+
using <a href="https://github.com/rtsao/csjs#faq">(csjs)</a> with
14+
statically typed CSS class-names using TypeScript.
1315
</p>
1416
<ul>
1517
<li>
16-
Full CSS support with pseudo-classes & media queries, encapsulated in ES6 Modules that can be nicely imported by your UI components.
18+
Full CSS support with pseudo-classes & media queries, encapsulated in
19+
ES6 Modules that can be nicely imported by your UI components.
20+
</li>
21+
<li>
22+
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.
1726
</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>
1927
</ul>
2028
<br />
2129
<PageSection className={containerStyles.textCentered}>
@@ -36,7 +44,10 @@ export function CssModulesContainer() {
3644
</PageSection>
3745
<br />
3846
<p className="u-centered">
39-
Source code: <a href="https://github.com/piotrwitek/react-redux-typescript-starter-kit/tree/master/src/containers/css-modules-container">Link to GitHub</a>
47+
Source code: <a
48+
href="https://github.com/piotrwitek/react-redux-typescript-starter-kit/tree/master/src/containers/css-modules-container">
49+
Link to GitHub
50+
</a>
4051
</p>
4152
<br />
4253
</article>

0 commit comments

Comments
 (0)