First a short explanation of the three files:
st/MyPackage.st
: the Smalltalk source also known as fileoutjs/MyPackage.js
: the equivalent to the Smalltalk source compiled to JS (including metadata such as Smalltalk sourcecode)js/MyPackage.deploy.js
: equals the other.js
file but does not contain metadata not needed in deployment
To run an Amber application one of the .js
files is needed.
Which one depends on the deploy mode but for development the one without .deploy
in the name is used.
The .js
files in turn can be generated from the .st
files using the Amber commandline compiler (e.g. through Grunt.js) or by doing a file-in in the IDE and commiting the relevant package.
In general, we keep all three files under version control but for now the most crucial ones are the .st
files since those are usually easier to merge than generated JS code.
However, keeping and merging only the .st
files is not sufficient since those are not loadable by Amber.
Nico for example uses a local git hook to recompile the .st
files upon pulling the latest changes.
See this message from the Amber mailinglist.