|
| 1 | +# Contributing to `@extractus/article-extractor` |
| 2 | + |
| 3 | +Glad to see you here. |
| 4 | + |
| 5 | +Collaborations and pull requests are always welcomed, though larger proposals should be discussed first. |
| 6 | + |
| 7 | +As an OSS, it's better to follow the Unix philosophy: "do one thing and do it well". |
| 8 | + |
| 9 | +## Third-party libraries |
| 10 | + |
| 11 | +Please avoid using libaries other than those available in the standard library, unless necessary. |
| 12 | + |
| 13 | +This library needs to be simple and flexible to run on multiple platforms such as Deno, Bun, or even browser. |
| 14 | + |
| 15 | + |
| 16 | +## Coding convention |
| 17 | + |
| 18 | +Make sure your code lints before opening a pull request. |
| 19 | + |
| 20 | + |
| 21 | +```bash |
| 22 | +cd article-extractor |
| 23 | + |
| 24 | +# check coding convention issue |
| 25 | +npm run lint |
| 26 | + |
| 27 | +# auto fix coding convention issue |
| 28 | +npm run lint:fix |
| 29 | +``` |
| 30 | + |
| 31 | +*When you run `npm test`, the linting process will be triggered at first.* |
| 32 | + |
| 33 | + |
| 34 | +## Testing |
| 35 | + |
| 36 | +Be sure to run the unit test suite before opening a pull request. An example test run is shown below. |
| 37 | + |
| 38 | +```bash |
| 39 | +cd article-extractor |
| 40 | +npm test |
| 41 | +``` |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | +If test coverage decreased, please check test scripts and try to improve this number. |
| 46 | + |
| 47 | + |
| 48 | +## Documentation |
| 49 | + |
| 50 | +If you've changed APIs, please update README and [the examples](examples). |
| 51 | + |
| 52 | + |
| 53 | +## Clean commit histories |
| 54 | + |
| 55 | +When you open a pull request, please ensure the commit history is clean. |
| 56 | +Squash the commits into logical blocks, perhaps a single commit if that makes sense. |
| 57 | + |
| 58 | +What you want to avoid is commits such as "WIP" and "fix test" in the history. |
| 59 | +This is so we keep history on master clean and straightforward. |
| 60 | + |
| 61 | +For people new to git, please refer the following guides: |
| 62 | + |
| 63 | +- [Writing good commit messages](https://github.com/erlang/otp/wiki/writing-good-commit-messages) |
| 64 | +- [Commit Message Guidelines](https://gist.github.com/robertpainsi/b632364184e70900af4ab688decf6f53) |
| 65 | + |
| 66 | + |
| 67 | +## License |
| 68 | + |
| 69 | +By contributing to `@extractus/article-extractor`, you agree that your contributions will be licensed under its [MIT license](LICENSE). |
| 70 | + |
| 71 | +--- |
0 commit comments