madskristensen / WebEssentials2013

Visual Studio extension
http://vswebessentials.com
Other
944 stars 252 forks source link

Bundle source files has strange path in map file #2013

Open PeterMacko opened 8 years ago

PeterMacko commented 8 years ago

Dear All,

Im woking on Sharepoint project where im using Web Essential bundle. Bundle has this files:

    <file>AjaxProviders/AutocompleteLoader.js</file>
    <file>AjaxProviders/ServiceitemSearch.js</file>
    <file>FieldIncidentMapper.init.js</file>
    <file>XmlHelper.js</file>

with this configuration source array in map file is:

"sources":["../../../../../../Program%20Files%20(x86)/Microsoft%20Visual%20Studio%2012.0/Common7/IDE/AjaxProviders/AutocompleteLoader.js","../../../../../../Program%20Files%20(x86)/Microsoft%20Visual%20Studio%2012.0/Common7/IDE/AjaxProviders/ServiceitemSearch.js","../../../../../../Program%20Files%20(x86)/Microsoft%20Visual%20Studio%2012.0/Common7/IDE/XmlHelper.js","../../../../../../Program%20Files%20(x86)/Microsoft%20Visual%20Studio%2012.0/Common7/IDE/FieldIncidentMapper.init.js"],

Path is OK if Im on local machine but after deploying to sharepoint it is absolutely wrong.

Is there any option how to ignore path ../../../../../../Program%20Files%20(x86)/Microsoft%20Visual%20Studio%2012.0/Common7/IDE/? and get this source array"sources":["AjaxProviders/AutocompleteLoader.js","AjaxProviders/ServiceitemSearch.js","XmlHelper.js","FieldIncidentMapper.init.js"],?

if i change configuration to absolute paths:

<file>/Assets/Scripts/FieldIncidentMapper/AjaxProviders/AutocompleteLoader.js</file>
<file>/Assets/Scripts/FieldIncidentMapper/AjaxProviders/ServiceitemSearch.js</file>
<file>/Assets/Scripts/FieldIncidentMapper/FieldIncidentMapper.init.js</file>
<file>/Assets/Scripts/FieldIncidentMapper/XmlHelper.js</file>

source array looks like this: "sources":["/Assets/Scripts/FieldIncidentMapper/AjaxProviders/AutocompleteLoader.js","/Assets/Scripts/FieldIncidentMapper/AjaxProviders/ServiceitemSearch.js","/Assets/Scripts/FieldIncidentMapper/XmlHelper.js","/Assets/Scripts/FieldIncidentMapper/FieldIncidentMapper.init.js"],

This looks fine but on the server path is not right i deploying files to Style Library folder.

Is there any option how to set default source array path?

I need to achieve path in this form ["/Style Library/Assets/Scripts/FieldIncidentMapper/AjaxProviders/AutocompleteLoader.js","/Style Library/Assets/Scripts/FieldIncidentMapper/AjaxProviders/ServiceitemSearch.js","/Style Library/Assets/Scripts/FieldIncidentMapper/XmlHelper.js","/Style Library/Assets/Scripts/FieldIncidentMapper/FieldIncidentMapper.init.js"],.