Skip to content

Improve tutorial documentation; fixes #71 #165

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

Merged
merged 2 commits into from
Oct 16, 2017
Merged
Changes from 1 commit
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
30 changes: 27 additions & 3 deletions content/tutorial/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,33 @@ If you want to do it, here are the steps to follow:

1. Make sure you have a recent version of [Node.js](https://nodejs.org/en/) installed.
2. Follow the [installation instructions](/docs/installation.html#creating-a-new-application) to create a new project.
3. Delete all files inside the `src/` folder of the new project (don't delete the folder, just its contents (eg `rm -f src/*`)).
4. Add a file named `index.css` in the `src/` folder with [this CSS code](https://codepen.io/gaearon/pen/oWWQNa?editors=0100).
5. Add a file named `index.js` in the `src/` folder with [this JS code](https://codepen.io/gaearon/pen/oWWQNa?editors=0010).

```bash
npm install -g create-react-app
create-react-app my-app
```

3. Delete all files in the `src/` folder of the new project (don't delete the folder, just its contents).

```bash
cd my-app
rm -f src/*
```

4. Add a file named `index.css` in the `src/` folder with [this CSS code](https://codepen.io/gaearon/pen/oWWQNa?editors=0100), or type in the following commands:

```bash
touch src/index.css
curl -L https://codepen.io/gaearon/pen/oWWQNa.css > src/index.css
```

5. Add a file named `index.js` in the `src/` folder with [this JS code](https://codepen.io/gaearon/pen/oWWQNa?editors=0010), or type in the following commands:

```bash
touch src/index.js
curl -L https://codepen.io/gaearon/pen/oWWQNa.js > src/index.js
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just noticed that this JS is compiled. That's probably not ideal.

I'm thinking maybe we should just remove these 2 touch+curl snippets, at least unless there's a way to get the pre-compilation JS. Thoughts?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, yes, you're right. Should have paid more attention to that. Do you feel we should remove the touches as well, or just the curls?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eh...probably both? Might be confusing to have the touch without the curl.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool. I'll remove in a sec.

```

6. Add these three lines to the top of `index.js` in the `src/` folder:

```js
Expand Down