easy-web-share
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "easy-web-share", | ||
"version": "1.0.0", | ||
"main": "dist/webShare.cjs.js", | ||
"module": "dist/webShare.esm.js", | ||
"types": "src/types/index.d.ts", | ||
"scripts": { | ||
"build": "node scripts/build" | ||
}, | ||
"keywords": [ | ||
"h5 share", | ||
"web share", | ||
"native share", | ||
"QQ空间分享", | ||
"微信分享" | ||
], | ||
"author": "onelong", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/lbb/easy-web-share" | ||
}, | ||
"license": "MIT", | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"@babel/core": "^7.10.3", | ||
"@babel/preset-env": "^7.1.5", | ||
"@rollup/plugin-babel": "^5.0.0", | ||
"@rollup/plugin-commonjs": "^13.0.0", | ||
"@rollup/plugin-node-resolve": "^8.1.0", | ||
"@rollup/plugin-replace": "^2.3.3", | ||
"@typescript-eslint/eslint-plugin": "^3.4.0", | ||
"@typescript-eslint/parser": "^3.3.0", | ||
"del": "^5.1.0", | ||
"eslint": "^7.3.1", | ||
"eslint-config-standard-with-typescript": "^18.0.2", | ||
"eslint-plugin-import": "^2.22.0", | ||
"eslint-plugin-node": "^11.1.0", | ||
"eslint-plugin-promise": "^4.2.1", | ||
"eslint-plugin-standard": "^4.0.1", | ||
"rollup": "^2.18.1", | ||
"rollup-plugin-terser": "^6.1.0", | ||
"rollup-plugin-typescript2": "^0.27.1", | ||
"typescript": "^3.0.1" | ||
} | ||
"name": "easy-web-share", | ||
"version": "1.0.1", | ||
"type": "commonjs", | ||
"exports": { | ||
".": { | ||
"require": { | ||
"types": "./dist/index.d.ts", | ||
"default": "./dist/index.js" | ||
}, | ||
"import": { | ||
"types": "./dist/index.d.mts", | ||
"default": "./dist/index.mjs" | ||
} | ||
} | ||
}, | ||
"main": "./dist/index.umd.js", | ||
"module": "./dist/index.mjs", | ||
"types": "./dist/index.d.ts", | ||
"files": [ | ||
"dist" | ||
], | ||
"scripts": { | ||
"build": "vite build", | ||
"format": "biome format --write ./" | ||
}, | ||
"keywords": [ | ||
"h5 share", | ||
"web share", | ||
"native share", | ||
"QQ空间分享", | ||
"微信分享" | ||
], | ||
"author": "onelong", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/lbb00/easy-web-share.git" | ||
}, | ||
"license": "MIT", | ||
"devDependencies": { | ||
"@biomejs/biome": "^1.7.3", | ||
"terser": "^5.31.0", | ||
"typescript": "^5.4.5", | ||
"vite": "^5.2.11", | ||
"vite-plugin-dts": "^3.9.1" | ||
} | ||
} |
@@ -10,3 +10,3 @@ # WebShare - 网页分享 SDK | ||
- web social | ||
- Web Social | ||
@@ -21,5 +21,3 @@ - QQ 空间 | ||
// 创建并配置全局分享信息 | ||
const webShare = createWebShare({ | ||
webShare.setGlobalShareInfo({ | ||
url: '分享地址', | ||
@@ -31,3 +29,4 @@ title: '分享标题', | ||
// 更新分享信息,在需要的页面调用 | ||
// 更新分享信息 | ||
// SPA 应用需要在每个页面调用,否则会使用 GlobalShareInfo 的配置 | ||
webShare.setShareInfo({ | ||
@@ -39,9 +38,20 @@ url: '分享地址', | ||
}) | ||
``` | ||
### 手动创建 | ||
```javascript | ||
import { createWebShare } from 'easy-web-share' | ||
const webShare = createWebShare({ | ||
url: '分享地址', | ||
title: '分享标题', | ||
desc: '分享描述', | ||
imageUrl: '分享图片地址 | ||
}) | ||
``` | ||
### 特殊配置 | ||
> 在需要 SDK 才能设置分享内容的环境中,如微信、QQ ,如果没有加载对应的 jssdk,本项目会自动加载对应的 jssdk。 | ||
### 特殊配置 | ||
#### 微信 | ||
@@ -48,0 +58,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
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
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 3 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
5
77
0
11305
7
169
1