Skip to content

Commit 2d98da2

Browse files
author
Kent C. Dodds
committed
feat: export UMD bundle
1 parent 70d90c1 commit 2d98da2

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
"version": "0.0.0-semantically-released",
44
"description": "Simple and complete DOM testing utilities that encourage good testing practices.",
55
"main": "dist/index.js",
6+
"umd:main": "dist/dom-testing-library.umd.js",
7+
"source": "src/index.js",
68
"typings": "typings",
79
"keywords": [
810
"testing",
@@ -22,7 +24,7 @@
2224
},
2325
"scripts": {
2426
"add-contributor": "kcd-scripts contributors add",
25-
"build": "kcd-scripts build",
27+
"build": "kcd-scripts build && kcd-scripts build --bundle umd --no-clean",
2628
"lint": "kcd-scripts lint",
2729
"test": "kcd-scripts test",
2830
"test:update": "npm test -- --updateSnapshot --coverage",
@@ -45,7 +47,8 @@
4547
"devDependencies": {
4648
"dtslint": "^0.3.0",
4749
"jest-in-case": "^1.0.2",
48-
"kcd-scripts": "^0.37.0"
50+
"kcd-scripts": "^0.37.0",
51+
"microbundle": "^0.4.4"
4952
},
5053
"eslintConfig": {
5154
"extends": "./node_modules/kcd-scripts/eslint.js",

rollup.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const rollupConfig = require('kcd-scripts/dist/config/rollup.config')
2+
3+
// the exports in this library should always be named for all formats.
4+
rollupConfig.output[0].exports = 'named'
5+
module.exports = rollupConfig

0 commit comments

Comments
 (0)