Is there a good way to combine Javascript/Css files and do minification and obfuscation for the release and distribution builds using the multi-device hybrid apps project type for Visual Studio? I currently use Grunt for executing these tasks, but I'm interested in a complete Visual Studio driven process.
Asked
Active
Viewed 497 times
2
-
possible duplicate of [Multi-device hybrid apps: combining Grunt and msbuild](http://stackoverflow.com/questions/25276099/multi-device-hybrid-apps-combining-grunt-and-msbuild) – Dai Aug 13 '14 at 17:42
1 Answers
1
You can use Grunt/gulp with the TaskRunner Explorer extension for Visual Studio.
To make sure your application will exclude the node_modules directory when you'll build it, you'll have to edit the util.js file in c:\Users_user_name_\AppData\Roaming\npm\node_modules\vs-mda\lib\ like this :
util.getDefaultFileNameEndingExclusions = function () {
return [settings.projectSourceDir + '/bin',
settings.projectSourceDir + '/bld',
settings.projectSourceDir + '/node_modules',//add this line
settings.projectSourceDir + '/merges',
settings.projectSourceDir + '/plugins',
settings.projectSourceDir + '/res',
settings.projectSourceDir + '/test',
settings.projectSourceDir + '/tests',
'.jsproj', '.jsproj.user'];
}
This extension provides a grunt/gulp task control panel in visual studio :
Install your npm modules will be the only thing you will have to do out of Visual Studio
Hope that helps

creal
- 104
- 8