highlightjs / highlightjs/highlightjs-bbcode
Please include both a NPM requirable file and a CDN-ready distributable
- Ngôn ngữ chính
- JavaScript
- Star
- 7
- Fork
- 2
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
This issue is being opened as part of [our iniative](https://github.com/highlightjs/highlight.js/issues/3008) to make all 3rd party grammars:
- easier to use for all end users
- internally a bit more consistent (both to help end users and also encourage cross-maintenance)
- ready to go for version 11
Please include a `dist` folder that includes a ready-to-go CDN distributable that can be used with a single line of JS. IE, our simple 3 install should "just work" without any other code or markup:
```
hljs.highlightAll();
```
Your README optimally would also document this usage. Please see the `robots-txt` repository for a usage example.
- https://github.com/highlightjs/highlightjs-robots-txt#static-website-or-simple-usage
Our build system can generate this file for you (and we recommend that). Using our internal build system also allows you to easily check your grammar for exponential or polynomical run-away regular expressions.
- https://github.com/highlightjs/highlight.js/blob/main/extra/3RD_PARTY_QUICK_START.md#packaging
If you have any questions, feel free to ask!
Thanks,
Highlight.js Maintainer
---
You only have a single file now... which doesn't work with Node.js. Your source file should have a single export (the language function).. your distributable file should include the `registerLanguage` call. See the robots-txt repository linked to above for examples (I see you forked from that repo).
IE, the `src/languages/bbcode.js` file is the one you maintain (and can be required by Node.js, etc), and the `dist/bbcode.min.js` file is the one that our build system would auto-generate for you.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
Start with src/languages/bbcode.js and the packaging section of extra/3RD_PARTY_QUICK_START.md, then compare the robots-txt repository example. The source should be requireable by Node.js, while the build should produce dist/bbcode.min.js with the registerLanguage call; update the README with CDN usage and verify both usage paths.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript
- Lĩnh vực
- build-system
- Loại issue
- Tính năng
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức phù hợp với người mới
- 48/100