I'm using the VSIX Durandal template (version 2.0). The previous version (1.2) had an optimizer.exe which could be run as part of the build process. I think Weyland has replaced this but I'm not sure how I can get this running as a build step in release mode.
Here's how I do it:
if $(ConfigurationName) == Release (
cd "$(ProjectDir)"
attrib -R App\main-built.js
weyland build
)
I like to clear the read-only flag just in case main-built.js is put in source control, but you may not need that line.
Note: If the build fails (or you don't have node and weyland installed), then refer to the following page for more info: https://github.com/BlueSpire/Durandal/issues/254
Update:
To setup npm to use an authenticated proxy, try these commands in an elevated command prompt (last 2 may not be necessary, but are useful for other tools):
npm config set proxy http://username:password@proxy:8080
npm config set https-proxy http://username:password@proxy:8080
setx http_proxy http://username:password@proxy:8080 /M
setx https_proxy http://username:password@proxy:8080 /M
Then restart Visual Studio (or reboot). I think some might need to use https in the urls. If username or password contains @, then surround with quotes like this: http://"username:p@assword"@proxy:8080
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With