javascript - VS2013: Publish minified bundle created on files outside of the project -
I use Visual Studio 2013 and .NET 4.5 for a MVC project.
I'm learning to use AngularJS through several videos on Pluralsight and one of them runs through the process of using Grunt to clean out the output directory, then javascript files from ngmin Use Minimum to Protect
My process is using gruntfile.js to clean and run ngmin against javascript files in my solution, then put them in a directory called ap_built. It is executed through a batch file in the pre-build for the project, and then I include it through a scriptbundle with the directory pointing to the app_build directory. My intention is to use bundling features of .NET 4.5 to integrate everything else and to integrate javascript after omitting all files through whisper.
I specify the path to the minimum-protected files with the following:
bundles. Add (new scriptbundle ("~ / bundle / miss white"). Directory ("~ / App_built /", "* .js", is true));
If I run it on my local machine, it runs fine without a hitch javascript minified and bundled as I expected and as a result the web application runs fine too .
If I publish the website on a remote server, I get a server error that "directory does not exist parameter name: directory virtual path". I think this error is saying that it is unable to find a populated directory with many * .js files. I also believe that because they are not published because they are not part of the solution, even if it is a part of the solution in the folder (this is only the solution within the Explorer Visual Studio is empty)
If my assumption is correct, then what can I do to add these files to my solution so that they will be published with my web application every time with the minimum effort of my Android?
And if I am wrong in perception, then what can I do to solve it?
Thank you!
I did not find a great way to go about this. I think the relevant information is available, but I was unable to work it.
Rather, because I knew the name of the output file, I had created such an empty file in my project and had given context that I needed to do it. After this, the content of that file was shortened externally and it was necessary to be packaged with the project, so it works well.
Comments
Post a Comment