The project.json
file can contain a prepublish
entry to execute some scripts before publishing of a package. There are several variables available in those scripts, according to their wiki, for example %project:Directory%
"scripts": {
"prepublish": [ "dir %project:Directory%" ]
}
Is there any way to access the input and output directory used for publishing? I see in visual studio the actual paths:
Publishing files to E:\Projects\WebPlatform\artifacts\bin\DemoLauncher\Release\PublishOutput
Executing command ["C:\Program Files (x86)\IIS\Microsoft Web Deploy V3\msdeploy.exe" -source:contentPath='C:\Users\xxxxx\AppData\Local\Temp\PublishTemp\DemoLauncher70\' -dest:contentPath='E:\Projects\WebPlatform\artifacts\bin\DemoLauncher\Release\PublishOutput'
However i cannot seem to get the values in "prepublish" script. I would like something like:
"scripts": {
"prepublish": [ "dir %outputDirectory%" ]
}