madskristensen/WebEssentials2013 — pull request #745 by ChrisTorng (2014-03-07 16:14:09+00:00)
Title: Refine build related issues

I've change all `CopyToOutputDirectory` from `Always` to `PreserveNewest`. Includes ```
```
CSS\Snippets\snippets.pkgdef
Resources\Images\preview.png
Resources\Images\WebEssentials2012logo.png
Resources\Images\numbers.png
License.txt
```
I think `PreserveNewest` should be enough. For original `Always`, even project have no any change, run from VS still need to rebuild, waste lots of time.

The other is fix in `PreBuildTask.ExecWithOutputAsync()`. Originally it declare `var output` but not using it. I found running node npm will output to stderr, so change the `output` into `error`, and return the right error message from it.

Another problem wish to address, but not sure if it is ok. In my machine, build takes more than 1 to 1.5 minute. I found the most time consuming part is in the `BeforeBuild` dynamic include content from node modules. By remarking all of them, with statically include all files under Resources\nodejs, build time can reduce to 6 seconds. **You can try by comment out `WebEssentials2013.csproj` line 973~985's 4 `Content`s and build.**

Can we just include all those files in project just like all other files? We only need to change these files while there are new release about them. Although update when new release takes some time, but the build time waste with everyone's every build is even more. I suggest to statically include these files. Then none of us will meet unsync new module's problem like mime jscs. Or new problem may arise while you want to release new version when any module just get uncompatible update. Just any of us update, PR then get merged, then all of us get the new release.