MCPcopy
hub / github.com/DevCloudFE/ng-devui / readFile

Function readFile

scripts/themeable/utils/generate-styles-var.js:4–8  ·  view source on GitHub ↗
(files, dir = '')

Source from the content-addressed store, hash-verified

2const path = require('path');
3
4async function readFile(files, dir = '') {
5 return Promise.all(files.map(async (file) => {
6 return await fs.readFile(`${path.resolve(dir + file)}`, 'utf8');
7 })).catch(e => console.error(e));
8}
9
10async function task() {
11 const dir = 'devui/style/theme/';

Callers 1

taskFunction · 0.85

Calls 2

resolveMethod · 0.80
errorMethod · 0.80

Tested by

no test coverage detected