Skip to content

Bump eslint-plugin-jsx-a11y version #1364

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

Closed
wants to merge 63 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
4f0b6bc
Bump eslint-plugin-jsx-a11y version
bondz Jan 9, 2017
ad4d16b
Update readme to latest jsx-a11y version
bondz Jan 9, 2017
691ae81
Use yarnpkg alias to run Yarn (#1365)
fson Jan 9, 2017
6bd0bba
Update changelog for 0.8.5
fson Jan 9, 2017
2364587
Publish
fson Jan 9, 2017
cea1eda
Add missing import in react-dev-utils README.md (#1369)
pedronauck Jan 11, 2017
9c043e2
Change console.log for errors and warnings (#1375)
jimmyhmiller Jan 11, 2017
9d2eac5
webpack-dev-server patch for 'still-ok' success status (#1377)
Jan 12, 2017
820a648
Document Flow support (#1384)
dschep Jan 12, 2017
1903ad3
Use a more sophisticated template for end-to-end testing. (#1187)
EnoahNetzach Jan 23, 2017
092167b
replace two space syntax with <br> tag (#1393)
carlsagan21 Jan 23, 2017
441e4f8
Add causes of dev server not detecting changes (#1422)
jetpackpony Jan 23, 2017
85c9ae6
Added links to tutorials for integrating cra with an api backend (#1437)
alexdriaguine Jan 24, 2017
deb2c29
Added babel-runtime dependency to deduplicate dependencies when using…
jkimbo Jan 24, 2017
c650ebf
Bump Jest version (#1432)
gaearon Jan 24, 2017
9684ced
Readme: Removes experimental from Jest snapshot (#1453)
frehner Jan 26, 2017
df7ae03
eject: Additionally remove `react-scripts` from dependencies (#1458)
creynders Jan 27, 2017
8ad0121
E2e jsdom fix (#1470)
EnoahNetzach Jan 30, 2017
4494462
- import expect and expect flow (#1463)
tuchk4 Jan 30, 2017
bfbb9bb
Reflect websocket proxy support on README (#1013) (#1483)
frontsideair Feb 4, 2017
cd2191f
Edit User Guide: Add ESLint config for VS Code users (#1482)
Feb 4, 2017
515a0df
e2e: Reduce complexity of e2e and improve Jest coverage (#1484)
Timer Feb 4, 2017
8f48efd
UX: Explain why build is failing (#1352)
jayphelps Jan 5, 2017
65cc877
Update comments for webpack loaders
ro-savage Feb 8, 2017
a25909e
Change "OS X" references to "macOS" (#1511)
RodrigoHahn Feb 9, 2017
b960c2c
corrected minor typo (#1514)
Feb 9, 2017
f5ae7c2
clarifying the use of custom environment variables (#1513)
calweb Feb 9, 2017
7125a2c
Add missing '\n' to the end of `package.json` file (#1510)
pd4d10 Feb 9, 2017
ceb1967
Make all react app vars accessible in index.html (#1440)
jihchi Feb 10, 2017
2801087
Add `PUBLIC_URL` env variable for advanced use (#937) (#1504)
Timer Feb 10, 2017
d314486
Support relative asset paths for special case (#1489)
tibdex Feb 10, 2017
8885d35
readme: Add Advanced Configuration (#1515)
Timer Feb 10, 2017
e31fa78
Make build exit with error code when interrupted (#1496)
brandones Feb 11, 2017
b5c1f1b
Bump lerna
gaearon Feb 11, 2017
7e1e65f
Add test cases for PUBLIC_URL and relative path (#1519)
Timer Feb 11, 2017
dbd468f
Add an annoying nit
gaearon Feb 11, 2017
1d2c2c6
Upgrade babel dependencies
Timer Feb 11, 2017
1589755
Don't run CI on Node 0.10 (#1521)
gaearon Feb 11, 2017
5183208
fix: add yarn gitignores (#1507)
AndersDJohnson Feb 11, 2017
a07da08
Upgrade dependencies (#1522)
Timer Feb 11, 2017
d0dc63d
Add CHANGELOG
Timer Feb 11, 2017
fac71a3
Publish
Timer Feb 11, 2017
937b441
Make index.html interpolation instructions less clashing with env syntax
gaearon Feb 11, 2017
d8f5726
Add additional info about env variables
gaearon Feb 11, 2017
1913573
Massage 0.9.0 changelog
gaearon Feb 11, 2017
e544c67
Add release cutters to changelog
gaearon Feb 11, 2017
7becafc
Tweak indentation
gaearon Feb 11, 2017
407ba64
Markdown whitespace fixes
gaearon Feb 11, 2017
05041f7
Some changelog formatting
gaearon Feb 11, 2017
3bb37fa
Upgrade webpack (#1291)
Timer Feb 11, 2017
22f268d
Suggest jest-enzyme for simplifying test matchers (#994)
blainekasten Feb 11, 2017
8bcfa1a
Add SASS support documentation #1007 (#1008)
tsironis Feb 12, 2017
d935f2a
Link to new Sass doc
gaearon Feb 12, 2017
131b705
Clarify Less/Sass support
gaearon Feb 12, 2017
cd43a7b
Fix `test -e` with wildcard arguments. (#1503)
marcusrbrown Feb 12, 2017
a11560c
Correctly Command in README.md (#1275)
lifez Feb 12, 2017
564f8f8
reactjs/redux#2004 List features beyond ES6 supported by create-react…
jonathanconway Feb 12, 2017
d753ee6
Add a link to supported features
gaearon Feb 12, 2017
549bf2c
[documentation] how to disable autoprefix feature (#1320)
Feb 12, 2017
423e71e
Added link to Azure deployment tutorial (#1338)
tpetrina Feb 12, 2017
9edb03c
Add useful link to react-scripts (#1495)
pd4d10 Feb 12, 2017
2e5b8eb
Update language support wording to ES2017
Timer Feb 12, 2017
086731a
Tweak syntax doc (#1539)
gaearon Feb 12, 2017
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
Prev Previous commit
Next Next commit
Add SASS support documentation #1007 (#1008)
* Add SASS support documentation #1007

* Change SASS section title to more generic label

* Fix link in Table of Contents

* Chain build-css with watch-css script, fix typos

* Update Sass and Less naming style

* Fix wording, remove offensive words

* Slightly rewite
  • Loading branch information
tsironis authored and bondz committed Feb 12, 2017
commit 8bcfa1a86f792aa7e68e52538760cfd9b9d151f1
47 changes: 47 additions & 0 deletions packages/react-scripts/template/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ You can find the most recent version of this guide [here](https://github.com/fac
- [Importing a Component](#importing-a-component)
- [Adding a Stylesheet](#adding-a-stylesheet)
- [Post-Processing CSS](#post-processing-css)
- [Adding a CSS Preprocessor (Sass, Less etc.)](#adding-a-css-preprocessor-sass-less-etc)
- [Adding Images and Fonts](#adding-images-and-fonts)
- [Using the `public` Folder](#using-the-public-folder)
- [Changing the HTML](#changing-the-html)
Expand Down Expand Up @@ -353,6 +354,52 @@ becomes this:

There is currently no support for preprocessors such as Less, or for sharing variables across CSS files.

## Adding a CSS Preprocessor (Sass, Less etc.)

Generally, we recommend that you don’t reuse the same CSS classes across different components. For example, instead of using a `.Button` CSS class in `<AcceptButton>` and `<RejectButton>` components, we recommend creating a `<Button>` component with its own `.Button` styles, that both `<AcceptButton>` and `<RejectButton>` can render (but [not inherit](https://facebook.github.io/react/docs/composition-vs-inheritance.html)).

Following this rule often makes CSS preprocessors less useful, as features like mixins and nesting are replaced by component composition. You can, however, integrate a CSS preprocessor if you find it valuable. In this walkthrough, we will be using Sass, but you can also use Less, or another alternative.

First, let’s install the command-line interface for Sass:

```
npm install node-sass --save-dev
```

Then in `package.json`, add the following lines to `scripts`:

```diff
"scripts": {
+ "build-css": "node-sass src/ -o src/",
+ "watch-css": "npm run build-css && node-sass src/ -o src/ --watch",
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
```

>Note: To use a different preprocessor, replace `build-css` and `watch-css` commands according to your preprocessor’s documentation.

Now you can rename `src/App.css` to `src/App.scss` and run `npm run watch-css`. The watcher will find every Sass file in `src` subdirectories, and create a corresponding CSS file next to it, in our case overwriting `src/App.css`. Since `src/App.js` still imports `src/App.css`, the styles become a part of your application. You can now edit `src/App.scss`, and `src/App.css` will be regenerated.

At this point you might want to remove all CSS files from the source control, and add `src/**/*.css` to your `.gitignore` file. It is generally a good practice to keep the build products outside of the source control.

As a final step, you may find it convenient to run `watch-css` automatically with `npm start`, and run `build-css` as a part of `npm run build`. You can use `&` operator for executing scripts in parallel, and `&&` for executing them sequentially:

```diff
"scripts": {
"build-css": "node-sass src/ -o src/",
"watch-css": "npm run build-css && node-sass src/ -o src/ --watch",
- "start": "react-scripts start",
- "build": "react-scripts build",
+ "start": "react-scripts start & npm run watch-css",
+ "build": "react-scripts build && npm run build-css",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
}
```

Now running `npm start` and `npm run build` also builds Sass files. Note that `node-sass` seems to have an [issue recognizing newly created files on some systems](https://github.com/sass/node-sass/issues/1891) so you might need to restart the watcher when you create a file until it’s resolved.

## Adding Images and Fonts

With Webpack, using static assets like images and fonts works similarly to CSS.
Expand Down