mirror of
https://github.com/grafana/grafana.git
synced 2025-02-20 11:48:34 -06:00
* Updated package json but not updated source files * Update eslint plugin * updated files
15 lines
534 B
JavaScript
15 lines
534 B
JavaScript
'use strict';
|
|
const { parse: parseYml } = require('yaml');
|
|
const {
|
|
promises: { readFile },
|
|
} = require('fs');
|
|
const { resolve: resolvePath } = require('path');
|
|
|
|
const readProvision = (filePath) => readFile(filePath, 'utf8').then((contents) => parseYml(contents));
|
|
|
|
const readProvisions = (filePaths) => Promise.all(filePaths.map(readProvision));
|
|
|
|
// Paths are relative to <project-root>/provisioning
|
|
module.exports = ({ CWD, filePaths }) =>
|
|
readProvisions(filePaths.map((filePath) => resolvePath(CWD, 'provisioning', filePath)));
|