Browse Source

Merge commit '98f8676c4e02e5970a1b90c75ba505228813e1d2' into remove-sudo-npm

Conflicts:
	README.md
	overview/3-creating-packages.md
Sebastian Sastre 9 years ago
parent
commit
478ae6aba1

+ 1 - 1
1-getting-started.md

@@ -34,7 +34,7 @@ npm install -g amber-cli
 mkdir example-project
 cd example-project/
 
-# Create and initialixe a new Amber project
+# Create and initialize a new Amber project
 amber init
 {% endhighlight %}
 

+ 2 - 2
2-overview.md

@@ -2,7 +2,7 @@
 title: Overview
 layout: default
 permalink: "overview.html"
-next: "overview/installing.html"
+next: "installing-amber.html"
 ---
 
 This guide will give you an overview of Amber, it's installation
@@ -17,7 +17,7 @@ Amber is shipped both as
 - 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](installing-amber.html) how
 to install both components.
 
 ### How Amber manages files

+ 5 - 3
README.md

@@ -1,9 +1,9 @@
 amber-documentation
 ===================
 
-Amber documentation website
+This is the repository of the [Amber documentation website](http://docs.amber-lang.net).
 
-This documentation site is generated using [Jekyll](http://jekyllrb.com/)
+The site is developed using [Jekyll](http://jekyllrb.com/).
 
 ## How to add a page to this amber-documentation site?
 
@@ -17,4 +17,6 @@ This documentation site is generated using [Jekyll](http://jekyllrb.com/)
 
 Thanks! Your contribution makes the world a better place to program!
 
-The Amber Team
+The Amber Team
+=======
+http://docs.amber-lang.net

+ 1 - 0
css/style.css

@@ -68,6 +68,7 @@ body .container h3 {
 }
 body .container img {
   margin: 20px 0;
+  max-width: 700px;
 }
 body .container p.note {
   background: #FAFADD;

+ 1 - 0
css/style.less

@@ -72,6 +72,7 @@ body {
 
 		img {
 			margin: 20px 0;
+                        max-width: 700px;
 		}
 
 		p {

+ 12 - 0
faq.md

@@ -0,0 +1,12 @@
+---
+title: FAQ
+layout: default
+permalink: "faq.html"
+parent: Overview
+---
+
+#### Q: How do I get back the Helios IDE after I have closed it?
+
+A: Evaluate the following in the JavaScript console:
+
+    require('amber/helpers').popupHelios()

BIN
images/package-template.png


BIN
images/setting-commit-path.png


+ 2 - 2
index.md

@@ -9,7 +9,7 @@ next: getting-started.html
 
 This is the Amber documentation website. The purpose of this documentation is to guide you step by step from learning <a href="/installing.html">how to install Amber</a> to being an advanced Amber developer.
 
-Currently we covered the firsts steps of <a href="/installing.html">installing</a> and <a href="/getting-started.html">getting started</a> with a new Amber project.
+Currently we covered the firsts steps of <a href="/installing-amber.html">installing</a> and <a href="/getting-started.html">getting started</a> with a new Amber project.
 
 <p class="note">
 This documentation and guides are a community effort. You figured out how to do something useful or cool? Great! Share it with us! <a href="https://github.com/amber-smalltalk/amber-documentation">Contribute</a> with your own guide here!
@@ -50,4 +50,4 @@ object.
 Evaluating JavaScript object methods is transparent and makes using
 libraries a breeze.
 
-<a href="/installing.html">Installing Amber</a>
+<a href="/installing-amber.html">Installing Amber</a>.

+ 57 - 0
js-glossary.md

@@ -0,0 +1,57 @@
+---
+title: JS ecosystem glossary
+layout: default
+permalink: "js-glossary.html"
+parent: Overview
+---
+
+
+### What is `bower`?
+
+Bower is a dependency management tool for client-side web packages. Each package can specify its production dependencies and its development-only dependencies by name and semver version expression. Package dependencies are specified in a `bower.json` file. Bower, when asked to install dependencies, looks for dependencies of the project and for dependencies of dependencies all the way down, unifies version constraints and then installs all dependencies from all levels of the hierarchy in flat manner (side-by-side) into directory `bower_components`.
+
+
+### Where is `bower` used in Amber?
+
+Amber itself is a client-side web package, so Amber itself is a bower package and uses bower to manage its own client-side dependencies (jQuery and others).
+
+An Amber web project (a client-side web project that uses Amber) is encouraged to use bower to manage its dependencies as well, listing Amber itself as one of them. Default projects (the ones created by `amber init`) do just that.
+
+
+### What is `grunt`?
+
+Grunt is a build system for the JavaScript ecosystem. In the root directory of the project, grunt looks for a file called `Gruntfile.js`. This defines tasks to be done and binds them together, similarly to what a `Makefile` does for the `make` build system in UNIX. Grunt is installed through the npm package manager and must be installed in three parts:
+- `grunt` - the runtime, installed as development dependency of the project, 
+- `grunt-xxx-yyy` - modules with reusable tasks, also as development dependency of the project, and
+- `grunt-cli`, the CLI command that drives the runtime using `Gruntfile.js`, which should be installed globally.
+
+
+### Where is `grunt` used in Amber?
+
+Amber itself and default Amber projects (the ones created by `amber init`) both contain `Gruntfile.js` and they include `grunt` and accompanying grunt task modules as development dependencies. In an Amber project, grunt is used to recompile Smalltalk source to JavaScript files from the command line (CLI), as well as running the tests from CLI. In Amber itself, grunt is used for the same, plus a few bookkeeping tasks.
+
+
+### What is `grunt-init`?
+
+Grunt-init is a create-project-from-a-template tool, spawned from `grunt` to be a standalone tool. It defines an API. The templates themselves are created as isolated `npm` packages, which the `grunt-init` CLI command can use. In template modules, you define the skeleton of the project, a set of questions to ask when the project is created and the way they are included in the skeleton. The result is, by running `grunt-init` with a specific template, you answer a few questions, and a project is created for you base on the answers.
+
+### Where is `grunt-init` used in Amber?
+
+It is used internally as first part of `amber init`. It uses the `grunt-init-amber` template.
+
+### What is `node`?
+
+Node.js is a project running JavaScript (using Google's V8 engine) in a server environment. In addition to the V8 engine itself, it includes libraries for writing servers in async-io manner. More and more server parts of the web applications are being written in Node.js as it is straightforward to write performant web server using it, and JavaScript is a higher level language compared to languages used to write server apps before.
+
+### Where is `node` used in Amber?
+
+Nearly everywhere, except the case of Amber itself or an Amber project running in the browser. All the tools mentioned in this page run in `node` - they are server-side / CLI tools written in JavaScript. Amber itself uses some CLI tooling (`amber-cli` package in `npm`) itself - `amber` command as a general tool and `amberc` as cli compiler. Those, too, are JavaScript, so they run in `node` (the former is Amber code compiled to JavaScript; the latter is native JavaScript). Amber also exports helper node libraries as `amber-dev` package in npm. And last but not least, you can compile Amber package(s) and bundle them into CLI executable for `node` - which is now `amber` tool itself is created.
+
+### What is `npm`?
+
+It stands for "node package manager" and is a dependency management tool for server-side / CLI JavaScript packages (that is, those to be run in `node`). Each package can specify its production dependencies and its development-only dependencies by name and semver version expression. Package dependencies are specified in a `package.json` file. When asked to install dependencies, `npm` looks for dependencies of the project and installs them into the directory `node_modules`, while doing the same for the dependencies itself, the result being a deep tree of dependencies - this way the same module could appear several times (even hundreds of times), but always as a local dependency of its parent - this way, version clashes are avoided.
+
+### Where is `npm` used in Amber?
+
+First, `npm` is used to install all the tools mentioned here (except `node` and itself), and it is also used to install Amber CLI tool from the `amber-cli` package. Second, Amber itself and Amber projects contain `package.json` files which list the development dependencies needed for the supporting tooling to work (`grunt`, `amber-dev` and others). Third, `amber` itself is a `npm` package, for server-side projects that want to use it from `node`, not from browser.
+

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

@@ -1,9 +1,9 @@
 ---
 title: Installing Amber
 layout: default
-permalink: "installing.html"
+permalink: "installing-amber.html"
 parent: Overview
-next: "/overview/loading-amber.html"
+next: "loading-amber.html"
 ---
 
 ### 1. The npm package
@@ -20,7 +20,7 @@ JavaScript runtime used to run JavaScript code outside of the web
 browser.
 
 `nodejs` and `npm` can either be
-[downloadeded](http://nodejs.org/download) from the website, or
+[downloaded](http://nodejs.org/download) from the website, or
 installed using Operating System specific package managers.
 
 #### Installing nodejs on MacOS X and Windows
@@ -39,20 +39,6 @@ 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
-
-Ubuntu provides nodejs as well as npm in its repository. A ppa provides a more up-to-date version though:
-
-{% highlight sh %}
-sudo apt-add-repository ppa:chris-lea/node.js
-sudo apt-get update
-{% endhighlight %}
-
-
-{% highlight sh %}
-sudo apt-get install nodejs
-{% 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)

+ 1 - 1
overview/2-loading-amber.md

@@ -3,7 +3,7 @@ title: Loading Amber
 layout: default
 permalink: "loading-amber.html"
 parent: Overview
-next: "/overview/loading-packages.html"
+next: "creating-packages.html"
 ---
 
 In this section we will learn how setup an `index.html` page to load

+ 0 - 1
overview/3-creating-packages.md

@@ -5,7 +5,6 @@ permalink: "creating-packages.html"
 parent: Overview
 ---
 
-
 <p class="warning">
 This page is waiting for you to write it.
 </p>