gulp-dnx0.3.0 • Public • Published
Gulp plugin for ASP.NET 5. You can use this plugin to integrate ASP.NET 5
dnu restore and
dnx command execution (for the commands available inside you project.json file). Check out the example inside the repository.
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
var gulp =dnx = ;gulp;gulp;
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:
// the default optionsvar options =restore: truebuild: falserun: truecwd: './';var dnxCommand = 'web';gulp;
There are also shorthand methods for specific tasks:
//runs the project.json's command 'kestrel'gulp;// only restores the packagesgulp;// only builds the projectgulp;// restores the packages and builds the projectgulp;
gulp-dnx also integrates with
dnx --watch to run your commands. So, it will restart your server when you change a code file.
You can change the working directory for the specific command to run passing
cwd as an option to the main method or as parameter to the shorthand methods.
//assuming project.json is inside the 'server' directoryvar options =cwd: './server/';gulp;//using the shorthand methodsgulp;gulp;gulp;