At the end of this guide, you will have a development environment set up where you can rapidly test changes to Lamington's code base.
You'll need a smart contract project you want to run Lamington on in order to test changes. If you don't have one you're working on yourself, you can use the Advanced EOS Examples project to get started.
Then follow the instructions on the Install Lamington page to install Lamington locally in the project, not globally. Make sure to install the prerequisites that Lamington needs as part of the process.
That's it for prerequisites.
We need to have the project files locally so we can make changes. Clone from GitHub like so:
$ git clone https://github.com/CoinageCrypto/lamington.git
Install the NPM dependencies that Lamington needs:
$ cd lamington
$ npm install
Now in order to make changes on our files, then see these changes used on our project we're going to leverage a feature of NPM called linking. This is a two step process. First we tell NPM to symbolically link Lamington from it's working directory to the global package list:
$ npm link
Now we need to tell our other project to use this linked version instead of what it got from the NPM registry before:
$ cd [wherever your other project is]
$ npm link lamington
Now we're almost there! The project is now using your local copy of Lamington's files when it runs Lamington commands.
There's one more catch, which is that NPM and Node don't really know about our TypeScript files in the Lamington project. We need to build them to plain vanilla JS files in order to have our changes used when we modify files in the Lamington project.
At this stage I usually open up a second terminal window so I can have both going at once, because we'll be jumping back and forth a bit.
$ cd [wherever Lamington was cloned]
$ npm run build
So the workflow is:
TypeScript supports a watch mode, so we could make development a bit easier if we figure out a command in package.json which builds and watches for changes.
I hope you've found this helpful. We're always keen to talk to new EOS devs, so please feel free to join our Slack below!