Commit 2292dc4d authored by Eric Betts's avatar Eric Betts

switch to hardcoded functions dir

parent d7d46058
......@@ -29,3 +29,4 @@ functions-build/*.js
.netlify
.env
functions-build/*
functions/env.json
......@@ -3,9 +3,7 @@ const fs = require('fs');
module.exports = {
onPreBuild: ({ constants }) => {
console.log('Hello world from onPreBuild event!')
const { FUNCTIONS_DIST, FUNCTIONS_SRC } = constants;
console.log({FUNCTIONS_SRC, FUNCTIONS_DIST});
const path = `${FUNCTIONS_SRC}/env.json`;
const path = `functions/env.json`;
const keys = Object.keys(process.env);
fs.writeFileSync(path, JSON.stringify(process.env));
console.log(`Wrote ${keys.length} envs to ${path}`);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment