Skip to content

Commit

Permalink
ux(docs): fix wrong module import paths
Browse files Browse the repository at this point in the history
Fixes #691.
  • Loading branch information
mightyiam committed Jun 18, 2020
1 parent 045b496 commit 3b6baee
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ performance, small size and all the features listed below.

```javascript
import { init } from 'snabbdom';
import clazz from 'snabbdom/class';
import props from 'snabbdom/props';
import style from 'snabbdom/style';
import listeners from 'snabbdom/eventlisteners';
import clazz from 'snabbdom/modules/class';
import props from 'snabbdom/modules/props';
import style from 'snabbdom/modules/style';
import listeners from 'snabbdom/modules/eventlisteners';

var patch = init([ // Init patch function with chosen modules
clazz, // makes it easy to toggle classes
Expand Down Expand Up @@ -153,8 +153,8 @@ takes a list of modules and returns a `patch` function that uses the
specified set of modules.

```javascript
import clazz from 'snabbdom/class';
import style from 'snabbdom/style';
import clazz from 'snabbdom/modules/class';
import style from 'snabbdom/modules/style';

var patch = init([ clazz, style ]);
```
Expand Down Expand Up @@ -211,10 +211,10 @@ server-side generated content.

```javascript
import { init } from 'snabbdom';
import clazz from 'snabbdom/class';
import props from 'snabbdom/props';
import style from 'snabbdom/style';
import listeners from 'snabbdom/eventlisteners';
import clazz from 'snabbdom/modules/class';
import props from 'snabbdom/modules/props';
import style from 'snabbdom/modules/style';
import listeners from 'snabbdom/modules/eventlisteners';
var patch = init([ // Init patch function with chosen modules
clazz, // makes it easy to toggle classes
props, // for setting properties on DOM elements
Expand Down
1 change: 1 addition & 0 deletions commitlint.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"scope-enum": [2, "always", [
"commitlint",
"deps",
"docs",
"eslint",
"exports",
"format",
Expand Down

0 comments on commit 3b6baee

Please sign in to comment.