Socket
Book a DemoInstallSign in
Socket

gulp-dotnet

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-dotnet

Gulp utility to build/watch/start DOTNET Core

latest
Source
npmnpm
Version
2.0.0
Version published
Weekly downloads
145
-20.33%
Maintainers
1
Weekly downloads
 
Created
Source

DOTNET Core Gulp Plugin Dependency Status devDependency Status

GulpJS plugin for DOTNET CORE CLI ( ASP.NET Core ) that is cross-platform. This plugin does the following:

  • Build
  • Update
  • Start

and with Gulp you can setup watchers for recompiling on the fly and restarting the web server. Similar to gulp-dnx but this one has more logging opts, notifications and is cross platform.

Usage

build.js

var gulp = require('gulp');
var Dotnet = require('gulp-dotnet');
gulp.task('build:csharp', function(cb) {
  Dotnet.build({ cwd: './' }, cb);
});

watch.js

var gulp = require('gulp');
var runSequence = require('run-sequence');
var paths = './**/*.cs';

function changed(event) {
  gutil.log(`File ${event.path} was ${event.type}, running tasks...`);
};

gulp.task('watch', ['build'], function() {
  gulp.watch(paths, {interval: 500}, function(){
    runSequence('build:csharp', 'start:api');
  }).on('change', changed);
});

server.js

var gulp = require('gulp');
var Dotnet = require('gulp-dotnet');

var server;
gulp.task('start:api', function(cb) {
  if(!server) server = new Dotnet({ cwd: paths.api  });
  server.start('weblistener', cb);
});

Options

{
  // current working directory
  cwd: './',
  
  // how noisy?
  // options: 'debug', 'info', 'error', 'silent'
  logLevel: 'debug',
  
  // notify on errors
  notify: true
}

Credits

gulp-dotnet is a Swimlane open-source project; we believe in giving back to the open-source community by sharing some of the projects we build for our application. Swimlane is an automated cyber security operations and incident response platform that enables cyber security teams to leverage threat intelligence, speed up incident response and automate security operations.

License

MIT

Keywords

gulp

FAQs

Package last updated on 20 May 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts