Skip to content

Commit

Permalink
Current demo was impossible to debug index.js, now it is (#522)
Browse files Browse the repository at this point in the history
Instead of pre-compiing the CJS bundle and then using that in the
demo (which makes `index.js` completely un-debuggable), we just
include `index.js` as source in the demo bundle. Now it's totally
debuggable.

Also remove the unnecessary `--` to pass parameters in `yarn start`
as this is not needed with yarn (and will later be passed to the
underlying script, whcih would break things).
  • Loading branch information
stefcameron committed Sep 22, 2021
1 parent a2119c2 commit dba355b
Show file tree
Hide file tree
Showing 30 changed files with 176 additions and 203 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -177,10 +177,10 @@ Returns the `trap`.

Read code in `docs/` and [see how it works](http://focus-trap.github.io/focus-trap/).

Here's what happens in `default.js` (the "default behavior" demo):
Here's generally what happens in `default.js` (the "default behavior" demo):

```js
const { createFocusTrap } = require('../../dist/focus-trap');
const { createFocusTrap } = require('../../index');

const container = document.getElementById('default');

Expand Down

0 comments on commit dba355b

Please sign in to comment.