-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Support string arrays like in unified-engine #14
Comments
Yes, it would be nice, but that would make this project impossible to use in browsers though. And I don’t see a good way around that (other than maybe a |
Could you expand on why this would break browsers? |
I imagine something like this: unified({
resolver: (name) => loadPlugin(name, { 'remark' })
})
.use(remarkRetext, [
'retext-english',
'retext-syntax-urls'
]) Then The same approach could be used for |
I quite like that unified is as small (in size and API surface) as it can be, and this feels... complex.
|
I'm not sure I follow you you see this being different than the existing top level string based loader.
🤔 makes sense, and interesting challenge.
I'd interpret it as being just plugins and presets. |
Depends on what this can load. If dictionaries, then that seems arbitrary This also makes configuration complex. The attacher is sync, but as this would operate on options and be async, it introduces a problem: user does |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I feel like the added complexity of this, including the headaches around things like endless loading and slow waterfalls, compared to the alternative: use a sharable preset / javascript file where ESM does all that nicely, makes me prefer the latter, current solution? |
I’d prefer to close this. Adding an fs/fetch loader here seems like a hassle. Using a |
I still think this would be nice to have. I think we actually don’t need the resolver. |
Why is the alternative, using
Then what do you propose?
Feels off to me, to introduce different APIs in Node. Even though browsers/deno/etc also have |
Subject of the feature
It would be nice if
remark-retext
could support a unified plugin list instead of a processor using the same syntax asunified-engine
. Logic for this resides in https://github.com/unifiedjs/unified-engine/blob/main/lib/configuration.js. It probably makes sense to extract it into a new unified project.Problem
remark-retext
is often used withremark-cli
, which supports YAML and JSON configuration files, butremark-retext
only works with JavaScript configuration files, because a processor is needed.Expected behavior
It would be nice if the following
.remarkrc
file:could be rewritten as JSON or YAML:
Alternatives
N/A
The text was updated successfully, but these errors were encountered: