leds-spark-lib
Version:
Biblioteca de geração de código
64 lines • 1.91 kB
JavaScript
import { expandToString } from "../../../../models/model.js";
import fs from "fs";
import path from "path";
export function generate(model, target_folder) {
const PublishProfiles_folder = target_folder + "/PublishProfiles";
fs.mkdirSync(PublishProfiles_folder, { recursive: true });
fs.writeFileSync(path.join(target_folder, "launchSettings.json"), generatelaunchSettings(model));
}
function generatelaunchSettings(model) {
return expandToString `
{
"profiles": {
"http": {
"commandName": "Project",
"launchBrowser": true,
"launchUrl": "swagger",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"dotnetRunMessages": true,
"applicationUrl": "http://localhost:5068"
},
"https": {
"commandName": "Project",
"launchBrowser": true,
"launchUrl": "swagger",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"dotnetRunMessages": true,
"applicationUrl": "https://localhost:7052;http://localhost:5068"
},
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"launchUrl": "swagger",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"Docker": {
"commandName": "Docker",
"launchBrowser": true,
"launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}/swagger",
"environmentVariables": {
"ASPNETCORE_HTTPS_PORTS": "8081",
"ASPNETCORE_HTTP_PORTS": "8080"
},
"publishAllPorts": true,
"useSSL": true
}
},
"$schema": "http://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:5881",
"sslPort": 44353
}
}
}`;
}
//# sourceMappingURL=generate.js.map