Contributing to mark.js
These are the contributing guidelines of mark.js. If you are interested in contributing to the website of mark.js, please head over to the mark.js website contributing guidelines.
If you have a question, problem, feature request or found a bug please open an issue.
1.1 Questions, Problems and Bugs
For each issue please provide:
- What kind of browser and version you are using
- What kind of mark.js version you are using
- A detailed description
- The exact steps to reproduce (bugs and problems)
- A fiddle that demonstrates your issue (if possible)
1.2 Feature Requests
Please provide the following information:
- Your use case, why your enhancement is necessary
- How to solve it in your opinion
Before you start developing, you should clone or download this repository and run:
$ bower install $ npm install
Now you are ready to develop.
2.2 Source Code Documentation
JSDOC is being used as an API documentation generator. If you want to extend mark.js it might be helpful for you to view the documentation first, to learn more about the internal structure. Simply run:
$ grunt dist
and open the file
2.3 ES6 (ES2015) Information
mark.js was developed in ECMAScript 6. But as most browsers don't fully support ES6 yet, it has only those features implemented that can be converted "locally" to ES5 using Babel without making a polyfill necessary. This means to forgo using generators, Set, Map, for...of loops etc..
2.4 Grunt Tasks
|dev||For development. Will run
|compile||Generates all files in
|lint||Runs ESLint lint|
|test||Runs the test,
Note: Run tasks with
$ grunt [task] (Replace "[task]" with the actual task name).
2.5 Pull Requests
Pull requests are very much appreciated!
Please note the following things when doing a pull request:
- If your pull request is implementing a feature, please open a new issue first. Therein we can discuss about it and determine if it brings a benefit
- Do not change any version
- Always include a test if possible. Please avoid referencing existing test
files to keep flexibility
- Add a new fixture (test/fixtures/)
- Add a new spec (test/specs/)
- Reference related issues in the pull request description
- Describe your changes and why they are necessary (if not stated in referenced issues)
- When changing something inside
mark.js, please run
$ grunt distat the end to generate files in
- Make sure that you format code to fit the code style. If
something isn't covered, please see existing code for orientation. The maximum
something is wrong with the code style when running
$ grunt testor
$ grunt dist
- Pull requests will not be accepted if they worsen test coverage significantly.
You can view test coverage in
$ grunt test
2.6 Contribution and License Agreement
If you contribute to this project, you are implicitly allowing your code to be distributed under this license. You are also implicitly verifying that all code is your original work.
Thank you for contributing!