Skip to content

Commit fa91c4e

Browse files
oletiziclaudiahdz
authored andcommitted
Added copy to the features page
- Added an install page (copied from existing online docs) - Added a FeatureLink component to components/links.js note: external link on features page has a hack for styling; that should probably be fixed, but want to get the copy to the team asap.
1 parent c17dba6 commit fa91c4e

File tree

3 files changed

+122
-20
lines changed

3 files changed

+122
-20
lines changed
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
section: configuring-npm
3+
title: 00 install
4+
description: Download and install node and npm
5+
---
6+
7+
# Download and Install npm
8+
9+
To publish and install packages to and from the public npm registry, you must install Node.js and the npm command line interface using either a Node version manager or a Node installer. **We strongly recommend using a Node version manager to install Node.js and npm.** We do not recommend using a Node installer, since the Node installation process installs npm in a directory with local permissions and can cause permissions errors when you run npm packages globally.
10+
11+
### Overview
12+
13+
- [Checking your version of npm and Node.js](#checking-your-version-of-npm-and-node-js)
14+
- [Using a Node version manager to install Node.js and npm](#using-a-node-version-manager-to-install-node-js-and-npm)
15+
- [Using a Node installer to install Node.js and npm](#using-a-node-installer-to-install-node-js-and-npm)
16+
17+
### Checking your version of npm and Node.js
18+
19+
To see if you already have Node.js and npm installed and check the installed version, run the following commands:
20+
21+
```
22+
node -v
23+
npm -v
24+
```
25+
26+
### Using a Node version manager to install Node.js and npm
27+
28+
Node version managers allow you to install and switch between multiple versions of Node.js and npm on your system so you can test your applications on multiple versions of npm to ensure they work for users on different versions.
29+
30+
#### OSX or Linux Node version managers
31+
32+
* [nvm](https://github.com/creationix/nvm)
33+
* [n](https://github.com/tj/n)
34+
35+
#### Windows Node version managers
36+
37+
* [nodist](https://github.com/marcelklehr/nodist)
38+
* [nvm-windows](https://github.com/coreybutler/nvm-windows)
39+
40+
### Using a Node installer to install Node.js and npm
41+
42+
If you are unable to use a Node version manager, you can use a Node installer to install both Node.js and npm on your system.
43+
44+
* [Node.js installer](https://nodejs.org/en/download/)
45+
* [NodeSource installer](https://github.com/nodesource/distributions). If you use Linux, we recommend that you use a NodeSource installer.
46+
47+
#### OS X or Windows Node installers
48+
49+
If you're using OS X or Windows, use one of the installers from the [Node.js download page](https://nodejs.org/en/download/). Be sure to install the version labeled **LTS**. Other versions have not yet been tested with npm.
50+
51+
#### Linux or other operating systems Node installers
52+
53+
If you're using Linux or another operating system, use one of the following installers:
54+
55+
- [NodeSource installer](https://github.com/nodesource/distributions) (recommended)
56+
- One of the installers on the [Node.js download page](https://nodejs.org/en/download/)
57+
58+
Or see [this page](https://nodejs.org/en/download/package-manager/) to install npm for Linux in the way many Linux developers prefer.
59+
60+
61+
#### Less-common operating systems
62+
63+
For more information on installing Node.js on a variety of operating systems, see [this page][pkg-mgr].
64+
65+
66+
[pkg-mgr]: https://nodejs.org/en/download/package-manager/

docs/src/components/home/Features.js

Lines changed: 45 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
import React from 'react'
22
import styled from 'styled-components'
33
import FeatureCard from './FeatureCard'
4-
import {Flex} from 'rebass'
4+
import { FeatureLink } from '../links'
5+
import { Flex } from 'rebass'
56
import rectangles from '../../images/background-rectangles.svg'
67
import terminalIcon from '../../images/terminal-icon.svg'
78
import networkIcon from '../../images/network-icon.svg'
9+
import npmIcon from '../../images/npm-icon.png'
810
import managerIcon from '../../images/manager-icon.svg'
911

1012
const ContainerInner = styled(Flex)`
@@ -20,35 +22,58 @@ const ContentWrapper = styled(Flex)`
2022
`
2123

2224
const featureTexts = {
23-
textOne: 'Nunc malesuada suscipit enim at feugiat. Duis id mauris lectus. Donec a sagittis lectus.',
24-
textTwo: 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod Lorem ipsum dolor sit amet, tetuer adipiscing elit, sed diam nonummy nibmod'
25+
textOne: 'Download, install, and configure.',
26+
textTwo: 'All available npm commands.',
27+
textThree: 'How npm things work.',
28+
textFour: 'Publish your own public or private packages to the registry.'
2529
}
2630

2731
const featureTitles = {
28-
titleOne: 'Really Fast',
29-
titleTwo: 'Easy to Use'
32+
titleOne: 'Getting Started',
33+
titleTwo: 'Command Reference',
34+
titleThree: 'Using npm',
35+
titleFour: 'Publishing'
3036
}
3137

38+
const aStyle = {
39+
color: '#231f20',
40+
textDecoration: 'none'
41+
}
42+
const productsLink = `https://www.npmjs.com/products`
43+
3244
const Features = () => {
3345
return (
3446
<Container>
3547
<ContainerInner>
3648
<ContentWrapper m='auto' py={5} flexDirection='column'>
37-
<FeatureCard
38-
icon={terminalIcon}
39-
title={featureTitles.titleOne}
40-
text={featureTexts.textOne}
41-
/>
42-
<FeatureCard
43-
icon={managerIcon}
44-
title={featureTitles.titleTwo}
45-
text={featureTexts.textTwo}
46-
/>
47-
<FeatureCard
48-
icon={networkIcon}
49-
title={featureTitles.titleOne}
50-
text={featureTexts.textOne}
51-
/>
49+
<FeatureLink to={'/configuring-npm/install'}>
50+
<FeatureCard
51+
icon={terminalIcon}
52+
title={featureTitles.titleOne}
53+
text={featureTexts.textOne}
54+
/>
55+
</FeatureLink>
56+
<FeatureLink to={'/cli-commands/npm'}>
57+
<FeatureCard
58+
icon={managerIcon}
59+
title={featureTitles.titleTwo}
60+
text={featureTexts.textTwo}
61+
/>
62+
</FeatureLink>
63+
<FeatureLink to={'/using-npm/coding-style'}>
64+
<FeatureCard
65+
icon={networkIcon}
66+
title={featureTitles.titleThree}
67+
text={featureTexts.textThree}
68+
/>
69+
</FeatureLink>
70+
<a href={productsLink} style={aStyle} target={'_blank'}>
71+
<FeatureCard
72+
icon={npmIcon}
73+
title={featureTitles.titleFour}
74+
text={featureTexts.textFour}
75+
/>
76+
</a>
5277
</ContentWrapper>
5378
</ContainerInner>
5479
</Container>

docs/src/components/links.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ const baseLinkStyles = css`
77
letter-spacing: .3px;
88
font-size: 14px;
99
`
10+
const featureLinkStyles = css`
11+
${baseLinkStyles}
12+
color: ${(props) => props.theme.colors.black};
13+
transition: opacity .5s
14+
&:hover {
15+
opacity: .9;
16+
}
17+
`
1018

1119
const navLinkStyles = css`
1220
${baseLinkStyles};
@@ -18,6 +26,9 @@ const navLinkStyles = css`
1826
opacity: .5;
1927
}
2028
`
29+
export const FeatureLink = styled(Link)`
30+
${featureLinkStyles}
31+
`
2132

2233
export const NavLink = styled(Link)`
2334
${navLinkStyles};

0 commit comments

Comments
 (0)