An emdaer plugin that imports content from another file
npm install @emdaer/plugin-importAn emdaer plugin that imports content from another file
@emdaer/plugin-import is an emdaer plugin β see the emdaer monorepo for more information
Import a plain markdown file like so:
This content was imported!
Import and call a function that returns/resolves a string like so: A function named printThrice is called with the string Hello world! x3:
Hello world! x3
Hello world! x3
Hello world! x3
`` Import content into your readme Parameters Examplesmd`importPlugin
Content can be imported in a few ways, as long as itβs a stringoptions any options.path string? The filename to require.options.args array? An array of args to pass to the exported function at the required path.options.runEmdaer boolean? Whether or not to run emdaer on the content.
`javascript`
`javascript``
Returns Promise<string> The contents at the path or the execution results
Gets a list of possible paths for the given file
This may be a relative path, check that first, then check in node modules.
Parameters
Returns Array<string> list of possible paths for the given file