Browse Source

Merge pull request #49 from hhzl/master

listed grunt as tool, renamed sections
Hannes Hirzel 9 years ago
parent
commit
fe7500efd8
1 changed files with 43 additions and 22 deletions
  1. 43 22
      README.md

+ 43 - 22
README.md

@@ -1,31 +1,33 @@
 amber-examples
 ==============
 
-Various amber examples
+This project contains various [Amber Smalltalk](http://amber-lang.net/)  examples. Amber may run in a web browser or as a command line program.
 
 
-
-Prerequisites
+Tools needed
 =============
 
 1. A web browser with reasonably good support for HTML5 canvas.
 2. git, on Windows [Git for Windows](http://msysgit.github.com/)
 3. [nodejs](http://www.nodejs.org/). This will give you the node package manager `npm` as well.
-4. A global install of the [`amber`](http://amber-lang.net/) [npm](http://npmjs.org/) package
+4. A global install of the [`amber-cli`](http://amber-lang.net/) [npm](http://npmjs.org/) package
 5. A global install of the [`bower`](http://bower.io/) client side package manager in order to install the dependencies
+6. A global install of the [`grunt-cli`](http://gruntjs.com/) task runner which is used as the command line build system 
 
-The `amber` and `bower` packages can be installed with the following command (In some cases you have to call `npm` with `sudo npm`):
+The `amber`, `bower` and `grunt-cli` packages can be installed with the following command (In some cases you have to call `npm` with `sudo npm`):
 
-    npm install --global amber-cli bower
+    npm install --global amber-cli bower grunt-cli
 
-or the same thing, but less typing:
+or as short form:
 
-    npm i -g amber-cli bower
+    npm i -g amber-cli bower grunt-cli
+    
 
 Reference: http://docs.amber-lang.net/js-glossary.html
 
-Getting started
-===============
+
+Setting up amber-examples 
+==========================
 
 Clone the repository 
 
@@ -38,7 +40,13 @@ Get dependencies of this project:
     npm install
     bower install
 
-Afterwards execute the server:
+
+Amber in the browser  
+==========================
+
+Amber runs in the browser and this includes an IDE. The ``amber`` subdirectory of ``bower_components`` is used.
+
+To have access to this start a small web server:
 
 `amber serve`
 
@@ -46,25 +54,38 @@ and point your browser to
 
 `http://localhost:4000/`
 
-Rebuilding examples using Grunt.js (development mode)
-====================================================
 
-Since Amber 0.10.0 Grunt.js is used as commandline build system.
-To use it with the examples it is first necessary to install all dependencies with
+Amber on the command line 
+====================================================
 
-* install grunt-cli globally if not already present: `npm install -g grunt-cli`
-* `cd amber-examples`
-* `npm install`
 
-Afterwards the examples can be built/recompiled by running the following command in
-the subdirectory of each example:
+Build or recompile a command line example  (e.g. nodejs) by executing 
 
 `grunt`
 
-The subdirectories might contain additional README files which might contain additional information.
+in the subdirectory.
+
+The subdirectories might contain additional README files which might contain additional information. Here the ``amber-dev`` subdirectory of ``node_modules`` is used.
+
+
+Notes
+=====
+
+- Since Amber version 0.10.0 [`grunt`](http://gruntjs.com/) is used as commandline build system.
+- For the global and local installation of the `amber-cli` and `bower` command line tools: The recommendation is to install them with the `-g` or `--global` option to be globally accessible. For some uses of these tools it is  taken it for granted they are installed globally.  So if you use a restricted environment where you  cannot install the command line tools globally, try do it locally and some tools might still work. There will be feedback messages if there are problems with this. For a local installation use your home directory or a subdirectory ~/bin of it. Run the  `npm` install commands without without the `-g` option, and you will find all the commands in the `dir_used/node_modules/.bin` subdirectory. Generally a local installation is not recommended.
+
+
+Troubleshooting
+===============
+
+**SayHello example (Web) does not work**
+:    check in the web console which files cannot be loaded. Does the folder ``bower_components`` contain subfolders?
+     Maybe the ``bower install`` command did not run fully? Or there was a problem with ``npm install``?
+     Sometimes internet connection is slow and you have to re-run these commands.
+     
 
 
 Status
 ======
 
-- Loads fine with Amber version 0.12.6
+- Loads fine with [Amber](https://github.com/amber-smalltalk) version 0.12.6