Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including gulp-dotnet-watch with all npm packages installed. Try it out:

var gulpDotnetWatch = require("gulp-dotnet-watch")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

gulp-dotnet-watch v0.3.1

dotnet-watch plugin for gulp

gulp-dotnet-watch

dotnet-watch plugin for Gulp (but, not really)

Install

npm install gulp-dotnet-watch --save-dev

Basic Usage

var gulp = require('gulp'),
    DotnetWatch = require('gulp-dotnet-watch');

gulp.task('watch-server', function () {
    DotnetWatch.watch('run');
});

Advanced Usage

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.');
    }});
});

Options

cwd

The cwd option is based through to the child process.

Default: './'

project

The project to be watched.

Default: null

quiet

Suppresses all output except warnings and errors.

Default: false

verbose

Show verbose output.

Default: false

options

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

arguments

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.options

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.arguments

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

Methods

DotnetWatch.watch(task [, options [, loaded]])

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 tasks include 'run' and 'test', however others may still work.

new DotnetWatch([options]).watch(task [, loaded])

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.

new DotnetWatch([options]).kill()

This method will kill the active watch process on the watcher instance.

Properties

isApplicationStarted

This property is true when the application is started ready to receive requests, otherwise false.

options

This property reveals the options that where used to configure the watcher.

License

MIT

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free