Export compiler function
See original GitHub issueInitial checklist
- I read the support docs
- I read the contributing guide
- I agree to follow the code of conduct
- I searched issues and couldn’t find anything (or linked relevant results below)
Problem
Heya, I would like to directly import/use the compiler, on a pre-created list of events. I think this is currently not possible?
Obviously this is the key function provided by this package, then fromMarkdown
is just a wrapper around it and the upstream postprocess
/parse
/postprocess
functions (all importable)
Solution
Allow for e.g.
import {compiler} from 'mdast-util-from-markdown/lib/index'
compiler(options)(events)
I guess this just requires the addition of export function compiler...
, and a small modification of package.json
, ilke in micromark itself:
{
"exports": {
".": {
"development": "./dev/index.js",
"default": "./index.js"
},
"./lib/index": {
"development": "./dev/lib/index.js",
"default": "./lib/index.js"
},
"./lib/index.js": {
"development": "./dev/lib/index.js",
"default": "./lib/index.js"
}
}
}
Alternatives
Don’t think so
Issue Analytics
- State:
- Created a year ago
- Comments:30 (13 by maintainers)
Top Results From Across the Web
/EXPORT (Exports a Function) | Microsoft Learn
The /EXPORT option specifies a function or data item to export from your program so that other programs can call the function or...
Read more >Externs and Exports | Closure Compiler - Google Developers
Purpose of Exports Exports are another mechanism for giving symbols consistent names after compilation. They are less useful than externs and ...
Read more >How does a compiler deal with inlined exported functions?
A function is only inline if declared using that keyword or if defined inside the class definition, and inline is only a hint;...
Read more >#pragma export - IBM
Purpose. Declares that an external function or variable is to be exported. The pragma also specifies the name of the function or variable...
Read more >export - ARM Compiler armasm User Guide Version 6.5
The EXPORT directive declares a symbol that can be used by the linker to resolve symbol references in separate object and library files....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
actually one more thing 😅
Out of interest, why would you say tokens are not a CST?
But then it feels strange that you basically have to use them, to create a micromark plugin. It seems like you are saying that creating a micromark plugin should not be possible, because it kind of only uses private APIs
But anyhow, thanks again for your time! I think I’ve discussed all I can about my use case at this point