Amber Skeleton is a template project for creating your own Amber-based projects.
Link to Amber using
git submodules to link to Amber,
you no longer need to fork and include the entire Amber source tree as
part of your own project.
Easily load code from other Amber-based projects
You can use
git submodules to link to other Amber projects and then
arrange to load the code from that project by including the following
expression in the
ready: option of the
loadAmber() function in your
smalltalk.AmberProjectImporter._importStPackages_prefix_( [ 'ExternalProjectPackage', ], '/projects/externalProject/');
The above expression will load the code form the
/projects/externalProject/st directory. If you want to load the development
'.js code use the following:
smalltalk.AmberProjectImporter._importJsPackages_prefix_( [ 'ExternalProjectPackage', ], '/projects/externalProject/');
and for deployment (i.e., loading the
smalltalk.AmberProjectImporter._importDeployJsPackages_prefix_( [ 'ExternalProjectPackage', ], '/projects/externalProject/');
When you use AmberProjectImporter to import your code,
automatically commit your code to the same directories (
st) from which you loaded
Share code with other Smalltalk dialects
If you install the Cypress package support (included by default) and register your package as a cypress package:
AmberProjectExporter registerPackage: 'MyPackageName' type: 'cypress' prefix: 'packages/'
You package will be stored in the Cypress package format which is understood by a number of Smalltalk dialects (Pharo, Squeak, GemStone, Amber, and VW as of this writing. A VAST port is in the works).
If you want to load code from another Smalltalk dialect that was saved in Cypress package format, execute the following code in a workspace:
CypressAmberImporter importCypressPackages: #('ForeignPackageName') prefix: 'path to directory containing ForiegnPackageName.package'
As of this writing, I haven't done any experiments loading code from
other dialects - Amber is the first
non-Monticello dialect I've worked
with), so I'll be interested in your results:).
This project is a perfect example. In particular look at the
index.html file for examples of loading code using the AmberProjectImporter class.
To start working with your own Amber Skeleton project:
- Fork the Amber Skeleton project.
- Rename the forked project to the name you want the project to have. Note that you might want to have a personal fork of the Amber Skeleton project so you can customize the project for your own needs.
- Clone your project to your local machine.
- Change the commit reference for the
git submodules(i.e., remove and add the submodule references). It is easier to this immediately after cloning. See Git Submodules: Adding, Using, Removing, Updating for more information about using submodules.
init and updatethe `git submodules:
git submodule init git submodule update
Build your Amber File server. See the README in the
Right now there is only one issue of note:
Laurent Laffont's Amber 0.9.1 OneClick