generator-azure-web-app
Version:
Minimalist Web App generator: Webpack/Rollup + React + Express, deployable to vanilla Node.js, Azure App Service, and IIS
32 lines (25 loc) • 746 B
JavaScript
;
const { green } = require('colors');
const { relative, resolve } = require('path');
function formatIISParameters(iisParameters = {}) {
return Object.keys(iisParameters)
.map(key => `${ key }="${ iisParameters[key] }"`)
.join(',');
}
function globIgnoreNodeModules(relativePath) {
const absolutePath = resolve(__dirname, relativePath);
return [
`${ absolutePath }/**`,
`!${ absolutePath }/**/{node_modules,node_modules/**}`,
`!${ absolutePath }/**/.ntvs_analysis.dat`,
`!${ absolutePath }/**/.vs`
];
}
function prettyPath(path) {
return green(relative('.', path));
}
module.exports = {
formatIISParameters,
globIgnoreNodeModules,
prettyPath
};