Grace

What is Grace?

Grace enables you to write, build, test, deploy and upload dizmos without worrying about concatenating your classes together or having to deal with other problems. A SCSS parser is included so that you do not need to convert it on your own. Grace takes care of such tasks in your project, so that you do not have to worry about them, but can concentrating on writing pure JavaScript and HTML.

Please note that Grace can be used for Javascript projects in general but comes with a plug-in that supports working with dizmos specifically. We do not cover general usage of Grace but focus on how to use it for dizmo development. For more information about Grace in general have a look on Grace on GitHub and Grace-dizmo on GitHub

Installing Grace

This will install the Grace tool and its specific dizmo development features.

Windows

Install the latest Python 2.7.x release through the installer found here: https://www.python.org/downloads/

The Windows path environment will need the Python and Python scripts directories added to it.

You will want to add this to the beginning of the path value (in the system variables):

    C:\Python27\;C:\Python27\Scripts\;

To do that, type into the command prompt

$ path= %path%;C:\Python27\;C:\Python27\Scripts

and press Enter

If you want to add the path to Python permanently, you should add it to system variables. (Computer > Advanced System Settings > Environment Variables)

See also:

Continue the install as follows in the command prompt:

$ pip install grace
$ pip install grace-dizmo

Do I need to install pip?

pip is already installed if you’re using Python >=2.7.9

Additionally, pip will already be installed if you’re working in a Virtual Environment created by virtualenv or pyvenv.

If an installation is needed, either install a newer Python Release (>=2.7.9, which includes pip) or install pip the following way:

Download the pip installer from https://bootstrap.pypa.io/get-pip.py … right-click the link and with the context menu item save as ... save the file to your Desktop.

Open cmd and go to the Desktop. You can do that by typing cd Desktop

Then use the python get-pip.py command to install pip

Mac

First, we need to install the command line tools from Xcode. These Command Line Tools let us automatically build python modules on our system. Xcode is available via the Mac App Store.

Open Terminal and run the following commands:

$ sudo easy_install pip
$ sudo pip install grace
$ sudo pip install grace-dizmo

Note: Because of version incompatibilites between official Python libraries and the ones OS X 10.11 (El Capitan) supplies please use the following extended commands

$ sudo pip install grace --ignore-installed six
$ sudo pip install grace-dizmo --ignore-installed six

Should the installation fail on the second command listed, then you have hit upon a bug related to Xcode 5.1.x. To resolve this you will need to run the second command as follows:

    sudo easy_install pipsudo CFLAGS=-Qunused-arguments CPPFLAGS=-Qunused-arguments pip install grace

Linux

$ sudo apt-get install python-pip
$ pip install grace --user
$ pip install grace-dizmo --user

Note: If the install fails on the second or third command listed, you likely need to install python2.7-dev like so:

$ sudo aptitude install python2.7-dev

To finish off, run the following to update your PATH:

$ echo "export PATH=~/.local/bin:$PATH" >> ~/.bashrc

Updating Grace

Make sure that you update Grace to its latest version from time to time.

Mac

$ sudo pip install -U grace grace-dizmo

Note: Due to the System Integrity Protection introduced in OS X El Capitan, you need to upgrade grace as following, otherwise you will get error message:

pip install --upgrade grace --user python
pip install --upgrade grace-dizmo --user python

Windows

$ pip install -U grace grace-dizmo

Linux

$ pip install --upgrade --user grace grace-dizmo

External resources