@myuw-web-components/myuw-profile
Advanced tools
Comparing version 1.3.2 to 1.4.0
{ | ||
"name": "@myuw-web-components/myuw-profile", | ||
"version": "1.3.2", | ||
"version": "1.4.0", | ||
"description": "Web component that provides an avatar button and profile menu", | ||
@@ -12,5 +12,4 @@ "module": "dist/myuw-profile.min.mjs", | ||
"start": "run-p watch serve", | ||
"prepare": "npm run build", | ||
"pages": "rm -rf demo && mkdir -p demo && cp -r dist demo/ && cp -r test demo/ && cp index.html demo/ && gh-pages -d demo --repo git@github.com:myuw-web-components/myuw-profile.git", | ||
"postpublish": "npm run pages" | ||
"sonar": "sonar-scanner", | ||
"prepare": "npm run build" | ||
}, | ||
@@ -28,11 +27,12 @@ "repository": { | ||
"devDependencies": { | ||
"@babel/core": "^7.1.2", | ||
"@babel/preset-env": "^7.1.0", | ||
"gh-pages": "^1.2.0", | ||
"live-server": "^1.2.0", | ||
"npm-run-all": "^4.1.3", | ||
"rollup": "^0.63.4", | ||
"rollup-plugin-babel": "^4.0.3", | ||
"@babel/core": "^7.7.2", | ||
"@babel/preset-env": "^7.7.1", | ||
"aws-sdk": "^2.569.0", | ||
"live-server": "^1.2.1", | ||
"mime-types": "^2.1.25", | ||
"rollup": "^1.27.0", | ||
"rollup-plugin-babel": "^4.3.3", | ||
"rollup-plugin-html": "^0.2.1", | ||
"rollup-plugin-minify-es": "^1.1.1", | ||
"sonarqube-scanner": "^2.5.0", | ||
"tota11y": "^0.1.6" | ||
@@ -39,0 +39,0 @@ }, |
@@ -5,22 +5,27 @@ # myuw-profile | ||
Add the following import to your page's `<head>`: | ||
Import and include the component as follows, but note that it will not display by default, until initialized through its event API! | ||
```html | ||
<script type="module" src="https://unpkg.com/@myuw-web-components/myuw-profile@^1?module"></script> | ||
<script nomodule src="https://unpkg.com/@myuw-web-components/myuw-profile@^1"></script> | ||
``` | ||
<!-- import the module --> | ||
<script type="module" src="https://cdn.my.wisc.edu/@myuw-web-components/myuw-profile@latest/myuw-profile.min.mjs"></script> | ||
*Note: You may want to specify a specific version of the component to ensure stability. See [the change log](CHANGELOG.md) or the [npm entry](https://www.npmjs.com/package/@myuw-web-components/myuw-profile) for version information.* | ||
<!-- fallback for browsers without ES2015 module support --> | ||
<script nomodule src="https://cdn.my.wisc.edu/@myuw-web-components/myuw-profile@latest/myuw-profile.min.js"></script> | ||
Use the component's HTML tag wherever you want: | ||
<!-- initialize --> | ||
<script> | ||
customElements | ||
.whenDefined('myuw-profile') | ||
.then(() => document.dispatchEvent(new CustomEvent('myuw-login', { detail: {} }))) | ||
; | ||
</script | ||
```HTML | ||
<myuw-profile | ||
login-url="" | ||
logout-url="" | ||
background-color="" | ||
> | ||
</myuw-profile> | ||
login-url="" | ||
logout-url="" | ||
background-color="" | ||
></myuw-profile> | ||
``` | ||
_Note:_ The evergreen "latest" version can be used for convenience, but in production settings it is recommended to use the latest [release version](https://github.com/myuw-web-components/myuw-profile/releases) specifically, and upgrade only after testing! | ||
@@ -49,3 +54,3 @@ ### Displaying the component | ||
// Dispatch the event | ||
document.dispatchEvent(customEvent); | ||
document.dispatchEvent(customEvent); | ||
``` | ||
@@ -63,3 +68,3 @@ | ||
// Dispatch the event | ||
document.dispatchEvent(customEvent); | ||
document.dispatchEvent(customEvent); | ||
}); | ||
@@ -66,0 +71,0 @@ ``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
68168
92
11
1