We'd love to accept your patches and contributions to this project. There are just a few small guidelines you need to follow.
Contributions to this project must be accompanied by a Contributor License Agreement. You (or your employer) retain the copyright to your contribution, this simply gives us permission to use and redistribute your contributions as part of the project. Head over to https://cla.developers.google.com/ to see your current agreements on file or to sign a new one.
You generally only need to submit a CLA once, so if you've already submitted one (even if it was for a different project), you probably don't need to do it again.
All submissions, including submissions by project members, require review. We use GitHub pull requests for this purpose. Consult GitHub Help for more information on using pull requests.
This project follows Google's Open Source Community Guidelines.
The test/fixtures/
folder contains several test cases.
Make sure to create a new test when building a new feature.
Here's an example of how to debug the library by using one of these tests: test/fixtures/test-basic-usage.html.
-
Comment the following block of code at
test/fixtures/test-basic-usage.html
:<script src="../../dist/quicklink.umd.js"></script> <script> quicklink.listen(); </script>
-
Add the following snippet in its place, to import the module from its source file:
<script type="module"> import {listen} from '../../src/index.mjs'; listen(); </script>
-
Open src/index.mjs for edit and replace the following line:
import throttle from 'throttles';
By:
import throttle from '../node_modules/throttles/dist/index.mjs'
-
Build the project:
npm run build
. -
Start a local server:
npm start
. By default, this will start the local server athttps://localhost:8080
. -
Open the file where the modifications where made:
http://localhost:8080/test/fixtures/test-basic-usage.html
. -
Open Chrome DevTools and go the Sources tab.
-
Under
localhost:8080/src
you can find the unminified versions of theQuicklink
files. Now you can use breakpoints and inspect variables to debug the library.