gulp-dotnet-watch
Version:
dotnet-watch plugin for gulp
127 lines (77 loc) • 3.14 kB
Markdown
dotnet-watch plugin for [Gulp](https://github.com/gulpjs/gulp) (but, not really)
```
npm install gulp-dotnet-watch --save-dev
```
```javascript
var gulp = require('gulp'),
DotnetWatch = require('gulp-dotnet-watch');
gulp.task('watch-server', function () {
DotnetWatch.watch('run');
});
```
```javascript
var gulp = require('gulp'),
DotnetWatch = require('gulp-dotnet-watch');
gulp.task('watch-server', function () {
var watcher = new DotnetWatch({
project: './WebFull',
verbose:, 'true',
options: [ 'no-launch-profile' ],
arguments: {
environment: 'Development',
"server.urls": 'https://localhost:6000;http://localhost:6001'
},
special: {
arguments: {
customArg1: 'Custom Value 1'
}
}
});
watcher.watch('run', function() {
console.log('Application has started.');
}});
});
```
The `cwd` option is based through to the child process.
**Default:** `'./'`
The project to be watched.
**Default:** `null`
Suppresses all output except warnings and errors.
**Default:** `false`
Show verbose output.
**Default:** `false`
Value options that will configure the dotnet task. For example `[ 'no-launch-profile', 'no-build' ]` would result in `--no-launch-profile --no-build`.
**Default:** `null`
Key/value arguments that will configure the dotnet task. For example `{ framework: 'net451', verbosity: 'm' }` would result in `--framework net451 --verbosity m`.
**Default:** `null`
Special value options that will be passed through to the child dotnet process. For example `[ 'custom-flag-1', 'custom-flag-2' ]` would result in `-- --custom-flag-1 --custom-flag-2`.
**Default:** `null`
Special Key/value arguments that will be passed through to the child dotnet process. For example `{ customArg1: 'Custom Value 1', customArg2: 'Custom Value 2' }` would result in `-- --customArg1 "Custom Value 1" --customArg2 "Custom Value 2"`.
**Default:** `null`
This static method will start a watch process for the provided `task`, and can be configured by passing an `options` object. The method will return an active watcher instance, and the `loaded` callback will be issued once the watch process has started the application. Supported `task`s include 'run' and 'test', however others may still work.
This method will start a watch process for the provided `task`. The method will return an active watcher instance, and the `loaded` callback will be issued once the watch process has started the application.
This method will kill the active watch process on the watcher instance.
This property is `true` when the application is started ready to receive requests, otherwise `false`.
This property reveals the options that where used to configure the watcher.
MIT