<commit_before># gulp-dnx
Gulp plugin for ASP.NET 5. You can use this plugin to integrate ASP.NET 5 `dnu build`, `dnu restore` and `dnx` command execution (for the commands available inside you project.json file). Check out the [example](/example/) inside the repository.

## Installation
You can install gulp-dnx plugin through npm:

```
npm install gulp-dnx
```

Preferably, you can save this as dev dependency:

```
npm install gulp-dnx --save-dev
```

## Usage

```javascript
var gulp = require('gulp'),
    dnx = require("gulp-dnx");
gulp.task('default', function(cb) {
    return gulp.start('dnx-run');
});
gulp.task('dnx-run', dnx('kestrel'));
```

The default function restores the packages according to your project.json file and runs the web command inside the project.json file. You can pass a few options to this to choose what's actually going to run:

```javascript
// the default options
var options = {
    restore: true,
    build: false,
    run: true,
    cwd: './'
};
var dnxCommand = 'web';
gulp.task('dnx-run', dnx(dnxCommand, options));
```

There are also shorthand methods for specific tasks:

```javascript
gulp.task('dnx-run', dnx('kestrel'));
// only restores the packages<commit_msg>better info on readme<commit_after># gulp-dnx
Gulp plugin for ASP.NET 5. You can use this plugin to integrate ASP.NET 5 `dnu build`, `dnu restore` and `dnx` command execution (for the commands available inside you project.json file). Check out the [example](/example/) inside the repository.

## Installation
You can install gulp-dnx plugin through npm:

```
npm install gulp-dnx
```

Preferably, you can save this as dev dependency:

```
npm install gulp-dnx --save-dev
```

## Usage

```javascript
var gulp = require('gulp'),
    dnx = require("gulp-dnx");
gulp.task('default', function(cb) {
    return gulp.start('dnx-run');
});
gulp.task('dnx-run', dnx('kestrel'));
```

The default function restores the packages according to your project.json file and runs the web command inside the project.json file. You can pass a few options to this to choose what's actually going to run:

```javascript
// the default options
var options = {
    restore: true,
    build: false,
    run: true,
    cwd: './'
};
var dnxCommand = 'web';
gulp.task('dnx-run', dnx(dnxCommand, options));
```

There are also shorthand methods for specific tasks:

```javascript
//runs the project.json's command 'kestrel'
gulp.task('dnx-run', dnx('kestrel'));
// only restores the packages
{'fraction_non_alphanumeric': 0.13247172859450726, 'fraction_numerical': 0.0016155088852988692, 'mean_word_length': 4.247881355932203, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '6104728', 'n_tokens_mistral': 812, 'n_tokens_neox': 769, 'n_words': 295}