prismjs/prism
Composer 安装命令:
composer require prismjs/prism
包简介
Lightweight, robust, elegant syntax highlighting. A spin-off project from Dabblet.
README 文档
README
Prism is a lightweight, robust, and elegant syntax highlighting library. It's a spin-off project from Dabblet.
You can learn more on prismjs.com.
Why another syntax highlighter?
Contribute to Prism!
Important Notice
We are currently working on Prism v2 and will only accept security-relevant PRs for the time being.
Once work on Prism v2 is sufficiently advanced, we will accept PRs again. This will be announced on our Discussion page and mentioned in the roadmap discussion.
Prism v1 contributing notes
Prism depends on community contributions to expand and cover a wider array of use cases. If you like it, consider giving back by sending a pull request. Here are a few tips:
- Read the documentation. Prism was designed to be extensible.
- Do not edit
prism.js, it’s just the version of Prism used by the Prism website and is built automatically. Limit your changes to the unminified files in thecomponents/folder.prism.jsand all minified files are generated by our build system (see below). - Use
npm cito install Prism's dependencies. Do not usenpm installbecause it will cause non-deterministic builds. - The build system uses gulp to minify the files and build
prism.js. With all of Prism's dependencies installed, you just need to run the commandnpm run build. - Please follow the code conventions used in the files already. For example, I use tabs for indentation and spaces for alignment. Opening braces are on the same line, closing braces on their own line regardless of construct. There is a space before the opening brace. etc etc.
- Please try to err towards more smaller PRs rather than a few huge PRs. If a PR includes changes that I want to merge and also changes that I don't, handling it becomes difficult.
- My time is very limited these days, so it might take a long time to review bigger PRs (small ones are usually merged very quickly), especially those modifying the Prism Core. This doesn't mean your PR is rejected.
- If you contribute a new language definition, you will be responsible for handling bug reports about that language definition.
- If you add a new language definition or plugin, you need to add it to
components.jsonas well and rebuild Prism by runningnpm run build, so that it becomes available to the download build page. For new languages, please also add a few tests and an example in theexamples/folder. - Go to prism-themes if you want to add a new theme.
Thank you so much for contributing!!
Software requirements
Prism will run on almost any browser and Node.js version but you need the following software to contribute:
- Node.js >= 10.x
- npm >= 6.x
Translations
prismjs/prism 适用场景与选型建议
prismjs/prism 是一款 基于 JavaScript 开发的 Composer 扩展包,目前已累计 69.66k 次下载、GitHub Stars 达 12.99k, 最近一次更新时间为 2019 年 06 月 27 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 prismjs/prism 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 prismjs/prism 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 69.66k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 12992
- 点击次数: 29
- 依赖项目数: 4
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-06-27