Skip to content

Commit ebcf97d

Browse files
committed
docs(README): add 'styles' section, link 'webpack-1' branch
1 parent 42b1bcd commit ebcf97d

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Example project demonstrating the use of [React Flag Icon Css](//github.com/matteocng/react-flag-icon-css) with [React Css Modules](//github.com/gajus/react-css-modules), standard Css and custom flags. Powered by [Webpack 2](//github.com/webpack/webpack).
1+
Example project demonstrating the use of [React Flag Icon Css](https://github.com/matteocng/react-flag-icon-css-example-multi/tree/webpack-1) with [React Css Modules](//github.com/gajus/react-css-modules) or standard Css, and custom flags. Powered by [Webpack 2](https://github.com/webpack/webpack) (there is also a [Webpack 1 version](https://github.com/webpack/webpack)).
22

33
## Installation
44

@@ -38,6 +38,15 @@ This example project uses the <code>USE_CSS_MODULES</code> environment variable
3838

3939
In a real project you would probably choose to either go with [React Css Modules](//github.com/gajus/react-css-modules) or standard Css, removing the <code>USE_CSS_MODULES</code> switch and <code>getStylePropName</code>, replacing <code>[options.stylePropName]</code> in the React components with either <code>className</code> (standard Css) or <code>styleName</code> (modules).
4040

41+
## Styles
42+
43+
This example app uses `sass` (`.scss`) styles, but `sass` is not required to use `react-flag-icon-css`. Your app can use any CSS preprocessor (such as [`postcss`](https://github.com/postcss/postcss)) or no CSS preprocessor at all. For instance, to use [`postcss`](https://github.com/postcss/postcss) in your stylesheets:
44+
- rename `.scss` files to `.css`.
45+
- remove *`sass-loader`* from [webpack.config.js](webpack/webpack.config.js).
46+
- `npm install` or `yarn add` the `PostCSS` plugins that you need.
47+
- `import()` them into [webpack.config.js](webpack/webpack.config.js)
48+
- add them to the `postcss` section after `autoprefixer`.
49+
4150
## Contributing
4251

4352
Contributions are welcome. Please use a topic branch, follow the [AngularJS commit style guidelines](//github.com/angular/angular.js/blob/master/CONTRIBUTING.md#-git-commit-guidelines) and check that <code>yarn run pre-commit</code> returns zero errors before opening a PR. Thanks!

0 commit comments

Comments
 (0)