Contributions are awesome! However, Swig is held to very high coding standards, so to ensure that your pull request is easy to understand and will be more successful, please follow this checklist:
- Setup: Before you begin, run
makefrom your command line to ensure all dependencies are met.
- Test: Always write new test cases.
- Lint: Ensure coding-standards are followed.
- Explain: In your pull request, very clearly explain the use-case or problem that you are solving.
Pull requests that fail to add test coverage, break tests, or fail linting standards will not be accepted.
The swig codebase is highly tested and linted, as a way to guarantee functionality and keep all code written in a particular style for readability. No contributions will be accepted that do not pass all tests or throw any linter errors.
Here's an example of a great pull request that followed the above checklist: Pull Request 273 - Added patch and test case for object prototypal inheritance.
All documentation for Swig is generated from JSDoc comments inline and Swig template files within the
./docs folder. To make changes to any documentation, follow these steps and tips:
# Clone the repo $ git clone email@example.com:paularmstrong/swig.git $ cd swig
# Get dependencies $ make
# Ensure your $NODE_PATH is set # Place this in your ~/.bash_profile export NODE_PATH=$(npm -g root 2>/dev/null)
# Run the documentation test environment $ make docs
- Once you have the documentation test environment running, your browser will open showing you the documentation site.
- If you are making changes to HTML files in
./docs, reload the page to see them reflected immediately.
- If you are changing any content from the inline JSDoc comments, run
make build-docsto rebuild the JSON data files.
Once your documentation pull request is accepted, the person merging your request will be responsible for pushing the changes to the live site. Any attempts to push to or run a pull request to the
gh-pages branch will not be accepted.
Installs all dependencies and sets up sanity-check git hooks.
Builds the browser-ified version of Swig to
Runs all test files matching
./test/*.test.js within node.js.
Builds for browser and runs a large subset of tests from the
make test task within a browser environment using Phantom.js.
Builds a test coverage report.
Builds documentation and runs a web-server for viewing a preview of the documentation site.
Builds documentation for
gh-pages tasks from jsdoc comments in
Builds documentation as static HTML files and pushes them to the
gh-pages git branch.
Updates the package version number throughout the source files from the
version key found in