Explorar o código

Tweak to documentation.

Herbert Vojčík %!s(int64=10) %!d(string=hai) anos
pai
achega
8139752ed8
Modificáronse 3 ficheiros con 30 adicións e 16 borrados
  1. 8 8
      2-overview.md
  2. 15 3
      overview/1-installing-amber.md
  3. 7 5
      overview/2-loading-amber.md

+ 8 - 8
2-overview.md

@@ -13,9 +13,9 @@ process and setup.
 Amber is shipped both as
 Amber is shipped both as
 
 
 - a [npm module](https://npmjs.org/package/amber) for its command-line
 - a [npm module](https://npmjs.org/package/amber) for its command-line
-  interface tool `amber` with a small server, compiler and REPL;
-- a [bower](http://bower.io) component used as dependency for other
-  projects.
+  interface tools `amber` and `amberc` providing a small server, a compiler and a REPL;
+- a [bower](http://bower.io) component used as dependency for projects
+  running in the browser.
 
 
 We will see in the [next section](overview/installing.html) how
 We will see in the [next section](overview/installing.html) how
 to install both components.
 to install both components.
@@ -23,11 +23,11 @@ to install both components.
 ### How Amber manages files
 ### How Amber manages files
 
 
 Amber compiles to JavaScript. It saves each package file as
 Amber compiles to JavaScript. It saves each package file as
-a [requirejs](http://requirejs.org) JavaScript module containing the
-compiled JavaScript code of the package.
+a JavaScript [asynchronous module definition](https://github.com/amdjs/amdjs-api/wiki/AMD)
+containing the compiled JavaScript code of the package.
 
 
-Amber also saves -- for convenience -- the Smalltalk source code of
-each package in a separate `.st` file.
+For convenience, Amber also saves the Smalltalk source code
+of each package in a separate `.st` file.
 
 
 In the next sections we will learn how to install Amber, load and save
 In the next sections we will learn how to install Amber, load and save
-packages disk and fire up the development environment.
+packages from/to disk and fire up the development environment.

+ 15 - 3
overview/1-installing-amber.md

@@ -31,11 +31,14 @@ download the installer from the
 
 
 For MacOS X users, nodejs can also be installed with [homebrew](http://brew.sh/):
 For MacOS X users, nodejs can also be installed with [homebrew](http://brew.sh/):
 
 
-
 {% highlight sh %}
 {% highlight sh %}
 brew install nodejs
 brew install nodejs
 {% endhighlight %}
 {% endhighlight %}
 
 
+When installed via homebrew, npm may have problems updating,
+running `npm -gf update` instead of traditional `npm -g update`
+solves [the issue](https://github.com/Homebrew/homebrew/issues/22408#issuecomment-30338806).
+
 #### Installing nodejs on Ubuntu
 #### Installing nodejs on Ubuntu
 
 
 Ubuntu provides nodejs as well as npm in its repository.
 Ubuntu provides nodejs as well as npm in its repository.
@@ -44,6 +47,11 @@ Ubuntu provides nodejs as well as npm in its repository.
 sudo apt-get install nodejs npm
 sudo apt-get install nodejs npm
 {% endhighlight %}
 {% endhighlight %}
 
 
+#### Installing nodejs on other operating system
+
+See node.js [instructions for installing](https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager)
+node and npm using respective package managers.
+
 #### Installing the node amber package
 #### Installing the node amber package
 
 
 Once nodejs and npm are installed, evaluate:
 Once nodejs and npm are installed, evaluate:
@@ -69,13 +77,17 @@ easy to manage dependencies in your application including
 Amber. Unlike npm, Bower components are meant to be used inside the
 Amber. Unlike npm, Bower components are meant to be used inside the
 web browser.
 web browser.
 
 
+If not already present, Bower is installed using npm: `npm install -g bower`,
+on some OSes (Linux, FreeBSD) `sudo npm install -g bower`.
+
+In the root directory of the project,
+Amber bower component can be installed either by
 
 
 ```sh
 ```sh
 bower install amber --save
 bower install amber --save
 ```
 ```
 
 
-or by adding in the root of the project a `bower.json` file like the
- following:
+or by adding a `bower.json` file like the following:
 
 
 {% highlight json %}
 {% highlight json %}
 {
 {

+ 7 - 5
overview/2-loading-amber.md

@@ -25,11 +25,11 @@ Create an `index.html` file with the following contents:
 	<head>
 	<head>
 	    <script
 	    <script
 		  type='text/javascript'
 		  type='text/javascript'
-		  src='./bower_components/amber/support/requirejs/require.min.js'>
+		  src='bower_components/amber/support/requirejs/require.min.js'>
 	    </script>
 	    </script>
 	    <script
 	    <script
 		  type='text/javascript'
 		  type='text/javascript'
-		  src='./bower_components/amber/support/amber.js'>
+		  src='bower_components/amber/support/amber.js'>
 	    </script>
 	    </script>
 	</head>
 	</head>
 	<body>
 	<body>
@@ -38,7 +38,9 @@ Create an `index.html` file with the following contents:
 {% endhighlight %}
 {% endhighlight %}
 
 
 In the next script we define how Amber packages are loaded. Amber
 In the next script we define how Amber packages are loaded. Amber
-comes with several AMD modules, the default one being `amber/devel`.
+comes with several AMD modules to load Amber; the default one --
+the one with support for application development and in-browser IDE --
+being `amber/devel`.
 
 
 ```html
 ```html
 <!DOCTYPE html>
 <!DOCTYPE html>
@@ -46,11 +48,11 @@ comes with several AMD modules, the default one being `amber/devel`.
 	<head>
 	<head>
 	    <script
 	    <script
 		  type='text/javascript'
 		  type='text/javascript'
-		  src='./bower_components/amber/support/requirejs/require.min.js'>
+		  src='bower_components/amber/support/requirejs/require.min.js'>
 	    </script>
 	    </script>
 	    <script
 	    <script
 		  type='text/javascript'
 		  type='text/javascript'
-		  src='./bower_components/amber/support/amber.js'>
+		  src='bower_components/amber/support/amber.js'>
 	    </script>
 	    </script>
 	    <script type='text/javascript'>
 	    <script type='text/javascript'>
 		  require(['amber/devel'], function (amber) {
 		  require(['amber/devel'], function (amber) {