<commit_before># grunt-electron-windows-installer [![Version](https://img.shields.io/npm/v/grunt-electron-windows-installer.svg)](https://www.npmjs.com/package/grunt-electron-windows-installer) [![Build Status](https://img.shields.io/appveyor/ci/unindented/grunt-electron-windows-installer.svg)](https://ci.appveyor.com/project/unindented/grunt-electron-windows-installer) [![Dependency Status](https://img.shields.io/gemnasium/unindented/grunt-electron-windows-installer.svg)](https://gemnasium.com/unindented/grunt-electron-windows-installer)

> Create a Windows package for your Electron app.


## Getting Started

This plugin requires Grunt `~0.4.0`

If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

```shell
npm install grunt-electron-windows-installer --save-dev
```

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

```js
grunt.loadNpmTasks('grunt-electron-windows-installer');
```

*This plugin was designed to work with Grunt 0.4.x. If you're still using grunt v0.3.x it's strongly recommended that [you upgrade](http://gruntjs.com/upgrading-from-0.3-to-0.4), but in case you can't please use [v0.3.2](https://github.com/gruntjs/grunt-contrib-copy/tree/grunt-0.3-stable).*


## Installer task

_Run this task with the `grunt electron-windows-installer` command._

Task targets, files and options may be specified according to the grunt [Configuring tasks](http://gruntjs.com/configuring-tasks) guide.

### Usage

To create a package from your app:

```js
'electron-windows-installer': {
  app: {
    src: 'path/to/app/',
    dest: 'path/to/out/'
  }
}
```

When the task finishes, you'll have these:

```
$ ls path\to\out
RELEASES  app-0.0.1-full.nupkg  Setup.exe
```

To create different packages for different architectures:

```js
'electron-windows-installer': {
  options: {
    productName: 'Foo',
    productDescription: 'Bar baz qux.',
    rename: function (dest, src) {
      if (/\.exe$/.test(src)) {
        src = '<%= name %>-<%= version %>-setup.exe';
      }
      return dest + src;
    }
  },

  win32: {
    src: 'path/to/win32/',
    dest: 'path/to/out/win32/'
  },<commit_msg>Improve explanation of config options<commit_after># grunt-electron-windows-installer [![Version](https://img.shields.io/npm/v/grunt-electron-windows-installer.svg)](https://www.npmjs.com/package/grunt-electron-windows-installer) [![Build Status](https://img.shields.io/appveyor/ci/unindented/grunt-electron-windows-installer.svg)](https://ci.appveyor.com/project/unindented/grunt-electron-windows-installer) [![Dependency Status](https://img.shields.io/gemnasium/unindented/grunt-electron-windows-installer.svg)](https://gemnasium.com/unindented/grunt-electron-windows-installer)

> Create a Windows package for your Electron app.


## Getting Started

This plugin requires Grunt `~0.4.0`

If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

```shell
npm install grunt-electron-windows-installer --save-dev
```

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

```js
grunt.loadNpmTasks('grunt-electron-windows-installer');
```

*This plugin was designed to work with Grunt 0.4.x. If you're still using grunt v0.3.x it's strongly recommended that [you upgrade](http://gruntjs.com/upgrading-from-0.3-to-0.4), but in case you can't please use [v0.3.2](https://github.com/gruntjs/grunt-contrib-copy/tree/grunt-0.3-stable).*


## Installer task

_Run this task with the `grunt electron-windows-installer` command._

Task targets, files and options may be specified according to the grunt [Configuring tasks](http://gruntjs.com/configuring-tasks) guide.

### Usage

Say your app lives in `path/to/app`, and has a structure like this:

```
$ tree path/to/app/ -L 2
path/to/app/
├── LICENSE
├── index.js
├── main
│   ├── index.js
│   └── squirrel.js
├── node_modules
│   ├── fs-plus
│   └── yargs
├── package.json
└── renderer
    ├── index.css
    ├── index.html
    └── index.js
```

To create a package from your app, the configuration for your task would look like this:

```js
'electron-windows-installer': {
  app: {
    src: 'path/to/app/',
    dest: 'path/to/out/'
  }
}
```

The task will try to extract all necessary information from your `package.json`. When it finishes, you'll have these:

```
$ ls path\to\out
RELEASES  app-0.0.1-full.nupkg  Setup.exe
```

You can also create different packages for different architectures, while manually overriding certain options:

```js
'electron-windows-installer': {
  options: {
    productName: 'Foo',
    productDescription: 'Bar baz qux.',
    rename: function (dest, src) {
      if (/\.exe$/.test(src)) {
        src = '<%= name %>-<%= version %>-setup.exe';
      }
      return dest + src;
    }
  },

  win32: {
    src: 'path/to/win32/',
    dest: 'path/to/out/win32/'
  },
{'fraction_non_alphanumeric': 0.14943160982764944, 'fraction_numerical': 0.00935093509350935, 'mean_word_length': 3.936651583710407, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 14, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6377768', 'n_tokens_mistral': 1930, 'n_tokens_neox': 1818, 'n_words': 492}