Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[gitbook] update gitbook for archetype styles #704

Merged
merged 5 commits into from
Feb 2, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
- [Eslint Config](/chapter1/intermediate/app-archetype/eslint.md)
- [Webpack Config](/chapter1/intermediate/app-archetype/webpack-config.md)
- [Environment Variables](/chapter1/intermediate/app-archetype/env-vars.md)
- [Extract Styles](/chapter1/intermediate/app-archetype/extract-styles.md)

- [Component Archetype](chapter1/intermediate/component-archetype/README.md)

Expand Down
2 changes: 2 additions & 0 deletions docs/chapter1/intermediate/app-archetype/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

The application archetype is a pair of npm modules that provide common patterns and configurations for developing a universal React application. With the application generator, you can quickly create and start developing a React application. The defaults generally are well suited for many applications, but it is possible to customize some features and enable more advanced features for your specific needs.

- [Customize Config](/chapter1/intermediate/app-archetype/customize-config.md)
- [Eslint Config](/chapter1/intermediate/app-archetype/eslint.md)
- [Webpack Config](/chapter1/intermediate/app-archetype/webpack-config.md)
- [Environment Variables](/chapter1/intermediate/app-archetype/env-vars.md)
- [Extract Styles](/chapter1/intermediate/app-archetype/extract-styles.md)
3 changes: 3 additions & 0 deletions docs/chapter1/intermediate/app-archetype/env-vars.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ Some of the app archetype's features can be controlled by environment variables.

* Default is `false`

* `CSS_MODULE_SUPPORT` - If `false`, then disable `CSS-Modules` and `CSS-Next` support, and load as pure `CSS`. If `true`, then enable `CSS-Modules` and `CSS-Next` support, and load as `CSS-Modules + CSS-Next`.

* Default is `undefined`

* `CSS_MODULE_STYLUS_SUPPORT` - if `true`, then enable `stylus` support for CSS modules.

Expand Down
21 changes: 21 additions & 0 deletions docs/chapter1/intermediate/app-archetype/extract-styles.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Extract Styles

Application Archetype supports multiple styles, such as pure CSS, [CSS-Modules + CSS-Next](https://github.com/css-modules/css-modules), [Stylus](http://stylus-lang.com/docs/css-style.html) and [SCSS](http://sass-lang.com/). Use the following flags to choose your desired styles.

## Flags

> Note: You can check how to customize the configs [here](/chapter1/intermediate/app-archetype/customize-config.md#extending-webpack-configurations).

- `cssModuleSupport`: A flag to enable `css-modules + css-next` support.
- <span style="color:red">**[Deprecated Warning] This is not a recommended set up.**</span> `cssModulesStylusSupport`: A flag to enable `stylus` support with CSS modules. (Default: false)

## Style Use Cases

- To use pure CSS, include `*.css` to your styles folder and set `cssModuleSupport` to false.
- To use CSS-Modules + CSS-Next, include `*.css` to your styles folder.

- To use Stylus, include `*.styl` to your styles folder.
- To use Stylus along with CSS-Modules + CSS-Next, include `*.styl` to your styles folder and set `cssModuleSupport` to true.

- To use SCSS, include `*.scss` to your styles folder.
- To use SCSS along with CSS-Modules + CSS-Next, include `*.scss` to your styles folder and set `cssModuleSupport` to true.