-
Notifications
You must be signed in to change notification settings - Fork 28
Home
Welcome to the Espresso wiki!
Espresso is the Build-Tool for The-M-Project. Espresso takes care of all the different files and resources that may exist in the project. The-M-Project is designed to build an application in a structured manner. This means you can split your code into several files, to seperate Controllers, Views, Models, etc. What is good for a developer is "bad" for the loading performance of the app in the browser: it has to download and parse many files, which is slowing done the application startup time. Serving one file on the other hand, is "bad" for a developer because it can be confusing to have all your code in one single file.
Espresso to the rescue!
The project files (Controllers, Views, Models, etc.) are merged into a single JavaScript file. A developer is able to write code and separate it in single files and Espresso merges them together.
Espresso takes a lot of work from you by generating an HTML startup page and referencing all the needed resources. Espresso is also taking care of the resource management. You can bundle your code and resources per device. The only thing you´ll have to do is to tell Espresso what target device you want to the build the app for.
Doing this whole stuff by hand, can be a huge amount of work!
That means: Espresso is not mandatory ... but it makes your life much easier!
Run Espresso means running the path/to/Espresso/espresso.js file in a node process. If you read a command like 'espresso server' is the same as 'path/to/Espresso/espresso.js server'. To use Espresso as we do, include an alias into ~/.bash_profile like that one: alias espresso=/path/to/Espresso/bin/espresso.js. Now you can use Espresso server instead of /path/to/Espresso/bin/espresso.js server. If you do so, for example running 'espresso server' means running the espresso.js with node and server as a parameter
This chapter describes how to configure/customize the build process of the application.
All the magic is prepared by making entries in the file config.json
in your applications' root directory.
This chapter is a brief introduction into Espresso's resource management. The resource management lets you organize the project's resources like images and CSS files. In a common folder - the base folder - and in device specific folder that seperates devices like "apple device with resolution 640x960.
The build tools included in Espresso.
Read this description if you want to deploy and run a The-M-Project application on your own server.