@emdaer/plugin-node-package

An emdaer plugin that requires a file and optionally executes it with provided arguments.

Stats

stars ๐ŸŒŸissues โš ๏ธupdated ๐Ÿ› created ๐Ÿฃsize ๐Ÿ‹๏ธโ€โ™€๏ธ
1428Jun 2, 2021Oct 15, 2017Minified + gzip package size for @emdaer/plugin-node-package in KB

Readme

@emdaer/plugin-node-package

An emdaer plugin that requires a file and optionally executes it with provided arguments.

nodePackagePlugin

Use the export of a given package as the content if itโ€™s a string, and execute it with provided args if itโ€™s a function

Parameters

  • options 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.

Returns Promise<string> The contents at the path or the execution results

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.