views:

114

answers:

2

Hi,

does anyone know the preprocessor directives that are available for use in the script.jst file. I am trying to write the filename of the generated js file to the generated .js file. ie. script.js or script.debug.js

Thanks

Donal

A: 

The file being generated isn't available as a variable to output, but its a good idea, and fits with the work I am currently doing in the script# compiler/preprocessor.

I'll look into adding that in either the next release or the one after that.

NikhilK
I have added the following for the next build:#= ScriptFile ##
NikhilK
A: 

Hi Nikhil,

Cool tool! I'm definitely a fan at this stage.

Is there any way this could be achieved through preprocessor directives in the jst. I'm building the release configuration of the project. so it would be something like

if ssbuildtype=debug

// filename.debug.js

else

// filename.js

endif

Thanks

Donal

Donal McWeeney
You can certainly do#if DEBUG#else#endifas long as DEBUG is a variable defined either in the csproj if you're using msbuild or passed in as a commandline parameter if you're using ssc.exe.
NikhilK