暫無描述

Herbert Vojčík 7a192572bb kernel: TODO for kernel announcer 7 年之前
external 613fcb5be3 Revert "amberc: Load es2015-polyfills directly. TODO better." 7 年之前
internal 98db4a31cd Different preload setup. 7 年之前
src 245b334405 Get rid of basicXxx in Package. 7 年之前
support 7a192572bb kernel: TODO for kernel announcer 7 年之前
.gitignore 6345132342 .xxxignore files: cosmetic change 9 年之前
.npmignore 6345132342 .xxxignore files: cosmetic change 9 年之前
.travis.yml 12196bbfe8 .travis.yml: fix node LTS to emcompass 4.3 8 年之前
API-CHANGES.txt 245b334405 Get rid of basicXxx in Package. 7 年之前
CHANGELOG 4c8794c1e8 TMasterBehavior >> {enter,leave}Organization. 7 年之前
CONTRIBUTING.md fc4c4b59ef Remove some github urls. 8 年之前
CONTRIBUTORS 547ff035bb Update CONTRIBUTORS. 8 年之前
Gruntfile.js 613fcb5be3 Revert "amberc: Load es2015-polyfills directly. TODO better." 7 年之前
LICENSE ba06a58a80 Update copyright clause. 8 年之前
README.md 01c185a6c0 README: 2017 in (c). 7 年之前
bower.json 38815caeb2 No version field in bower.json. 8 年之前
favicon.ico 8b43eb58f1 Add a favicon 11 年之前
local.amd.json d8c0f3f3c8 Compiler-* cleanup 9 年之前
package.json 092d7ef431 Working on 0.20.0 7 年之前

README.md

Amber

Gitter Average time to resolve an issue Percentage of issues still open

Travis CI Status devDependency status Bountysource

Copyright 2011-2015 Nicolas Petton

Copyright 2014-2017 Herbert Vojčík and Amber contributors

Amber is an implementation of the Smalltalk language that runs on top of the JavaScript runtime. It is designed to make client-side development faster and easier.

Try Amber online and learn more on project page.

Overview

Amber is written in itself, including the parser and compiler. Amber compiles into efficient JavaScript, mapping one-to-one with the equivalent JavaScript. There is no interpretation at runtime.

Some highlights:

  • Amber features an IDE with a Class browser, Workspace, Transcript, a ReferencesBrowser supporting senders/implementors and class references, basic Inspector and even a beginning of a Debugger and a unit TestRunner.
  • Pharo Smalltalk is considered as the reference implementation.
  • Amber is extendable with libraries, installable preferably via bower:
    • amber-contrib-web with a canvas to generate HTML, like Seaside, included in a new project by default,
    • silk with a stream-like wrapping of DOM elements, included in a new project by default,
    • helios IDE, included in a new project by default,
    • amber-contrib-legacy with smaller in-page "classic" IDE and some miscellany, included in a new project by default,
    • trysmalltalk, containing Prof Stef interactive crash course.
    • and others. You can easily write an Amber library yourself.
  • Amber can use Javascript libraries; the "classic" IDE as well as Helios are built on jQuery
  • You can inline Javascript code and there are many ways to interact between Amber and Javascript

Prerequisities

Amber cli tool to create new projects and assist with development tasks is in a npm package amber-cli. Amber engine and core library to be used in projects is in a bower package amber.

For the installation to work, you need to have installed node, npm and git. Default node installers may install npm as well. To have git in Windows, use Git for Windows and select "Run Git from Windows Command Prompt" and "Checkout Windows-style, commit Unix-style" installation options.

For UNIX-based OS (Linux distibutions, FreeBSD, ...) do

npm config set prefix=~/npm
export PATH="$PATH:$HOME/npm/bin"

to have the installation in a local subdirectory in order to avoid the otherwise necessary sudo installation of Amber. The export line needs to be added to the ~/.profile file as well so that after a new login the path is set.

Getting Amber and setting up an initial project

Do this to install Amber

# Install the CLI tool `amber-cli` and supporting tools
npm install -g grunt-cli grunt-init bower amber-cli

Use amber init to create a project of your own

# Initialize your project (directory must be empty)
cd /path/to/myproject
amber init

# (optional) Install backward compatibility
bower install amber-compat-es5 --save   # be loadable in older browsers

Start developing in Amber Smalltalk

# Serve amber on localhost:4000
amber serve

Reporting issues

Please refer to CONTRIBUTING.md for further details.

Developing Amber

Please refer to CONTRIBUTING.md for further details. It explains the Amber development setup and how to contribute.

License

Amber is released under the MIT license. All contributions made for inclusion are considered to be under MIT.