You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.
Based on #644, we need Custom Functions support for CLI, on a par with API usage.
The functions will have same behavior as importers, except for multiplicity: we can have multiple functions, but we can't have multiple importers (yet).
Options:
Provide a single, non repeatable flag --functions, which accepts path value of type string. This path would be a path to .js file with multiple modules.exports. We will use require() and transform into arrays of functions.
Provide a repeatable flag --function, which takes path to file with single or multiple module.exports. We will again use require().
Caveat:
(as noted here)
We need to figure out a way to make watcher aware of any changes made in custom function and custom importer, after the first require(). We would probably need to re-require all the modules (after clearing the require.chache['importer/functions']).
The text was updated successfully, but these errors were encountered:
Based on #644, we need Custom Functions support for CLI, on a par with API usage.
The functions will have same behavior as importers, except for multiplicity: we can have multiple functions, but we can't have multiple importers (yet).
Options:
--functions
, which accepts path value of type string. This path would be a path to.js
file with multiplemodules.exports
. We will userequire()
and transform into arrays of functions.--function
, which takes path to file with single or multiplemodule.exports
. We will again userequire()
.Caveat:
(as noted here)
We need to figure out a way to make
watcher
aware of any changes made in custom function and custom importer, after the firstrequire()
. We would probably need to re-require all the modules (after clearing therequire.chache['importer/functions']
).The text was updated successfully, but these errors were encountered: