Commit e1083f0e authored by Shu Uesugi's avatar Shu Uesugi Committed by Joe Haddad

docs: remove --save from npm install; avoid system-ui (#10252)

* Minor edits for CSS doc

* Remove unnecessary --save from npm install

* Different font family
Co-authored-by: 's avatarJoe Haddad <timer150@gmail.com>
parent c9dc17b8
...@@ -15,7 +15,8 @@ For example, consider the following stylesheet named `styles.css`: ...@@ -15,7 +15,8 @@ For example, consider the following stylesheet named `styles.css`:
```css ```css
body { body {
font-family: 'SF Pro Text', 'SF Pro Icons', system-ui; font-family: 'SF Pro Text', 'SF Pro Icons', 'Helvetica Neue', 'Helvetica',
'Arial', sans-serif;
padding: 20px 20px 60px; padding: 20px 20px 60px;
max-width: 680px; max-width: 680px;
margin: 0 auto; margin: 0 auto;
......
...@@ -20,7 +20,7 @@ The interactive course with quizzes will guide you through everything you need t ...@@ -20,7 +20,7 @@ The interactive course with quizzes will guide you through everything you need t
Install `next`, `react` and `react-dom` in your project: Install `next`, `react` and `react-dom` in your project:
```bash ```bash
npm install --save next react react-dom npm install next react react-dom
``` ```
Open `package.json` and add the following `scripts`: Open `package.json` and add the following `scripts`:
......
...@@ -61,12 +61,12 @@ Instead, use a prefix that fits your company or any name for a group of related ...@@ -61,12 +61,12 @@ Instead, use a prefix that fits your company or any name for a group of related
### Node Modules ### Node Modules
- Run `npm install my-component --save` - Run `npm install my-component`
- Put a script tag similar to this `<script src='node_modules/my-component/dist/mycomponent.js'></script>` in the head of your index.html - Put a script tag similar to this `<script src='node_modules/my-component/dist/mycomponent.js'></script>` in the head of your index.html
- Then you can use the element anywhere in your template, JSX, html etc - Then you can use the element anywhere in your template, JSX, html etc
### In a stencil-starter app ### In a stencil-starter app
- Run `npm install my-component --save` - Run `npm install my-component`
- Add an import to the npm packages `import my-component;` - Add an import to the npm packages `import my-component;`
- Then you can use the element anywhere in your template, JSX, html etc - Then you can use the element anywhere in your template, JSX, html etc
...@@ -5,7 +5,7 @@ Use `webpack-bundle-analyzer` in your Next.js project ...@@ -5,7 +5,7 @@ Use `webpack-bundle-analyzer` in your Next.js project
## Installation ## Installation
``` ```
npm install --save @next/bundle-analyzer npm install @next/bundle-analyzer
``` ```
or or
......
...@@ -5,7 +5,7 @@ Use [MDX](https://github.com/mdx-js/mdx) with [Next.js](https://github.com/zeit/ ...@@ -5,7 +5,7 @@ Use [MDX](https://github.com/mdx-js/mdx) with [Next.js](https://github.com/zeit/
## Installation ## Installation
``` ```
npm install --save @next/mdx @mdx-js/loader npm install @next/mdx @mdx-js/loader
``` ```
or or
......
...@@ -7,7 +7,7 @@ import arg from 'next/dist/compiled/arg/index.js' ...@@ -7,7 +7,7 @@ import arg from 'next/dist/compiled/arg/index.js'
} catch (err) { } catch (err) {
// tslint:disable-next-line // tslint:disable-next-line
console.warn( console.warn(
`The module '${dependency}' was not found. Next.js requires that you include it in 'dependencies' of your 'package.json'. To add it, run 'npm install --save ${dependency}'` `The module '${dependency}' was not found. Next.js requires that you include it in 'dependencies' of your 'package.json'. To add it, run 'npm install ${dependency}'`
) )
} }
}) })
...@@ -94,7 +94,7 @@ const React = require('react') ...@@ -94,7 +94,7 @@ const React = require('react')
if (typeof React.Suspense === 'undefined') { if (typeof React.Suspense === 'undefined') {
throw new Error( throw new Error(
`The version of React you are using is lower than the minimum required version needed for Next.js. Please upgrade "react" and "react-dom": "npm install --save react react-dom" https://err.sh/zeit/next.js/invalid-react-version` `The version of React you are using is lower than the minimum required version needed for Next.js. Please upgrade "react" and "react-dom": "npm install react react-dom" https://err.sh/zeit/next.js/invalid-react-version`
) )
} }
......
...@@ -31,7 +31,7 @@ import checkCustomRoutes from '../lib/check-custom-routes' ...@@ -31,7 +31,7 @@ import checkCustomRoutes from '../lib/check-custom-routes'
if (typeof React.Suspense === 'undefined') { if (typeof React.Suspense === 'undefined') {
throw new Error( throw new Error(
`The version of React you are using is lower than the minimum required version needed for Next.js. Please upgrade "react" and "react-dom": "npm install --save react react-dom" https://err.sh/zeit/next.js/invalid-react-version` `The version of React you are using is lower than the minimum required version needed for Next.js. Please upgrade "react" and "react-dom": "npm install react react-dom" https://err.sh/zeit/next.js/invalid-react-version`
) )
} }
......
...@@ -11,7 +11,7 @@ const nextBin = path.join(nextDir, 'dist/bin/next') ...@@ -11,7 +11,7 @@ const nextBin = path.join(nextDir, 'dist/bin/next')
describe('Handles Incorrect React Version', () => { describe('Handles Incorrect React Version', () => {
it('should throw an error when building with next', async () => { it('should throw an error when building with next', async () => {
expect(() => require(nextBin)).toThrow( expect(() => require(nextBin)).toThrow(
/The version of React you are using is lower than the minimum required version needed for Next\.js\. Please upgrade "react" and "react-dom": "npm install --save react react-dom" https:\/\/err\.sh/ /The version of React you are using is lower than the minimum required version needed for Next\.js\. Please upgrade "react" and "react-dom": "npm install react react-dom" https:\/\/err\.sh/
) )
}) })
}) })
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment