You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

floating-button-plugin

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

floating-button-plugin - npm Package Compare versions

Comparing version

to
1.1.2

4

package.json
{
"name": "floating-button-plugin",
"version": "1.1.1",
"version": "1.1.2",
"description": "一个可拖拽的浮动按钮插件,支持自定义样式、点击跳转和位置记忆功能",

@@ -24,2 +24,2 @@ "main": "dist/index.js",

}
}
}

@@ -185,25 +185,3 @@ # Floating Button Plugin

### 全局加载使用
```html
<!-- 在 HTML 文件中直接引入 -->
<script src="https://unpkg.com/floating-button-plugin/dist/floating-button.min.js"></script>
<script>
// 全局变量方式使用
const button = new FloatingButton({
text: '联系我们',
link: 'https://example.com'
});
// 或者在 Vue 的 mounted 钩子中使用
mounted() {
const button = new FloatingButton({
text: '联系我们',
link: 'https://example.com'
});
}
</script>
```
### Vue 组件方式使用

@@ -322,69 +300,4 @@

## NPM 发布说明
### 准备工作
1. 确保已有 npm 账号,如果没有请先注册:
```bash
npm adduser
```
2. 登录 npm:
```bash
npm login
```
### 发布步骤
1. 更新 `package.json` 中的版本号:
```bash
npm version patch # 小版本更新
npm version minor # 次版本更新
npm version major # 主版本更新
```
2. 发布到 npm:
```bash
npm publish
```
### 发布配置
在 `package.json` 中添加以下配置:
```json
{
"name": "floating-button-plugin",
"version": "1.0.0",
"description": "一个简单易用的浮动按钮插件",
"main": "dist/floating-button.js",
"module": "dist/floating-button.esm.js",
"types": "dist/types/index.d.ts",
"files": [
"dist",
"src"
],
"keywords": [
"floating-button",
"vue",
"javascript",
"ui",
"component"
],
"publishConfig": {
"access": "public"
}
}
```
### 发布注意事项
1. 发布前确保代码已经编译打包
2. 确保 `package.json` 中的版本号已更新
3. 确保 `.npmignore` 文件正确配置,避免发布不必要的文件
4. 使用 `npm publish --dry-run` 可以模拟发布过程
5. 发布后可以通过 `npm info floating-button-plugin` 查看包信息
## 许可证
MIT