1const fs = require('fs')
2
3try {
4 const data = fs.readFileSync('/Users/joe/test.txt', 'utf8')
5 console.log(data)
6} catch (err) {
7 console.error(err)
8}
1_(fs.readdirSync(baseDir, {withFileTypes: true}))
2 .filter(dirent => dirent.isDirectory())
3 .map(dirent => dirent.name)
4 .concat('.')
5 .map(directory => path.resolve(baseDir, directory, '.platform.app.yaml'))
6 .filter(file => fs.existsSync(file))
7 .map(file => ({data: yamlPlatform.load(fs.readFileSync(file)), file}))
8 .map(data => ({name: data.data.name, file: data.file, dir: path.dirname(data.file)}))
9 .value()
10