我希望能够用JavaScript在Visual Studio中识别开发人员模式。例如:如何识别Visual Studio中的开发人员模式?
function choice(res,req) {
if (developerMode) {
console.log("developer mode");
readFile("data.json"); //Fictitious function
else (!developerMode) {
console.log("no developer mode");
exec("./writefile"); //Fictitious shell script
}
}
有人有想法识别“developerMode”吗?
我认为你需要使用嵌入你的javascript的剃须刀代码 –
@ScottSelby你怎么知道使用Razor在这个项目中? – mason
@mason如果有必要,我可以嵌入Razor。 – theophile