Pregunta

I'm using the ESRI JavaScript API and ESRI conveniently provide a .js file that adds intellisense support. To use it, you have to include an html tag on the page that references the .js file exactly as you would any other js file.

However, this has the undesirable effect of the page then attempting to load the .js file when run. This is undesirable as a) it's over 0.5MB and b) it seems to have some errors in it.

Is there a way that Visual Studio (2012) can some how strip out the tag for this particular .js file when the project is run? i.e. some sort of pre-processor command?

Thanks Simon

¿Fue útil?

Solución

Download the vsdoc of the API, then use

/// <reference path="path/to/script/api-vsdoc.js" />

in a js file. This enables IntelliSense but does not include the script at runtime.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top