How do you configure mathjs in the CLI? #3026
-
Hello! I have several custom functions and datatypes that I import typically using math.config. I'd like to also use these in the repl/CLI. Is that possible with flags or something or do I need to edit those files to include that? Thank you |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
That is a good question. In the repl It would be interesting to think through command line options for the CLI to configure mathjs and import functions. Anyone interested picking that up? |
Beta Was this translation helpful? Give feedback.
-
Thank you! I can find a workaround there. |
Beta Was this translation helpful? Give feedback.
That is a good question.
In the repl
./bin/repl.js
you are just running javascript, so you can usemath.import(...)
to import your own functions and data typesFor the cli
./bin/cli.js
there is no such option, and you will have to edit the source code of it.It would be interesting to think through command line options for the CLI to configure mathjs and import functions. Anyone interested picking that up?