<commit_before># Contributing guide

Thanks for your interest in contributing to this project! This document aims to serve as a friendly guide for making your first contribution.

## Prerequisites

- [NodeJS](https://nodejs.org).
- [Bower](http://bower.io).
- [Gulp](http://gulpjs.com).

## Running locally

- Install [NodeJS v5.10.0](https://nodejs.org/en/).

Sadly we need to enforce the same NodeJS version that the Electron version we use is running to avoid module version mismatches when building native dependencies (`electron-rebuild` doesn't seem to be enough).

- Clone the repository.

```sh
git clone https://github.com/resin-io/etcher
cd etcher
```

- Install dependencies.

```sh
npm install
bower install
```

- Run the GUI application.

```sh
npm start
```

- Run the CLI application.

```sh
node bin/etcher
```

## Developing

We rely on [gulp](http://gulpjs.com) to provide an automated developing workflow in which your changes will automatically be detected and the necessary resources will be rebuilt for you.

First make sure you have [gulp](http://gulpjs.com) installed as a global dependency:

``` shell
$ npm install -g gulp
```<commit_msg>Add instructions to configure NPM for installation (#429)<commit_after># Contributing guide

Thanks for your interest in contributing to this project! This document aims to serve as a friendly guide for making your first contribution.

## Prerequisites

- [NodeJS](https://nodejs.org).
- [Bower](http://bower.io).
- [Gulp](http://gulpjs.com).

## Running locally

- Install [NodeJS v5.10.0](https://nodejs.org/en/).

Sadly we need to enforce the same NodeJS version that the Electron version we use is running to avoid module version mismatches when building native dependencies (`electron-rebuild` doesn't seem to be enough).

- Clone the repository.

```sh
git clone https://github.com/resin-io/etcher
cd etcher
```

- Configure NPM.

In UNIX based operating systems:

```sh
export npm_config_disturl=https://atom.io/download/atom-shell
export npm_config_target=<ELECTRON_VERSION>
export npm_config_runtime=electron
```

In Windows:

```sh
set npm_config_disturl=https://atom.io/download/atom-shell
set npm_config_target=<ELECTRON_VERSION>
set npm_config_runtime=electron
```

You can find the appropriate electron version in the `devDependencies['electron-prebuilt']` field in `package.json`.

- Install dependencies.

```sh
npm install --build-from-source
bower install
```

- Run the GUI application.

```sh
npm start
```

- Run the CLI application.

```sh
node bin/etcher
```

## Developing

We rely on [gulp](http://gulpjs.com) to provide an automated developing workflow in which your changes will automatically be detected and the necessary resources will be rebuilt for you.

First make sure you have [gulp](http://gulpjs.com) installed as a global dependency:

``` shell
$ npm install -g gulp
```
{'fraction_non_alphanumeric': 0.11002785515320335, 'fraction_numerical': 0.00383008356545961, 'mean_word_length': 4.451612903225806, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2444077', 'n_tokens_mistral': 904, 'n_tokens_neox': 835, 'n_words': 326}