MCPcopy Index your code
hub / github.com/csscomb/csscomb.js / applyTemplate

Function applyTemplate

src/cli.js:128–143  ·  view source on GitHub ↗
(config)

Source from the content-addressed store, hash-verified

126}
127
128function applyTemplate(config) {
129 if (!config.template) return;
130
131 if (!fs.existsSync(config.template)) {
132 const errorMessage = Errors.missingTemplateFile(config.template);
133 process.stderr.write(errorMessage);
134 process.exit(1);
135 }
136
137 var templateConfig = Comb.detectInFile(config.template);
138 for (var attrname in templateConfig) {
139 if (templateConfig.hasOwnProperty(attrname) && !config[attrname]) {
140 config[attrname] = templateConfig[attrname];
141 }
142 }
143}
144
145function processFiles(files) {
146 const promises = files.map(file => {

Callers 1

getConfigFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected