Create a main director script build.js file:
Code
File: build.js
(function() {
try {
print("// S8 - Console bootstrap.");
load("s8/boot.js");
load("s8/s8.image.js"); //load minimal S8 image
load("s8/initialize.js");
load("s8/initialize.st.js");
emmit("helloWorldSampleApp.st");
//fileIn('build.st'); //fileIn source code (chunk format)
//fileInJS('fileName.st.js'); // load compiled code (javascript)
smalltalk.Snapshot.outputToFile_("helloWorld.snapshot.js");
print('=====Build OK=====');
quit();
}
catch (err) {
print('====Error===='+err);
print(err.stack);
quit();
}
})();
First part of script loads S8 minimal image plus several related functionalities. This is a console sample application so s8.image.js is required, if you need to build a web application with UI8 + WI8 frameworks for application support and GUI widgets you should use ui8.image.js. More info about this in [web] Application startup
The emmit statement compiles smalltalk chunk format code, in this case our hello world sample.
The next two commented lines, shows you can file in code in building process (this aspect it will covered in next step). Last statement defines where all compiled source code will be integrated into a snapshot.