Before this change snabbdom could only be consumed by bundlers like webpack.
Now we add the `.js` extension to the build outputs so browsers can import the modules directly as well.
ISSUES FIXED: #963
The benchmark code was not yet updated to version 3 of snabbdom and
thus cannot be run at the moment. Further, it depends on faker, which is
not available any more. So for now, the benchmark code and all its
dependencies have been removed. In the future we should again add
benchmarks and can reference this commit for some code.
This is useful for bundlers. When dealing with reexports, this setting
allows e.g. webpack to optimize reexports. See the webpack documentation
for more information about this setting
When removing unnecessary dependencies, polyfills like core-js were
removed, as well as webpack which bundled the tests to es5. With this
commit, tests that need specific browser features are skipped if the
browser does not support them and the code is compiled to es5 by
karma-typescript
release-it automates all the steps defined in CONTRIBUTING.md. In
addition to that it can also create GitHub releases with the relevant
part of the CHANGELOG
Now that we use prettier, we can automatically format the README
anyways. The only difference then would be the automatic table of
contents, but the structure of the README does not change often and is
not very complex, so there is not really a need to automate this
This puts the fields a user of snabbdom would be interested in at the
very top (including stuff like license information, homepage etc). After
that come the fields interesting to a snabbdom developer like scripts
and devDependencies. Lastly is the configuration for dev tooling
commitlint can't provide the user with a convenient prompt to create a
fitting commit message, while commitizen is not able to lint an existing
commit message. The newly released commithelper does both
ISSUES CLOSED: #913, #748
BREAKING CHANGE:
The imports of snabbdom functions have changed. Every file in the
project had to be imported on its own, e.g.
```
import { h } from 'snabbdom/h'
import { VNode } from 'snabbdom/vnode'
```
Now, the main snabbdom package exports all of the public API like
```
import { h, VNode } from 'snabbdom'
```
This means consumers of the snabbdom package need to update their
imports. The change makes the use of the `exports` field in
`package.json` unnecessary, which caused issues for TypeScript users