question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

add functions directory to provided constants

See original GitHub issue

in https://github.com/netlify/build/blob/4d6202b0a141fdcd0d98335dc64d165c51bac0b4/packages/build/src/plugins/child/constants.js we provide cache dir build dir and config path but not functions dir. we should provide functions dir.

pseudocode i lifted from the functions plugin

	const { build } = config

    if (!build || !build.publish) {
      throw new Error('No build settings')
    }

    const functionsDir = build.functions
    if (!functionsDir) {
      console.log('No functions directory found')
      return
    }

    const buildDir = resolve(build.publish)
    const buildDirFunctions = resolve(buildDir, functionsDir)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
sw-yxcommented, Nov 1, 2019

destination i guess

but also source should build in the default value of functions for me so that i dont have to remember tbh

0reactions
ehmickycommented, Nov 5, 2019

Done at #429.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Create a list of functions to be executed from constant file in ...
I have list of functions to be executed based on the value of a variable, age. These functions correspond to a number of...
Read more >
Best method to define constants used by several functions
I am implementing a model in MATLAB that relies on several functions. All of these functions are dependent on the same set of...
Read more >
Manage functions | Cloud Functions for Firebase - Google
By default, the Firebase CLI looks in the functions/ folder for the source code. If you prefer, you can organize functions in codebases...
Read more >
Python Constants: Improve Your Code's Maintainability
Using named constants to provide default argument values to functions, methods, and classes is another common practice in Python.
Read more >
Predefined constants - Manual - PHP
As such, the constant has lost its *magic*, and would be rather useless unless you assure yourself to have all of your includes...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found