https://github.com/loopmode/create-prism-list
Creates a list of installed prismjs resources
https://github.com/loopmode/create-prism-list
Last synced: 6 months ago
JSON representation
Creates a list of installed prismjs resources
- Host: GitHub
- URL: https://github.com/loopmode/create-prism-list
- Owner: loopmode
- License: mit
- Created: 2020-02-11T16:11:55.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-02-11T16:16:24.000Z (about 6 years ago)
- Last Synced: 2025-02-09T03:45:39.457Z (about 1 year ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @loopmode/create-prism-list
Creates a list of installed prismjs themes, languages or plugins.
Usage: `yarn create prism-list outFile typeOrPattern`
Run it in a project where prismjs is installed. Monorepos and yarn workspaces are supported.
```sh
# using yarn
yarn create prism-list ./languages.ts languages
yarn create prism-list ./themes.ts themes
yarn create prism-list ./plugins.ts plugins
# using npm
npm init prism-list ./languages.ts languages
# with a pattern
yarn create prism-list ./stuff/minified-files.json *.min
```
### `outFile`
File to create, a filepath relative to the current working directory
Supported extensions: `json`, `js`, `ts`, `tsx`.
Note about typescript: The export will be `as const`, so you can do something like `type PrismTheme = typeof import('./themes.ts').default[number];`.
### typeOrPattern
- type can either be one of `themes|languages|plugins`
- type can be a glob pattern relative to the prismjs directory inside node_modules