Remove browser key and document bundle.js in the readme
This commit is contained in:
Родитель
2ce6883992
Коммит
12e9db24c8
12
README.md
12
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
|
||||
<script type="module" src="./node_modules/@github/text-expander-element/dist/bundle.js">
|
||||
```
|
||||
|
||||
### Markup
|
||||
|
||||
```html
|
||||
<text-expander keys=": @ #">
|
||||
<textarea></textarea>
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
if (key === ':') event.detail.value = item.textContent
|
||||
})
|
||||
</script>
|
||||
<script type="module" src="https://unpkg.com/@github/text-expander-element@latest/dist/browser.js"></script>
|
||||
<!-- <script src="../dist/browser.js" type="module"></script> -->
|
||||
<script type="module" src="https://unpkg.com/@github/text-expander-element@latest/dist/bundle.js"></script>
|
||||
<!-- <script src="../dist/bundle.js" type="module"></script> -->
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -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": {
|
||||
|
|
|
@ -14,7 +14,7 @@ export default [
|
|||
{
|
||||
input: 'dist/index.js',
|
||||
output: {
|
||||
file: pkg['browser'],
|
||||
file: 'dist/bundle.js',
|
||||
format: 'es',
|
||||
},
|
||||
plugins: [resolve()]
|
||||
|
|
|
@ -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'],
|
||||
|
|
Загрузка…
Ссылка в новой задаче