Git Product home page Git Product logo

gulp-dotnet's Introduction

DOTNET Core Gulp Plugin

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

  • Build
  • Update
  • Run

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

// Calls 'dotnet build' in the current working directory
gulp.task('build:csharp', function(cb) {
  Dotnet.build({ cwd: './' }, cb);
});

server.js

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

var server;
// Calls 'dotnet run' in the current working directory
gulp.task('start:api', function(cb) {
  if(!server) server = new Dotnet({ cwd: './'  });
  server.start('run', cb);
});

watch.js

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

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

// Starts a watch on both the build and the start tasks
gulp.task('watch', ['build'], function() {
  gulp.watch(paths, {interval: 500}, function(){
    runSequence('build:csharp', 'start:api');
  }).on('change', changed);
});

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

gulp-dotnet's People

Contributors

amcdnl avatar brantw avatar dougludlow avatar

Watchers

James Cloos avatar Renan Marcel Paulino Leite avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.