andywer / andywer/postcss-debug
How to actually use this
- Ngôn ngữ chính
- JavaScript
- Star
- 94
- Fork
- 7
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
The documentation is quite lacking. It basically doesn't explain how to actually use the thing. You have to follow the link to the Webdebugger README (under **Contributing**) to learn that it rewrites `index.html` with the debugging data embedded.
`debug.inspect()` doesn't appear to do much (it doesn't start a web server or anything), but behind the scenes it "automagically" updates the Webdebugger's static page. The Webdebugger is supposed to be "loosely coupled" and "stand-alone" but I'm not sure how you'd use one without the other.
To debug multiple files you have to call `debug` multiple times and `debug.inspect` only once, which is _reasonable_, but not documented.
Here's what I would suggest:
1. Consider the "Webdebugger" a vital part of this tool and explain how to access it on the README. It's best to do this with [live-server](https://www.npmjs.com/package/live-server) i.e. `live-server --open node_modules/postcss-debug/webdebugger/build/`
2. Instead of rewriting `index.html`, have `index.html` include the debugging data via a script tag. Let the static page truly be a static page and avoid having to patch it with string replacement.
3. Rename `debug.inspect` to something like `debug.dump` or `debug.write`, and provide a callback with the path to the static page, so the user can log something when it's done, maybe launch a server, and to improve the code's ability to self-document.
4. Document the methods of the API explicitly, not just through code examples
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
Bắt đầu với README chính, README của Webdebugger trong Contributing và hành vi hiện có của debug.inspect và index.html được mô tả trong issue. So sánh cách sử dụng được ghi chép với quy trình làm việc nhiều tệp và quyết định những thay đổi được yêu cầu đối với tài liệu và Webdebugger nào nằm trong phạm vi. Hoàn thành khi README giải thích cách truy cập Webdebugger, các phương thức API được nêu rõ ràng và quy trình làm việc được ghi chép khớp với hành vi của công cụ.
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
- devtools, documentation
- Loại issue
- Tài liệu
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 25/100