@github/clipboard-copy-element
Advanced tools
Comparing version 1.1.2 to 1.2.1
{ | ||
"name": "@github/clipboard-copy-element", | ||
"version": "1.1.2", | ||
"version": "1.2.1", | ||
"description": "Copy element text content or input values to the clipboard.", | ||
"repository": "github/clipboard-copy-element", | ||
"main": "dist/index.umd.js", | ||
"module": "dist/index.esm.js", | ||
"types": "index.d.ts", | ||
"main": "dist/index.js", | ||
"type": "module", | ||
"module": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"exports": { | ||
".": "./dist/index.js", | ||
"./define": "./dist/index.js", | ||
"./clipboard-copy": "./dist/clipboard-copy-element.js", | ||
"./clipboard-copy/define": "./dist/clipboard-copy-element-define.js" | ||
}, | ||
"scripts": { | ||
"clean": "rm -rf dist", | ||
"lint": "github-lint", | ||
"prebuild": "npm run clean && npm run lint", | ||
"build": "rollup -c && cp src/clipboard-copy-element.js.flow dist/index.esm.js.flow && cp src/clipboard-copy-element.js.flow dist/index.umd.js.flow", | ||
"lint": "eslint . --ext .js,.ts && tsc --noEmit", | ||
"lint:fix": "npm run lint -- --fix", | ||
"prebuild": "npm run clean && npm run lint && mkdir dist", | ||
"bundle": "esbuild --bundle dist/index.js --keep-names --outfile=dist/bundle.js --format=esm", | ||
"build": "tsc && npm run bundle && npm run manifest", | ||
"prepublishOnly": "npm run build", | ||
"pretest": "npm run build", | ||
"test": "karma start test/karma.config.js", | ||
"prepublishOnly": "npm run build", | ||
"postpublish": "npm publish --ignore-scripts --@github:registry='https://npm.pkg.github.com'" | ||
"test": "web-test-runner", | ||
"postpublish": "npm publish --ignore-scripts --@github:registry='https://npm.pkg.github.com'", | ||
"manifest": "custom-elements-manifest analyze" | ||
}, | ||
@@ -24,24 +34,31 @@ "keywords": [ | ||
"files": [ | ||
"dist", | ||
"index.d.ts" | ||
"dist" | ||
], | ||
"prettier": "@github/prettier-config", | ||
"devDependencies": { | ||
"@babel/core": "^7.6.2", | ||
"babel-preset-github": "^3.2.1", | ||
"@custom-elements-manifest/analyzer": "^0.8.3", | ||
"@github/prettier-config": "^0.0.6", | ||
"@open-wc/testing": "^3.1.8", | ||
"@web/dev-server-esbuild": "^0.4.1", | ||
"@web/test-runner": "^0.16.1", | ||
"@web/test-runner-playwright": "^0.10.0", | ||
"chai": "^4.2.0", | ||
"eslint": "^6.5.1", | ||
"eslint-plugin-github": "^3.1.3", | ||
"flow-bin": "^0.111.1", | ||
"karma": "^4.3.0", | ||
"chromium": "^3.0.3", | ||
"esbuild": "^0.17.19", | ||
"eslint": "^8.42.0", | ||
"eslint-plugin-custom-elements": "^0.0.8", | ||
"eslint-plugin-github": "^4.8.0", | ||
"karma": "^6.3.16", | ||
"karma-chai": "^0.1.0", | ||
"karma-chrome-launcher": "^3.1.0", | ||
"karma-mocha": "^1.3.0", | ||
"karma-mocha": "^2.0.1", | ||
"karma-mocha-reporter": "^2.2.5", | ||
"mocha": "^6.2.1", | ||
"rollup": "^1.23.1", | ||
"rollup-plugin-babel": "^4.3.3" | ||
"mocha": "^10.1.0", | ||
"rollup": "^1.32.1", | ||
"typescript": "^5.1.3" | ||
}, | ||
"eslintIgnore": [ | ||
"dist/" | ||
] | ||
], | ||
"customElements": "custom-elements.json" | ||
} |
@@ -13,2 +13,6 @@ # <clipboard-copy> element | ||
### Script | ||
Import as ES modules: | ||
```js | ||
@@ -18,3 +22,11 @@ import '@github/clipboard-copy-element' | ||
With a script tag: | ||
```html | ||
<script type="module" src="./node_modules/@github/clipboard-copy-element/dist/index.js"> | ||
``` | ||
### Markup | ||
```html | ||
<clipboard-copy for="blob-path" class="btn btn-sm BtnGroup-item"> | ||
@@ -77,3 +89,3 @@ Copy path | ||
[support]: https://caniuse.com/#feat=custom-elementsv1 | ||
[polyfill]: https://github.com/webcomponents/custom-elements | ||
[polyfill]: https://github.com/webcomponents/polyfills/tree/master/packages/custom-elements | ||
@@ -80,0 +92,0 @@ ## Development |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
14493
12
317
99
Yes
20
1