8.1 Compiling the code and developing a build file

To learn about build, See What is the build folder?

Now that we know what a build is all about, let's go ahead and build the newton-raphson simulation.

These are the following steps to make this happen:

  1. Open your terminal (mac) or cmd (windows)

  2. Assuming that the current directory is Desktop and that you have the phetsims directory on your Desktop, 
    type cd phetsims to go inside the phetsims directory and then,
    type cd newton-raphson to go inside the newton-raphson directory.

  3. At this point all you have to do is:
    type grunt build --brands=your-brand-name (Note: put the name of your brand)

  4. This process might take a minute but at the end of it, if you were successful, you should see something like this:

  5. That "Done."  means that you're done with building your minified html file and to access it
    Just go to your phetsims folder
    Then open up the newton-raphson folder
    And look for the build folder:

  6. Open up at build folder and then open the folder with your brand name, in this case it was adapted-from-phet Inside you’ll find a bunch of files
    We are concerned with the html file
    However you’ll notice that this folder has 2 html files
    The one we’re looking for is this one:

  7. Open it up and voila!