Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fornax Scripts/Extensions #88

Open
oluwandabira opened this issue May 25, 2021 · 0 comments
Open

Fornax Scripts/Extensions #88

oluwandabira opened this issue May 25, 2021 · 0 comments

Comments

@oluwandabira
Copy link
Contributor

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.

@oluwandabira oluwandabira changed the title Fornax Script/Extensions Fornax Scripts/Extensions May 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant