Check out the contribution guide on DoneJS.com for information on:
- Code of Conduct
- Getting Help
- Project Organization
- Reporting Bugs
- Suggesting Features
- Finding Ways to Contribute
- Developing Locally
- Changing the Code
- Updating DoneJS.com
- Evangelism
The rest of this guide has information that’s specific to this repository.
git clone [email protected]:bitovi/syn.git
cd syn
npm install
You can run the tests with:
npm test
You can create a new build in the dist
folder with:
npm run build
All source files are in the src folder. Here's what each files does:
- browsers.js - Contains the output of utils/recorder.html data.
- drag.js - Drag / drop utility.
- key.js - Typing and key event simulation.
- key.support.js - Feature detection of key event behavior.
- mouse.js - Click and mouse event simulation.
- mouse.support.js - Feature detection of mouse event behavior.
- syn.js - Main entrypoint that loads all other modules.
- synthtic.js - Creates the
syn
object and adds helpers used by other modules. - typeable.js - Used to test if an element can be typed into.
Tests are in the test folder.
utils/recorder.html is used to record behaviors of the browser that can not be feature detected. Those behaviors are added to src/browser.js.
Please add a test within the tests folder and make your changes to syn.js source files in the src folder. For a quick check that everything is working, open test/test.html.
After updating the tests, make sure you run the tests.
This project follows the Semantic Versioning guidelines in the form of MAJOR.MINOR.PATCH
for:
MAJOR
version when you make incompatible API changes,MINOR
version when you add functionality in a backwards-compatible manner, andPATCH
version when you make backwards-compatible bug fixes.
Before making any release please make sure that:
- You have write access to this GitHub repository.
- Have an npm account and are logged in on the CLI tool (
npm whoami
). - Your user is a collaborator on npm. You can ask an existing collaborator to add you. Existing collaborators can be listed via
npm owner ls <packagename>
or on the collaborators page on npm.
To make a release:
- Switch to the
master
branch:git checkout master
- Fetch all latest changes from the repository:
git fetch --all && git rebase
- Reinstall the Node modules:
npm cache clean && npm install
- Run
npm run release:<versiontype>
. For example, to make aPATCH
release:
npm run release:patch
This will run the tests, build, bump the version number accordingly, and publish the module to npm.