mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Add helper for reading netlify file config
This commit is contained in:
parent
aea1357986
commit
7b4e552bdc
2 changed files with 34 additions and 0 deletions
12
helpers/incremental/caching.js
Normal file
12
helpers/incremental/caching.js
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import { promises as fs } from 'fs'
|
||||
|
||||
const TOML = require('@iarna/toml')
|
||||
|
||||
|
||||
export async function getNetlifyConfig () {
|
||||
const netlifyTomlContents = await fs.readFile('./netlify.toml', 'utf-8')
|
||||
|
||||
// console.log('netlifyTomlContent', netlifyTomlContents)
|
||||
|
||||
return TOML.parse( netlifyTomlContents )
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue