From dad91d7855f9839c3126ca2478527249012fa181 Mon Sep 17 00:00:00 2001 From: Andy Meneely Date: Wed, 22 May 2019 15:07:46 -0400 Subject: [PATCH] docs: document running your code --- CHANGELOG.md | 1 + docs/README.md | 20 ++++++++++++++++ docs/conf.py | 4 ++-- .../getting-started/part_1_zero_to_game.rst | 23 +++++++++++++++++++ 4 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 docs/README.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 7bd6047..356e56f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ Features: Docs: * Documented the n-sided-ness of polygons and stars * svg: document rasterization on mask (#192) +* Document how to run the code (#186) Chores: * Bumped deps: Pango et al. to 3.3.6, Cairo to 1.16.4, Nokogiri to 1.10.3 diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..d177c67 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,20 @@ +# Building these Docs Locally + +Install these: + +$ pip install sphinx sphinx-autobuild sphinx_rtd_theme + +To run the server: + +``` +$ cd docs +$ ./server.bat +``` + +or + +``` +$ sphinx-autobuild . _build/html +``` + +Then visit http://localhost:8000 to see the docs. diff --git a/docs/conf.py b/docs/conf.py index 1997ced..9d45672 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -55,9 +55,9 @@ author = u'Andy Meneely' # built documents. # # The short X.Y version. -version = u'v0.14' +version = u'v0.15' # The full version, including alpha/beta/rc tags. -release = u'v0.14.2' +release = u'v0.15.0' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/docs/guides/getting-started/part_1_zero_to_game.rst b/docs/guides/getting-started/part_1_zero_to_game.rst index 6fa7986..c1bbca0 100644 --- a/docs/guides/getting-started/part_1_zero_to_game.rst +++ b/docs/guides/getting-started/part_1_zero_to_game.rst @@ -29,6 +29,7 @@ See :doc:`/install` for more details. This guide also assumes you've got some basic Ruby experience, and you've got your tools set up (i.e. text editor, command line, image preview, etc). See :doc:`part_0_learning_ruby` to see my recommendations. + Our Idea: Familiar Fights ------------------------- Let's start with an idea for a game: Familiar Fights. Let's say we want to have players fight each other based on collecting cards that represent their familiars, each with different abilities. We'll have two factions: drones and humans. Each card will have some artwork in it, and some text describing their powers. @@ -46,6 +47,28 @@ Go ahead and put "Familiar Fights" as an idea for a title in the ``IDEAS.md`` fi If you're using Git or other version control, now's a good time to commit. See :doc:`/guides/git`. +Running Your Squib Build +------------------------ + +The simplest way to build with Squib is to run this command line: + +.. code-block:: none + + $ ruby deck.rb + +Squib cares about which directory you are currently in. For example, it will create that ``_output`` directory in the current directory, and it will look up files according to your current directory. + +An alternative to running the ruby command directly is to use Ruby's Rake build system. +Rakefiles are designed for building projects that have lots of files (that's us!). +The default Rakefile that Squib generates simply runs the ``deck.rb``. To use Rake, you run this from this directory or any subdirectory. + +.. code-block:: none + + $ rake + +We'll discuss Rake and various other workflow things like auto-building in the :doc:`/guides/getting-started/part_3_workflows`. + + Data or Layout? ---------------