not really known
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
2.6 KiB

  1. [Go back to tutorial home](tutorial.md)
  2. # Step 0: set up the development environment
  3. *(Estimated time: 15mn)*
  4. For this tutorial, you will just need a browser and a text editor.
  5. We will run Sugarizer from a local directory that will contain all files needed.
  6. ### Create the Sugarizer directory
  7. To start, download **Sugarizer** from [here](https://github.com/llaske/sugarizer/archive/dev.zip). It's a 250Mb package so it could take some time. Once downloaded, unzip it.
  8. If you're familiar with **git**, you could clone the repository - dev branch - instead like this:
  9. git clone -b dev https://github.com/llaske/sugarizer
  10. Whatever method used, you should have at end a Sugarizer directory like this:
  11. ![](images/tutorial_step0_2.png)
  12. ### Run Sugarizer
  13. We will use **Chrome** in this tutorial but any other browser will work as well.
  14. To run Sugarizer locally in Chrome, close any running instances of Chrome and re-launch it using the command line:
  15. chrome --allow-file-access-from-files index.html
  16. * On this line `chrome` is the name of the Chrome executable file. Depending of your system it could be `google-chrome` or `"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"` or `open -n /Applications/Google\ Chrome.app --args` instead.
  17. * The option `--allow-file-access-from-files` is required to enable access to local files using XMLHttpRequest. Equivalent options for other browser [are available](https://github.com/mrdoob/three.js/wiki/How-to-run-things-locally).
  18. * The `index.html` file is located in the new Sugarizer directory so you will have to use `cd` command line to change location to this directory before running the command.
  19. If everything is right, you should see something like that:
  20. ![](images/tutorial_step0_0.png)
  21. Click on "New user", type your name and choose your color, you should see the Sugarizer home view:
  22. ![](images/tutorial_step0_1.png)
  23. To debug your code, it's a good practice too to use the development console of your browser. See [here](https://developers.google.com/web/tools/chrome-devtools/) how to activate this console on Chrome.
  24. ### Edit source code
  25. To develop the activity and to update the source code you will need also a **text editor**. You could use for example [Lime](http://limetext.org/) on Linux, [Notepad++](https://notepad-plus-plus.org) on Windows, [Atom](https://atom.io/) on MacOS but any other text editor will work as well.
  26. Let's start by opening the Sugarizer directory in your favorite editor. You should see something like that:
  27. ![](images/tutorial_step0_3.png)
  28. You're now ready to start.
  29. [Go to next step](tutorial_step1.md)