diff --git a/README.md b/README.md index f747cf6..a2869fb 100644 --- a/README.md +++ b/README.md @@ -10,10 +10,22 @@ $ npm install --save @github/text-expander-element ## Usage +### Script + +Import as ES modules: + ```js import '@github/text-expander-element' ``` +With a script tag: + +```html + - - + + diff --git a/package.json b/package.json index 7f18aa4..1cf0f93 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,6 @@ "repository": "github/text-expander-element", "main": "dist/index.js", "module": "dist/index.js", - "browser": "dist/browser.js", "type": "module", "types": "index.d.ts", "scripts": { diff --git a/rollup.config.js b/rollup.config.js index be86818..ee502d5 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -14,7 +14,7 @@ export default [ { input: 'dist/index.js', output: { - file: pkg['browser'], + file: 'dist/bundle.js', format: 'es', }, plugins: [resolve()] diff --git a/test/karma.config.cjs b/test/karma.config.cjs index b3347b2..94f8915 100644 --- a/test/karma.config.cjs +++ b/test/karma.config.cjs @@ -2,7 +2,7 @@ module.exports = function(config) { config.set({ frameworks: ['mocha', 'chai'], files: [ - {pattern: '../dist/browser.js', type: 'module'}, + {pattern: '../dist/bundle.js', type: 'module'}, {pattern: '../build/test.js', type: 'module'} ], reporters: ['mocha'],