Bez popisu

hhzl 8c3c29b671 Instructions added před 9 roky
android 9fb9932a0f Add smalltalk to ready() call in .html files před 11 roky
googlecharts @ b5be048959 999230d74a Update google charts example před 10 roky
hello 4f51cf07a5 README.md added před 10 roky
nodejs 4289f4bf15 Upd comments for writefile před 9 roky
presentation c2b6e5bad1 Using 'jQuery' instead of '$' global. před 10 roky
processing f98f6d813b Making processing load. před 10 roky
snap.svg a523900815 initial setup 3rd party JS lib před 10 roky
textinput 8c3c29b671 Instructions added před 9 roky
trysmalltalk 5953a8ef80 Refer to new repository před 9 roky
.gitignore 964fc03f73 Installing bower amber and npm amber-dev před 10 roky
.gitmodules c92eaf344b Remove vendor/amber submodule před 10 roky
README.md 2ea4e00e8f two apps 0.14.1 před 10 roky
bower.json 531c75b618 Update bower.json před 10 roky
index.html d838583960 Added link to hello/My First Amber Project to index.html před 11 roky
package.json 55c8eec737 added Amber 0.13.1 as devDep před 10 roky

README.md

Amber Smalltalk Examples

This project contains various Amber Smalltalk examples. Amber may run in a web browser or as a command line program.

Tools needed

  1. A web browser with reasonably good support for HTML5 canvas.
  2. git, on Windows Git for Windows
  3. nodejs. This will give you the node package manager npm as well.
  4. A global install of the amber-cli npm package
  5. A global install of the bower client side package manager in order to install the dependencies
  6. A global install of the grunt-cli task runner which is used as the command line build system

The amber, bower and grunt-cli packages can be installed with the following command:

npm install --global amber-cli bower grunt-cli

or as short form:

npm i -g amber-cli bower grunt-cli

Reference: http://docs.amber-lang.net/js-glossary.html

Setting up amber-examples

Clone the repository

git clone https://github.com/amber-smalltalk/amber-examples.git

Get dependencies of this project:

cd amber-examples 
git submodule update --init --recursive
npm install
bower install

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

and point your browser to

http://localhost:4000/

Amber on the command line

Build or recompile a command line example (e.g. nodejs) by executing

grunt

in the subdirectory.

The subdirectories might contain additional README files which might contain additional information. Here the code in amber-dev subdirectory of node_modules and bower_components/amber is used.

Notes

  • Since Amber version 0.10.0 grunt 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

  • All examples but the android example work fine with with Amber version 0.13.
  • For the processingJS example see work in progress here
  • The trysmalltalk example has been moved to its own repository for version 0.14

Other examples

Version 0.12 and earlier

Version 0.13

Version 0.14.1