API for supported languages/plugins/etc.
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 13k
- Forks
- 1.4k
- Avg merge
- 15h 36m
- Merged PRs (30d)
- 3
Description
Motivation
Libraries sometimes need to know all languages/plugins/etc. Prism supports.
Description
A simple API to:
- Check whether a given language/plugin/etc is supported.
- Query all languages/plugins/etc.
My suggestion is to make this a part of components.js. Something like:
components.supported(lang: string | string[]): boolean;
components.supported.languages: string[];
components.supported.plugins: string[];
The other properties of the components object are still private to Prism. By implementing the API in components.js, both browser and NodeJS devs have easy access to it.
Alternatives
Document components.json and declare it to be a part of Prism's public API. Right now, it's considered a private part of Prism, so we could make it public.
This has the obvious downside that changes to components.json might be breaking and it takes a lot of freedom from Prism's core development team.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading components.js and components.json to understand how supported languages and plugins are represented. Compare exposing the proposed API from components.js with making components.json public, including the browser and NodeJS use cases described. Done means the chosen public approach supports checking an item and querying supported languages and plugins.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100