How to run grunt server in dist directory instead of app directory?

前端 未结 4 998
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-13 18:26

After grunt building my AngularJS app to my dist directory, I would like to test it out with grunt server. Problem is that grunt

4条回答
  •  青春惊慌失措
    2020-12-13 19:03

    The grunt serve:dist answer is the correct one, but the process is quite annoying because you need to compile your whole project into production mode every time you call grunt serve:dist.

    What I did is I modified the Gruntfile.js in the serve task, removing the build task from the parameter sent to run. You need to manually build first with grunt or grunt build and then call grunt serve:dist and manually open the URL.

提交回复
热议问题