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
Is your feature request related to a problem? Please describe.
I would like to be able to extend fornax functionality with my owns scripts that are sort of meta generators, so I can do stuff like fornax newpost posts/hello and have the script make a the file filled with a basic front matter or fornax check to verify that configured generator and loader scripts actually have the appropriate functions without having Fornax build files halfway.
Describe the solution you'd like Config is extended to have a ScriptConfig list (ScriptConfig contains a command and script filename) .
The actual script would need to have a function with signature run (projectRoot : string ) (config : Config) (args : string list ??) (result : Result<string, ScriptError> )
So say we have a ScriptConfig{command="newpost"; script="newpost.script"} and run fornax newpost posts/hello Fornax would evaluate the script (located in the scripts directory) passing along the appropriate arguments.
Describe alternatives you've considered
Running dotnet fsi check.fsx but using this would a be lot more work for the script to be aware of Fornax stuff.
Additional context
Got the idea while looking through #67 and thought that having Fornax as an extensible engine would be nice.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
I would like to be able to extend fornax functionality with my owns scripts that are sort of meta generators, so I can do stuff like
fornax newpost posts/hello
and have the script make a the file filled with a basic front matter orfornax check
to verify that configured generator and loader scripts actually have the appropriate functions without having Fornax build files halfway.Describe the solution you'd like
Config
is extended to have aScriptConfig list
(ScriptConfig
contains a command and script filename) .The actual script would need to have a function with signature
run (projectRoot : string ) (config : Config) (args : string list ??) (result : Result<string, ScriptError> )
So say we have a
ScriptConfig
{command="newpost"; script="newpost.script"}
and runfornax newpost posts/hello
Fornax would evaluate the script (located in thescripts
directory) passing along the appropriate arguments.Describe alternatives you've considered
Running
dotnet fsi check.fsx
but using this would a be lot more work for the script to be aware of Fornax stuff.Additional context
Got the idea while looking through #67 and thought that having Fornax as an extensible engine would be nice.
The text was updated successfully, but these errors were encountered: