From 87db640b51f125318a03a5389f3f2602002fa7ed Mon Sep 17 00:00:00 2001 From: tricinel Date: Mon, 16 Oct 2017 15:09:37 +0200 Subject: [PATCH 1/2] Improve tutorial documentation; fixes #71 --- content/tutorial/tutorial.md | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/content/tutorial/tutorial.md b/content/tutorial/tutorial.md index 5544da56..76f7120c 100644 --- a/content/tutorial/tutorial.md +++ b/content/tutorial/tutorial.md @@ -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 +``` + 6. Add these three lines to the top of `index.js` in the `src/` folder: ```js From 5a975b89a1917ac33a6822115113381bb2803640 Mon Sep 17 00:00:00 2001 From: tricinel Date: Mon, 16 Oct 2017 21:48:43 +0200 Subject: [PATCH 2/2] Remove bash snippets for touch and curl Because codepen was providing us with compiled javascript, it'd be best to leave the curl request snippets out of the tutorial. related to: #71 --- content/tutorial/tutorial.md | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/content/tutorial/tutorial.md b/content/tutorial/tutorial.md index 76f7120c..f32a5886 100644 --- a/content/tutorial/tutorial.md +++ b/content/tutorial/tutorial.md @@ -67,19 +67,9 @@ 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: +4. Add a file named `index.css` in the `src/` folder with [this CSS code](https://codepen.io/gaearon/pen/oWWQNa?editors=0100). -```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 -``` +5. Add a file named `index.js` in the `src/` folder with [this JS code](https://codepen.io/gaearon/pen/oWWQNa?editors=0010). 6. Add these three lines to the top of `index.js` in the `src/` folder: