From 24c2ffefc9b1d096c9696593f5b7103338671b3a Mon Sep 17 00:00:00 2001 From: Thodoris Greasidis Date: Sun, 21 Oct 2018 20:18:00 +0200 Subject: [PATCH 1/2] chore: Add on the fly transpiled bin Adds an alternative bin file that does not require building the project but loads the source files directly. Change-type: minor Signed-off-by: Thodoris Greasidis --- bin/resin-dev | 15 +++++++++++++++ package.json | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100755 bin/resin-dev diff --git a/bin/resin-dev b/bin/resin-dev new file mode 100755 index 00000000..8291fd8f --- /dev/null +++ b/bin/resin-dev @@ -0,0 +1,15 @@ +#!/usr/bin/env node + +// **************************************************************************** +// THIS IS FOR DEV PERROSES ONLY AND WILL NOT BE PART OF THE PUBLISHED PACKAGE +// Before opening a PR you should build and test your changes using bin/resin +// **************************************************************************** + +// We boost the threadpool size as ext2fs can deadlock with some +// operations otherwise, if the pool runs out. +process.env.UV_THREADPOOL_SIZE = '64'; + +process.env['TS_NODE_PROJECT'] = require('path').dirname(__dirname); +require('coffeescript/register'); +require('ts-node/register'); +require('../lib/app'); diff --git a/package.json b/package.json index 910c20bb..6fc2681c 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ }, "preferGlobal": true, "files": [ - "bin/", + "bin/resin", "build/", "doc/", "lib/" From 39fe63fb2d535416b4c5f6a59fec055adf24ae9a Mon Sep 17 00:00:00 2001 From: Thodoris Greasidis Date: Wed, 24 Oct 2018 13:06:03 +0300 Subject: [PATCH 2/2] README: Add development guidelines section Change-type: minor Signed-off-by: Thodoris Greasidis --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index f09224ab..4459db8f 100644 --- a/README.md +++ b/README.md @@ -120,6 +120,17 @@ If you're having any problems, check our [troubleshooting guide](https://github. You can also get in touch with us in the resin.io [forums](https://forums.resin.io/). +Development guidelines +---------------------- + +After cloning this repository and running `npm install` you can build the CLI using `npm run build`. +You can then run the generated build using `./bin/resin`. +In order to ease development: +* you can build the CLI using the `npm run build:fast` variant which skips some of the build steps or +* you can use `./bin/resin-dev` which live transpiles the sources of the CLI. + +In either case, before opening a PR make sure to also test your changes after doing a full build with `npm run build`. + License -------