2
votes

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.

1

1 Answers

1
votes

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 : enter image description here

Install your npm modules will be the only thing you will have to do out of Visual Studio

Hope that helps