Merchant is a command line tool that downloads your Mercury project's library dependencies and compiles your project.
$ git clone https://github.com/stewy33/merchant
$ sh merchant/install.sh
Test that Merchant is installed by running:
$ merchant version
Create a default config:
$ merchant configure --reset-config
This creates a platform-specific global configuration file at ~/.merchant/config.json
, like the one below:
{
// default config file for OSX
"build_profiles" : {
// arguments before "--" are passed to "merchant build", everything after is passed to the mmc compiler
"default" : "-- --grade none.gc.decldebug.stseg",
"dev" : "-- --grade none.gc.decldebug.stseg --opt-level 0"
},
"install_profiles" : {
"default" : "-- --no-libgrade --libgrade none.gc.decldebug.stseg",
"dev" : "-- --no-libgrade --libgrade none.gc.decldebug.stseg --opt-level 0"
}
}
The config file is editable, and sets default installation and build profiles. If you create a new build profile, called production
for example, you could build your project with it by running:
$ merchant build --profile production
You can use the config file to set install and build options per system.
- Inside project folder, generate manifest file with
merchant init
. - Edit
manifest.json
with project name, author, dependencies. - After each update to
manifest.json
, runmerchant install
, andmerchant build
to compile the project.
{
"name": "test", // should match name of main module
"author": "Stewy Slocum",
"dependencies": {
"mercury_json": "https://github.com/stewy33/mercury-json"
}
}
NOTE: This project has only been tested on Mac and Linux, though it will probably work on Windows with Cygwin or Ubuntu shell.