Lamington requires Docker and NodeJS to be installed before it can be used.
Docker nicely containerises the EOS toolset, including nodeos, cleos, keosd, the Contract Development Toolkit (CDT), and common settings. We like using Docker for this, because it makes it really easy for us to manage the versions of those tools, as well as destroy and rebuild the container as necessary.
NodeJS is required in order to run your tests and our commands that manage the environment. We find testing EOS contracts with Typescript to be particularly productive, and hope you will too.
NVM does a great job at managing versions of Node, and installing it with correct permissions so you can globally install packages without sudo.
From here installation is simple. Our recommended approach is to install Lamington as a project dev dependency. You can also install Lamington globally so you can use it on projects without modifying your package.json file.
$ npm i --save-dev lamington
Once the dependency is installed, you just need to update your package.json file to run Lamington commands for you. Here's our recommended set:
"build": "lamington build",
"start": "lamington start eos",
"stop": "lamington stop eos",
"test": "lamington test"
Once that's done, you can run any of those commands as you would with NPM by itself, for example, you can test all your contracts with:
$ npm t
This option works well if you're regularly using Lamington as a standard dev tool on your team. The main watch out with this option is that you cannot manage multiple Lamington versions easily this way. So if you're working on multiple projects or with a team, the best thing to do is to share the version amongst your team using NPM as a project dependency.
The nice thing about installing globally is you don't have to do the script setup as above, just:
$ npm i -g lamington
Once that's done you're able to immediately run lamington commands:
$ lamington test
A good place to go from here is the Getting Started with Lamington guide.