@descope/web-component
Advanced tools
Comparing version 0.1.0-alpha.1 to 0.1.0-alpha.2
149
package.json
{ | ||
"name": "@descope/web-component", | ||
"version": "0.1.0-alpha.1", | ||
"main": "dist/descope-wc", | ||
"types": "dist/descope-wc.d.ts", | ||
"description": "Descope WC", | ||
"scripts": { | ||
"start": "rollup -c rollup.config.app.js -w", | ||
"build": "rollup -c", | ||
"test": "jest", | ||
"lint": "eslint ./src --fix", | ||
"format": "prettier ./src --write", | ||
"prepublishOnly": "npm run build" | ||
}, | ||
"license": "ISC", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/descope/web-component.git" | ||
}, | ||
"files": [ | ||
"dist" | ||
], | ||
"devDependencies": { | ||
"@open-wc/rollup-plugin-html": "1.2.5", | ||
"@rollup/plugin-commonjs": "^22.0.0", | ||
"@rollup/plugin-node-resolve": "^13.3.0", | ||
"@rollup/plugin-replace": "^4.0.0", | ||
"@rollup/plugin-typescript": "^8.3.0", | ||
"@testing-library/dom": "^8.19.0", | ||
"@types/jest": "^29.0.0", | ||
"@types/lodash.get": "^4.4.7", | ||
"@types/lodash.set": "^4.3.7", | ||
"eslint": "8.26.0", | ||
"eslint-config-airbnb": "19.0.4", | ||
"eslint-config-airbnb-typescript": "17.0.0", | ||
"eslint-config-prettier": "8.5.0", | ||
"eslint-config-standard": "17.0.0", | ||
"eslint-import-resolver-typescript": "3.4.0", | ||
"eslint-plugin-import": "2.26.0", | ||
"eslint-plugin-jest": "27.1.3", | ||
"eslint-plugin-jest-dom": "4.0.2", | ||
"eslint-plugin-jest-formatting": "3.1.0", | ||
"eslint-plugin-n": "15.3.0", | ||
"eslint-plugin-no-only-tests": "3.0.0", | ||
"eslint-plugin-prefer-arrow": "1.2.3", | ||
"eslint-plugin-prettier": "4.2.1", | ||
"eslint-plugin-promise": "6.1.1", | ||
"husky": "^8.0.1", | ||
"jest": "^29.0.0", | ||
"jest-environment-jsdom": "^29.0.0", | ||
"prettier": "^2.6.2", | ||
"rollup": "^2.62.0", | ||
"rollup-plugin-browsersync": "^1.3.3", | ||
"rollup-plugin-delete": "^2.0.0", | ||
"rollup-plugin-dts": "^4.2.2", | ||
"rollup-plugin-livereload": "^2.0.5", | ||
"rollup-plugin-terser": "7.0.2", | ||
"shadow-dom-testing-library": "^1.2.0", | ||
"string-to-arraybuffer": "^1.0.2", | ||
"ts-jest": "^29.0.0", | ||
"ts-node": "10.9.1", | ||
"typescript": "^4.5.3" | ||
}, | ||
"dependencies": { | ||
"@descope/core-js-sdk": "0.0.41-alpha.17", | ||
"@descope/web-js-sdk": "0.1.0-alpha.3" | ||
}, | ||
"overrides": { | ||
"terser": "5.15.1" | ||
} | ||
"name": "@descope/web-component", | ||
"version": "0.1.0-alpha.2", | ||
"main": "dist/descope-wc", | ||
"types": "dist/descope-wc.d.ts", | ||
"description": "Descope WC", | ||
"scripts": { | ||
"start": "rollup -c rollup.config.app.js -w", | ||
"build": "rollup -c", | ||
"test": "jest", | ||
"prepare": "husky install", | ||
"lint": "eslint '+(src|test)/**/*.ts' --fix", | ||
"format": "prettier . -w --ignore-path .gitignore", | ||
"format-check": "prettier . --check --ignore-path .gitignore", | ||
"format-lint": "pretty-quick --staged --ignore-path .gitignore && lint-staged", | ||
"prepublishOnly": "npm run build" | ||
}, | ||
"lint-staged": { | ||
"+(src|test)/**/*.{js,ts,jsx,tsx}": [ | ||
"npm run lint" | ||
] | ||
}, | ||
"license": "ISC", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/descope/web-component.git" | ||
}, | ||
"files": [ | ||
"dist" | ||
], | ||
"devDependencies": { | ||
"@open-wc/rollup-plugin-html": "1.2.5", | ||
"@rollup/plugin-commonjs": "^22.0.0", | ||
"@rollup/plugin-node-resolve": "^13.3.0", | ||
"@rollup/plugin-replace": "^4.0.0", | ||
"@rollup/plugin-typescript": "^8.3.0", | ||
"@testing-library/dom": "^8.19.0", | ||
"@types/jest": "^29.0.0", | ||
"@types/lodash": "^4.14.186", | ||
"@types/lodash.get": "^4.4.7", | ||
"@types/lodash.set": "^4.3.7", | ||
"eslint": "8.26.0", | ||
"eslint-config-airbnb": "19.0.4", | ||
"eslint-config-airbnb-typescript": "17.0.0", | ||
"eslint-config-prettier": "8.5.0", | ||
"eslint-config-standard": "17.0.0", | ||
"eslint-import-resolver-typescript": "3.4.0", | ||
"eslint-plugin-import": "2.26.0", | ||
"eslint-plugin-jest": "27.1.3", | ||
"eslint-plugin-jest-dom": "4.0.2", | ||
"eslint-plugin-jest-formatting": "3.1.0", | ||
"eslint-plugin-n": "15.3.0", | ||
"eslint-plugin-no-only-tests": "3.1.0", | ||
"eslint-plugin-prefer-arrow": "1.2.3", | ||
"eslint-plugin-prettier": "4.2.1", | ||
"eslint-plugin-promise": "6.1.1", | ||
"husky": "^8.0.1", | ||
"jest": "^29.0.0", | ||
"jest-environment-jsdom": "^29.0.0", | ||
"lint-staged": "^13.0.3", | ||
"prettier": "^2.6.2", | ||
"pretty-quick": "^3.1.3", | ||
"rollup": "^2.62.0", | ||
"rollup-plugin-browsersync": "^1.3.3", | ||
"rollup-plugin-delete": "^2.0.0", | ||
"rollup-plugin-dts": "^4.2.2", | ||
"rollup-plugin-livereload": "^2.0.5", | ||
"rollup-plugin-terser": "7.0.2", | ||
"shadow-dom-testing-library": "^1.2.0", | ||
"string-to-arraybuffer": "^1.0.2", | ||
"ts-jest": "^29.0.0", | ||
"ts-node": "10.9.1", | ||
"typescript": "^4.5.3" | ||
}, | ||
"dependencies": { | ||
"@descope/core-js-sdk": "0.0.41-alpha.17", | ||
"@descope/web-js-sdk": "0.1.0-alpha.3" | ||
}, | ||
"overrides": { | ||
"terser": "5.15.1" | ||
} | ||
} |
@@ -6,8 +6,13 @@ # @descope/web-component | ||
See usage example below | ||
## Usage | ||
### Install the package | ||
```bash | ||
npm install @descope/web-component | ||
``` | ||
### As a library | ||
```js | ||
@@ -24,2 +29,3 @@ import '@descope/web-component' | ||
``` | ||
### In HTML file | ||
@@ -30,5 +36,6 @@ | ||
- Add the following script tag to your HTML file | ||
```html | ||
<head> | ||
<script src="./my-lib.umd.production.min.js"></script> | ||
<script src="./my-lib.umd.production.min.js"></script> | ||
</head> | ||
@@ -38,2 +45,3 @@ ``` | ||
- Now you can add the custom element to your HTML | ||
```html | ||
@@ -44,6 +52,7 @@ <descope-wc project-id="<project-id>" flow-id="<flow-id>"></descope-wc> | ||
### Run the demo app | ||
- Install dependencies - `npm i` | ||
- Edit the `src/app/index.html` - replace `<project-id>` and `<project-id>` with your project and a flow | ||
- Edit the `src/app/index.html` - replace `<project-id>` and `<project-id>` with your project and a flow | ||
- Run application - `npm run start` | ||
*TODO: we should host this file so it can be included without installing the package, once we will publish it to a public registry, we can also use unpkg.com/ to serve it* | ||
_TODO: we should host this file so it can be included without installing the package, once we will publish it to a public registry, we can also use unpkg.com/ to serve it_ |
43707
54
42