Skip to content

Commit

Permalink
Merge branch 'master' into gh-pages
Browse files Browse the repository at this point in the history
* master:
  fix(events): fallback to touch and mouse events (#399)
  docs(readme): update module name in loading
  feat(events): add custom events for panning and zooming (#398)
  docs(usage): unless disablePan is true
  docs(usage): add note about what is done up front
  docs: add more example function calls
  chore: remove reference to old version
  chore: remove old demo HTML
  docs(contributing): add notes on changing docs and building
  docs(contributing): minor edits
  docs(readme): add gzipped size
  docs: move default values to option declarations
  chore(deps): upgrade dependencies (#396)
  docs: remove 'Optional' from options
  docs(readme): remove stale example
  docs(readme): minor edits
  docs: linkify PanOptions and ZoomOptions
  docs(readme): add Greenkeeper badge (#393)
  • Loading branch information
timmywil committed Aug 13, 2019
2 parents 03e66cd + 2c4c303 commit 4780e03
Show file tree
Hide file tree
Showing 15 changed files with 534 additions and 3,395 deletions.
55 changes: 34 additions & 21 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,44 @@ the expected behavior & use case, where they’ll remain closed until sufficient
[e.g. :+1: reactions](https://help.github.com/articles/about-discussions-in-issues-and-pull-requests/),
has been [shown by the community](https://github.com/timmywil/panzoom/issues?q=label%3A%22votes+needed%22+sort%3Areactions-%2B1-desc).
Before submitting a request, please search for similar ones in the
[closed issues](https://github.com/timmywil/panzoom/issues?q=is%3Aissue+is%3Aclosed+label%3Aenhancement).
[closed issues](https://github.com/timmywil/panzoom/issues?q=is%3Aissue+is%3Aclosed+label%3Afeature).

I got this convention from [lodash](https://github.com/lodash/lodash). It helps keep the issues list as empty as possible.
I got this convention from [lodash](https://github.com/lodash/lodash). It helps keep the open issues list uncluttered.

## Pull Requests

For additions or bug fixes you should only need to modify `panzoom.ts`. Include
updated unit tests in the `test` directory as part of your pull request. Don’t
worry about regenerating the built files or docs.
For additions or bug fixes you should only need to modify files in `src/`. Include
updated unit tests in the `test` directory or an updated/added demo in the `demo` directory as part of your pull request. Don’t worry about regenerating the built files.

Before running the unit tests you’ll need to install, `yarn` or `npm i`,
[development dependencies](https://docs.npmjs.com/files/package.json#devdependencies).
Run unit tests from the command-line via `yarn test` or `npm test`.
## Editing documentation

### Do not edit below the "Documentation" header in the README

Edit the comments and type declarations in the `src/` folder, or the markdown files in the `tasks/` folder.

The documentation is auto-generated using a combination of [typedoc](https://typedoc.org/) and a hand-rolled script (`tasks/docs.js`). First, typedoc generates markdown from the TypeScript files into the `docs/` folder, which is ignored by git, and then `tasks/docs.js` concatenates those files and cleans them up for presentation in the README.

## Testing

Tests are written with [mocha](https://mochajs.org/) and [Node's official assert module](https://nodejs.org/api/assert.html#assert_assert).

Here are the npm scripts that run tests:

```bash
$ yarn test # Lints and runs the unit tests
$ yarn test:unit # Runs the unit tests
$ yarn test:watch # Watches files and runs the unit tests on file save
```

## Building

The `dist/` folder is ignored on master and included in releases. To build, first make sure dependencies are installed (`yarn` or `npm i`) and run the following:

```bash
$ yarn build # or npm run build
```

This is usually unnecessary as `yarn start` will rebuild automatically as you change files.

## Coding Guidelines

Expand Down Expand Up @@ -88,18 +113,6 @@ Run the following after staging files:
$ yarn commit
```

## Testing

Tests are written with [mocha](https://mochajs.org/) and [Node's official assert module](https://nodejs.org/api/assert.html#assert_assert).

Here are the npm scripts that run tests:

```bash
$ yarn test # Lints and runs the unit tests
$ yarn test:unit # Runs the unit tests
$ yarn test:watch # Watches files and runs the unit tests on file save
```

## Debugging in VS Code

First run `yarn start`, then run VS Code Debug with the following config to enable breakpoints:
Expand All @@ -110,7 +123,7 @@ First run `yarn start`, then run VS Code Debug with the following config to enab
"request": "launch",
"name": "Launch Chrome",
"url": "http://localhost:8080",
"webRoot": "${workspaceRoot}",
"webRoot": "${workspaceFolder}",
"sourceMaps": true
}
```
Loading

0 comments on commit 4780e03

Please sign in to comment.