How to optimize workflow with single project using Aurelia CLI / ASP.NET Core

邮差的信 提交于 2019-12-05 08:48:44

We use au run --watch almost exclusively but we still run the app via F5 in VS as you would expect. We don't care that the run command actually serves the files (if there was a watch flag on the build command we would use au build --watch instead). We start the watch automatically when the project is first opened, then we can manually stop/restart it as we work throughout the day using tasks we defined in a gulpfile (see below) and the Task Runner Explorer window (so I don't need to have a console open). This way I only need to recompile the server side code when I actually change server side code.

We don't have browsersync set up so this doesn't refresh the browser automatically, but we're fine with that - I don't find that ctrl+R is a big time sink.

We have "au build --env prod" in the prepublish step to make sure the build machine does a production build.

Our gulpfile.js:

var gulp = require('gulp');
var shell = require('gulp-shell');

gulp.task('build-dev', shell.task(['au build --env dev']));
gulp.task('watch', shell.task(['au run --watch']));
gulp.task('test', shell.task(['au test --watch']));
gulp.task('build-prod', shell.task(['au build --env prod']));
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!