|
1 | | -# Contributing to the A/B Smartly JavaScript SDK |
| 1 | +# Contributing to the ABsmartly Javascript SDK |
2 | 2 |
|
3 | | -The A/B Smartly JavaScript SDK is an open source project and we welcome your feedback and contributions. |
4 | | -The information below describes how to build and test the project, and how to submit a pull request. |
| 3 | +The ABsmartly Javascript SDK is an open-source project, and we welcome your |
| 4 | +feedback and contributions. This guide provides information on how to build |
| 5 | +and test the project, and how to submit a pull request. |
5 | 6 |
|
6 | 7 | ## Development |
7 | 8 |
|
8 | | -### Development process |
9 | | - |
10 | | -1. Fork the repository and create a topic branch from `main` branch. Please use a descriptive name for your branch. |
11 | | -2. While developing, use descriptive messages in your commits. Avoid short or meaningless sentences like: "fix bug". |
12 | | -3. Make sure to add tests for both positive and negative cases. |
13 | | -4. Run the linter script of the project and fix any issues you find. |
14 | | -5. Run the build script and make sure it runs with no errors. |
15 | | -6. Run all tests and make sure there are no failures. |
16 | | -7. `git push` your changes to GitHub within your topic branch. |
17 | | -8. Open a Pull Request from your forked repo and into the `main` branch of the original repository. |
18 | | -9. When creating your PR, please fill out all the fields of the PR template, as applicable, for the project. |
19 | | -10. Check for conflicts once the pull request is created to make sure your PR can be merged cleanly into `main`. |
20 | | -11. Keep an eye out for any feedback or comments from A/B Smartly's SDK team. |
| 9 | +### Development Process |
| 10 | + |
| 11 | +1. **Fork and Branch**: Fork the repository and create a topic branch from the |
| 12 | + `main` branch. Use a descriptive name for your branch. |
| 13 | +2. **Commit Messages**: Use descriptive commit messages. Avoid short or vague |
| 14 | + messages like "fix bug". |
| 15 | +3. **Testing**: Add tests for both positive and negative cases to ensure |
| 16 | + comprehensive coverage. |
| 17 | +4. **Linting**: Run the linter script and fix any issues. This helps maintain |
| 18 | + code quality and consistency. |
| 19 | +5. **Building**: Run the build script to ensure it completes without errors. |
| 20 | +6. **Testing**: Run all tests to ensure there are no failures. |
| 21 | +7. **Push Changes**: Push your changes to GitHub in your topic branch. |
| 22 | +8. **Pull Request**: Open a pull request from your forked repo into the `main` |
| 23 | + branch of the original repository. |
| 24 | +9. **PR Template**: Fill out all applicable fields in the pull request template. |
| 25 | +10. **Conflict Check**: Ensure there are no conflicts with the `main` branch |
| 26 | + when creating the pull request. |
| 27 | +11. **Feedback**: Monitor your pull request for any feedback or comments from |
| 28 | + the ABsmartly SDK team. |
21 | 29 |
|
22 | 30 | ### Building the SDK |
23 | 31 |
|
24 | | -For widespread use of the SDK with different environments and module formats, we have three different builds: |
25 | | -* A bundled **UMD** file for browsers (IE 10+). |
26 | | -* A **ES2015** modules compatible build. |
27 | | -* A **CommonJS** modules compatible build. |
28 | | - |
29 | | -The different builds can be generated all at once with the command `npm run build`. Refer to [package.json](package.json) for more insight on the build scripts. |
30 | | - |
31 | | -### Running tests |
32 | | - |
33 | | -The project includes unit tests for both browser and Node.js environments. |
34 | | - |
35 | | -All tests can be run at once with the command `npm run test`. |
| 32 | +```bash |
| 33 | +npm run build |
| 34 | +``` |
36 | 35 |
|
37 | | -For additional testing scripts or to get more insight on how these work, please refer to our [package.json](package.json) file. |
| 36 | +### Running Tests |
38 | 37 |
|
39 | | -### Linting and other useful checks |
| 38 | +```bash |
| 39 | +npm run test |
| 40 | +``` |
40 | 41 |
|
41 | | -Consider running the linter script (`npm run lint`) and fixing any issues before pushing your changes. |
| 42 | +## Contact |
42 | 43 |
|
43 | | -If you want to debug your changes consuming it from a test application, you could: |
44 | | -- For browsers, import the **UMD** bundle from an HTML document. To debug you can use the browser dev tools. |
45 | | -- For Node, you could use symlinks via [npm link command](https://docs.npmjs.com/cli/link.html) and then import the package as usual. To debug you could use the [Node inspector](https://nodejs.org/en/docs/guides/debugging-getting-started/). |
| 44 | +If you have any questions or need further assistance, you can reach us at |
| 45 | +<support@absmartly.com> or on your company's dedicated ABsmartly Slack Connect |
| 46 | +channel. |
46 | 47 |
|
47 | | -# Contact |
| 48 | +--- |
48 | 49 |
|
49 | | -If you have any other questions or need to contact us directly we can be reached at sdk@absmartly.com |
| 50 | +Thank you for contributing to the ABsmartly Javascript SDK! Your efforts help us |
| 51 | +improve and grow our open-source community. |
0 commit comments