watermark-js-plus 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/.editorconfig +16 -0
  2. package/.eslintignore +7 -0
  3. package/.eslintrc.cjs +46 -0
  4. package/.github/workflows/deploy.yml +29 -0
  5. package/.github/workflows/npm-publish.yml +32 -0
  6. package/.husky/commit-msg +4 -0
  7. package/.husky/pre-commit +4 -0
  8. package/.prettierrc +10 -0
  9. package/CHANGELOG.md +9 -0
  10. package/LICENSE +21 -0
  11. package/README.md +1 -0
  12. package/babel.config.cjs +23 -0
  13. package/changelog-option.cjs +87 -0
  14. package/commitlint.config.cjs +26 -0
  15. package/docs/.vitepress/config.ts +91 -0
  16. package/docs/.vitepress/locales/zh-CN.ts +49 -0
  17. package/docs/.vitepress/theme/index.ts +12 -0
  18. package/docs/config/blind-decode.md +33 -0
  19. package/docs/config/blind.md +19 -0
  20. package/docs/config/index.md +178 -0
  21. package/docs/guide/blind-watermark.md +267 -0
  22. package/docs/guide/getting-started.md +73 -0
  23. package/docs/guide/watermark.md +213 -0
  24. package/docs/guide/what-is-this.md +19 -0
  25. package/docs/index.md +33 -0
  26. package/docs/public/logo.png +0 -0
  27. package/docs/zh/config/blind-decode.md +33 -0
  28. package/docs/zh/config/blind.md +19 -0
  29. package/docs/zh/config/index.md +178 -0
  30. package/docs/zh/guide/blink-watermark.md +288 -0
  31. package/docs/zh/guide/getting-started.md +48 -0
  32. package/docs/zh/guide/watermark.md +213 -0
  33. package/docs/zh/guide/what-is-this.md +19 -0
  34. package/docs/zh/index.md +33 -0
  35. package/package.json +78 -0
  36. package/rollup.config.mjs +40 -0
  37. package/src/blind.ts +43 -0
  38. package/src/index.ts +7 -0
  39. package/src/types/index.ts +69 -0
  40. package/src/utils/index.ts +63 -0
  41. package/src/watermark.ts +288 -0
  42. package/tools/terser.js +19 -0
  43. package/tsconfig.json +15 -0
@@ -0,0 +1,288 @@
1
+ ---
2
+ layout: doc
3
+ ---
4
+ # 暗水印
5
+
6
+ <script setup lang="ts">
7
+ import VPButton from 'vitepress/dist/client/theme-default/components/VPButton.vue';
8
+ import { ref, getCurrentInstance } from 'vue';
9
+ import { Plus } from '@element-plus/icons-vue';
10
+ import wm from '../../../src';
11
+ import { useData } from 'vitepress';
12
+
13
+ const { isDark } = useData();
14
+ const app = getCurrentInstance();
15
+ const decodeBlindImage = ref('');
16
+
17
+ // 文本暗水印
18
+ const textBlindWatermark = new wm.BlindWatermark({
19
+ content: 'hello my watermark',
20
+ width: 200,
21
+ height: 200,
22
+ onSuccess: () => {
23
+ app.appContext.config.globalProperties.$message({
24
+ message: '文本暗水印添加成功!',
25
+ type: 'success'
26
+ });
27
+ }
28
+ });
29
+ const handleAddTextBlindWatermark = () => {
30
+ if (isDark) {
31
+ textBlindWatermark.options.fontColor = '#fff'
32
+ }
33
+ textBlindWatermark.create();
34
+ };
35
+ const handleRemoveTextBlindWatermark = () => {
36
+ textBlindWatermark.destroy();
37
+ };
38
+
39
+ // 多行水印
40
+ const multiLineTextBlindWatermark = new wm.BlindWatermark({
41
+ contentType: 'multi-line-text',
42
+ content: 'hello my watermark watermark',
43
+ fontSize: 30,
44
+ width: 200,
45
+ height: 200,
46
+ onSuccess: () => {
47
+ app.appContext.config.globalProperties.$message({
48
+ message: '多行文本暗水印添加成功!',
49
+ type: 'success'
50
+ });
51
+ }
52
+ });
53
+ const handleAddMultiLineTextBlindWatermark = () => {
54
+ if (isDark) {
55
+ multiLineTextBlindWatermark.options.fontColor = '#fff'
56
+ }
57
+ multiLineTextBlindWatermark.create();
58
+ };
59
+ const handleRemoveMultiLineTextBlindWatermark = () => {
60
+ multiLineTextBlindWatermark.destroy();
61
+ };
62
+
63
+ // 图片暗水印
64
+ const imageBlindWatermark = new wm.BlindWatermark({
65
+ contentType: 'image',
66
+ image: 'http://upic-service.test.upcdn.net/uPic/github-JxMIKf.png',
67
+ imageWidth: 200,
68
+ // imageHeight: 20,
69
+ width: 300,
70
+ height: 300,
71
+ onSuccess: () => {
72
+ app.appContext.config.globalProperties.$message({
73
+ message: '图片暗水印添加成功!',
74
+ type: 'success'
75
+ });
76
+ }
77
+ });
78
+ const handleAddImageBlindWatermark = () => {
79
+ imageBlindWatermark.create();
80
+ };
81
+ const handleRemoveImageBlindWatermark = () => {
82
+ imageBlindWatermark.destroy();
83
+ };
84
+
85
+ // 富文本水印
86
+ const richTextBlindWatermark = new wm.BlindWatermark({
87
+ contentType: 'rich-text',
88
+ content: '<div style="background: #ccc;">富文本暗水印 <span style="color: #f00">good</span></div>',
89
+ width: 300,
90
+ height: 300,
91
+ onSuccess: () => {
92
+ app.appContext.config.globalProperties.$message({
93
+ message: '富文本暗水印添加成功!',
94
+ type: 'success'
95
+ });
96
+ }
97
+ });
98
+ const handleAddRichTextBlindWatermark = () => {
99
+ richTextBlindWatermark.create();
100
+ };
101
+ const handleRemoveRichTextBlindWatermark = () => {
102
+ richTextBlindWatermark.destroy();
103
+ };
104
+
105
+ // 支持暗黑模式单行文本暗水印
106
+ const textBlindWatermarkSupportDark = new wm.BlindWatermark({
107
+ content: 'hello my watermark',
108
+ width: 200,
109
+ height: 200,
110
+ onSuccess: () => {
111
+ app.appContext.config.globalProperties.$message({
112
+ message: '支持暗黑模式单行文本暗水印添加成功!',
113
+ type: 'success'
114
+ });
115
+ }
116
+ });
117
+ const handleSupportDarkAddTextBlindWatermark = () => {
118
+ textBlindWatermarkSupportDark.create();
119
+ };
120
+ const handleSupportDarkRemoveTextBlindWatermark = () => {
121
+ textBlindWatermarkSupportDark.destroy();
122
+ };
123
+
124
+ // 解析暗水印
125
+ const handleSuccess = (uploadFile) => {
126
+ wm.BlindWatermark.decode({
127
+ ...(isDark ? {
128
+ compositeOperation: 'overlay',
129
+ fillColor: '#fff',
130
+ } : {}),
131
+ url: uploadFile.url,
132
+ onSuccess: (imageBase64) => {
133
+ decodeBlindImage.value = imageBase64
134
+ }
135
+ });
136
+ }
137
+ </script>
138
+
139
+ ## 文本暗水印
140
+
141
+ ```js
142
+ import wm from 'watermark-js-plus' // 引入水印插件
143
+
144
+ const watermark = new wm.BlindWatermark({
145
+ content: 'hello my watermark',
146
+ width: 200,
147
+ height: 200,
148
+ onSuccess: () => {
149
+ app.appContext.config.globalProperties.$message({
150
+ message: '文本暗水印添加成功!',
151
+ type: 'success'
152
+ });
153
+ }
154
+ })
155
+
156
+ watermark.create() // 添加水印
157
+
158
+ watermark.destroy() // 删除水印
159
+ ```
160
+ <el-space>
161
+ <VPButton text="添加文本暗水印" @click="handleAddTextBlindWatermark"></VPButton>
162
+ <VPButton text="删除文本暗水印" @click="handleRemoveTextBlindWatermark"></VPButton>
163
+ </el-space>
164
+
165
+ ## 多行文本暗水印
166
+
167
+ ```js
168
+ import wm from 'watermark-js-plus' // 引入水印插件
169
+
170
+ const watermark = new wm.BlindWatermark({
171
+ contentType: 'multi-line-text',
172
+ content: 'hello my watermark watermark',
173
+ fontSize: 30,
174
+ width: 200,
175
+ height: 200,
176
+ onSuccess: () => {
177
+ app.appContext.config.globalProperties.$message({
178
+ message: '多行文本暗水印添加成功!',
179
+ type: 'success'
180
+ });
181
+ }
182
+ })
183
+
184
+ watermark.create() // 添加水印
185
+
186
+ watermark.destroy() // 删除水印
187
+ ```
188
+ <el-space>
189
+ <VPButton text="添加多行文本暗水印" @click="handleAddMultiLineTextBlindWatermark"></VPButton>
190
+ <VPButton text="删除多行文本暗水印" @click="handleRemoveMultiLineTextBlindWatermark"></VPButton>
191
+ </el-space>
192
+
193
+ ## 图片暗水印
194
+
195
+ ```js
196
+ import wm from 'watermark-js-plus' // 引入水印插件
197
+
198
+ const watermark = new wm.BlindWatermark({
199
+ contentType: 'image',
200
+ content: 'http://upic-service.test.upcdn.net/uPic/github-JxMIKf.png',
201
+ width: 300,
202
+ height: 300,
203
+ imageWidth: 100, // 图片宽度
204
+ // imageHeight: 20, // 图片高度
205
+ onSuccess: () => {
206
+ app.appContext.config.globalProperties.$message({
207
+ message: '图片暗水印添加成功!',
208
+ type: 'success'
209
+ });
210
+ }
211
+ })
212
+
213
+ watermark.create() // 添加水印
214
+
215
+ watermark.destroy() // 删除水印
216
+ ```
217
+ <el-space>
218
+ <VPButton text="添加图片暗水印" @click="handleAddImageBlindWatermark"></VPButton>
219
+ <VPButton text="删除图片暗水印" @click="handleRemoveImageBlindWatermark"></VPButton>
220
+ </el-space>
221
+
222
+ ## 富文本水印
223
+
224
+ ```js
225
+ import wm from 'watermark-js-plus' // 引入水印插件
226
+
227
+ const watermark = new wm.BlindWatermark({
228
+ contentType: 'rich-text',
229
+ content: '<div style="background: #ccc;">富文本暗水印 <span style="color: #f00">good</span></div>',
230
+ width: 300,
231
+ height: 300,
232
+ onSuccess: () => {
233
+ app.appContext.config.globalProperties.$message({
234
+ message: '富文本暗水印添加成功!',
235
+ type: 'success'
236
+ });
237
+ }
238
+ })
239
+
240
+ watermark.create() // 添加水印
241
+
242
+ watermark.destroy() // 删除水印
243
+ ```
244
+ <el-space>
245
+ <VPButton text="添加富文本暗水印" @click="handleAddRichTextBlindWatermark"></VPButton>
246
+ <VPButton text="删除富文本暗水印" @click="handleRemoveRichTextBlindWatermark"></VPButton>
247
+ </el-space>
248
+
249
+
250
+
251
+ ## 解析暗水印
252
+
253
+ ```js
254
+ import wm from 'watermark-js-plus' // 引入水印插件
255
+
256
+ wm.BlindWatermark.decode({
257
+ url: uploadFile.url, // 需要解析暗水印图片的URL
258
+ onSuccess: (imageBase64) => { // 解析成功后的回调事件,返回的是解析后图片的base64
259
+ }
260
+ });
261
+ ```
262
+
263
+ <div>
264
+ <el-upload
265
+ list-type="picture-card"
266
+ accept="image/*"
267
+ :auto-upload="false"
268
+ :show-file-list="false"
269
+ :on-change="handleSuccess"
270
+ >
271
+ <el-icon><Plus /></el-icon>
272
+ </el-upload>
273
+ <el-image
274
+ v-if="decodeBlindImage"
275
+ style="width: 400px; height: 400px;margin-top: 20px;"
276
+ :src="decodeBlindImage"
277
+ :preview-src-list="[decodeBlindImage]"
278
+ fit="cover"
279
+ />
280
+ </div>
281
+
282
+ [//]: # (<div style="position: relative;">)
283
+
284
+ [//]: # ( <div style="position: absolute;top:0;bottom: 0;left: 0;right: 0;mix-blend-mode: color-burn;background: #000;"></div>)
285
+
286
+ [//]: # ( <img width="200" src="http://upic-service.test.upcdn.net/uPic/iShot_2022-11-28_10.35.29-RP6dBG.png" alt="">)
287
+
288
+ [//]: # (</div>)
@@ -0,0 +1,48 @@
1
+ ---
2
+ layout: doc
3
+ ---
4
+
5
+ # 开始
6
+
7
+ ## 安装
8
+
9
+ Using npm:
10
+
11
+ ```bash
12
+ $ npm install watermark-js-plus
13
+ ```
14
+
15
+ [//]: # (Using bower:)
16
+
17
+ [//]: # ()
18
+ [//]: # (```bash)
19
+
20
+ [//]: # ($ bower install watermark-js-plus)
21
+
22
+ [//]: # (```)
23
+
24
+ Using yarn:
25
+
26
+ ```bash
27
+ $ yarn add watermark-js-plus
28
+ ```
29
+
30
+ [//]: # ()
31
+ [//]: # (Using jsDelivr CDN:)
32
+
33
+ [//]: # ()
34
+ [//]: # (```html)
35
+
36
+ [//]: # (<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>)
37
+
38
+ [//]: # (```)
39
+
40
+ [//]: # ()
41
+ [//]: # (Using unpkg CDN:)
42
+
43
+ [//]: # ()
44
+ [//]: # (```html)
45
+
46
+ [//]: # (<script src="https://unpkg.com/axios/dist/axios.min.js"></script>)
47
+
48
+ [//]: # (```)
@@ -0,0 +1,213 @@
1
+ ---
2
+ layout: doc
3
+ ---
4
+ # 明水印
5
+
6
+ <script setup lang="ts">
7
+ import VPButton from 'vitepress/dist/client/theme-default/components/VPButton.vue';
8
+ import { ref, getCurrentInstance } from 'vue';
9
+ import wm from '../../../src';
10
+ import { useData } from 'vitepress';
11
+
12
+ const { isDark } = useData();
13
+ const decodeBlindImage = ref('');
14
+ const app = getCurrentInstance();
15
+
16
+ // 文本水印
17
+ const textWatermark = new wm.Watermark({
18
+ content: 'hello my watermark',
19
+ width: 200,
20
+ height: 200,
21
+ onSuccess: () => {
22
+ app.appContext.config.globalProperties.$message({
23
+ message: '文本水印添加成功!',
24
+ type: 'success'
25
+ });
26
+ }
27
+ });
28
+ const handleAddTextWatermark = () => {
29
+ if (isDark) {
30
+ textWatermark.options.fontColor = '#fff'
31
+ }
32
+ textWatermark.create();
33
+ };
34
+ const handleRemoveTextWatermark = () => {
35
+ textWatermark.destroy();
36
+ };
37
+
38
+ // 多行文本水印
39
+ const multiLineTextWatermark = new wm.Watermark({
40
+ contentType: 'multi-line-text',
41
+ content: 'hello my watermark watermark',
42
+ fontSize: 30,
43
+ width: 200,
44
+ height: 200,
45
+ onSuccess: () => {
46
+ app.appContext.config.globalProperties.$message({
47
+ message: '多行文本水印添加成功!',
48
+ type: 'success'
49
+ });
50
+ }
51
+ });
52
+ const handleAddMultiLineTextWatermark = () => {
53
+ if (isDark) {
54
+ multiLineTextWatermark.options.fontColor = '#fff'
55
+ }
56
+ multiLineTextWatermark.create();
57
+ };
58
+ const handleRemoveMultiLineTextWatermark = () => {
59
+ multiLineTextWatermark.destroy();
60
+ };
61
+
62
+ // 图片水印
63
+ const imageWatermark = new wm.Watermark({
64
+ contentType: 'image',
65
+ image: 'http://upic-service.test.upcdn.net/uPic/github-JxMIKf.png',
66
+ imageWidth: 200,
67
+ // imageHeight: 20,
68
+ width: 300,
69
+ height: 300,
70
+ onSuccess: () => {
71
+ app.appContext.config.globalProperties.$message({
72
+ message: '图片水印添加成功!',
73
+ type: 'success'
74
+ });
75
+ }
76
+ });
77
+ const handleAddImageWatermark = () => {
78
+ imageWatermark.create();
79
+ };
80
+ const handleRemoveImageWatermark = () => {
81
+ imageWatermark.destroy();
82
+ };
83
+
84
+ // 富文本水印
85
+ const richTextWatermark = new wm.Watermark({
86
+ contentType: 'rich-text',
87
+ content: '<div style="background: #ccc;">富文本水印 <span style="color: #f00">good</span></div>',
88
+ width: 300,
89
+ height: 300,
90
+ onSuccess: () => {
91
+ app.appContext.config.globalProperties.$message({
92
+ message: '富文本水印添加成功!',
93
+ type: 'success'
94
+ });
95
+ }
96
+ });
97
+ const handleAddRichTextWatermark = () => {
98
+ richTextWatermark.create();
99
+ };
100
+ const handleRemoveRichTextWatermark = () => {
101
+ richTextWatermark.destroy();
102
+ };
103
+ </script>
104
+
105
+ ## 文本水印
106
+
107
+ ```js
108
+ import wm from 'watermark-js-plus' // 引入水印插件
109
+
110
+ const watermark = new wm.Watermark({
111
+ content: 'hello my watermark',
112
+ width: 200,
113
+ height: 200,
114
+ onSuccess: () => {
115
+ app.appContext.config.globalProperties.$message({
116
+ message: '文本水印添加成功!',
117
+ type: 'success'
118
+ });
119
+ }
120
+ })
121
+
122
+ watermark.create() // 添加水印
123
+
124
+ watermark.destroy() // 删除水印
125
+ ```
126
+ <el-space>
127
+ <VPButton text="添加文本水印" @click="handleAddTextWatermark"></VPButton>
128
+ <VPButton text="删除文本水印" @click="handleRemoveTextWatermark"></VPButton>
129
+ </el-space>
130
+
131
+ ## 多行文本水印
132
+
133
+ ```js
134
+ import wm from 'watermark-js-plus' // 引入水印插件
135
+
136
+ const watermark = new wm.Watermark({
137
+ contentType: 'multi-line-text',
138
+ content: 'hello my watermark watermark',
139
+ fontSize: 30,
140
+ width: 200,
141
+ height: 200,
142
+ onSuccess: () => {
143
+ app.appContext.config.globalProperties.$message({
144
+ message: '多行文本水印添加成功!',
145
+ type: 'success'
146
+ });
147
+ }
148
+ })
149
+
150
+ watermark.create() // 添加水印
151
+
152
+ watermark.destroy() // 删除水印
153
+ ```
154
+ <el-space>
155
+ <VPButton text="添加多行文本水印" @click="handleAddMultiLineTextWatermark"></VPButton>
156
+ <VPButton text="删除多行文本水印" @click="handleRemoveMultiLineTextWatermark"></VPButton>
157
+ </el-space>
158
+
159
+ ## 图片水印
160
+
161
+ ```js
162
+ import wm from 'watermark-js-plus' // 引入水印插件
163
+
164
+ const watermark = new wm.Watermark({
165
+ contentType: 'image',
166
+ content: 'http://upic-service.test.upcdn.net/uPic/github-JxMIKf.png',
167
+ width: 300,
168
+ height: 300,
169
+ imageWidth: 100, // 图片宽度
170
+ // imageHeight: 20, // 图片高度
171
+ onSuccess: () => {
172
+ app.appContext.config.globalProperties.$message({
173
+ message: '图片水印添加成功!',
174
+ type: 'success'
175
+ });
176
+ }
177
+ })
178
+
179
+ watermark.create() // 添加水印
180
+
181
+ watermark.destroy() // 删除水印
182
+ ```
183
+ <el-space>
184
+ <VPButton text="添加图片水印" @click="handleAddImageWatermark"></VPButton>
185
+ <VPButton text="删除图片水印" @click="handleRemoveImageWatermark"></VPButton>
186
+ </el-space>
187
+
188
+ ## 富文本水印
189
+
190
+ ```js
191
+ import wm from 'watermark-js-plus' // 引入水印插件
192
+
193
+ const watermark = new wm.Watermark({
194
+ contentType: 'rich-text',
195
+ content: '<div style="background: #ccc;">富文本水印超级 <span style="color: #f00">棒</span></div>',
196
+ width: 300,
197
+ height: 300,
198
+ onSuccess: () => {
199
+ app.appContext.config.globalProperties.$message({
200
+ message: '富文本水印添加成功!',
201
+ type: 'success'
202
+ });
203
+ }
204
+ })
205
+
206
+ watermark.create() // 添加水印
207
+
208
+ watermark.destroy() // 删除水印
209
+ ```
210
+ <el-space>
211
+ <VPButton text="添加富文本水印" @click="handleAddRichTextWatermark"></VPButton>
212
+ <VPButton text="删除富文本水印" @click="handleRemoveRichTextWatermark"></VPButton>
213
+ </el-space>
@@ -0,0 +1,19 @@
1
+ ---
2
+ layout: doc
3
+ ---
4
+
5
+ # 这是什么?
6
+ 这是一个基于 *canvas* 画布的水印库,作用于浏览器中。
7
+
8
+ ## 功能
9
+ - 创建水印和暗水印
10
+ - 支持文本、多行文本、图片、富文本
11
+ - 支持监听DOM改动行为,可防止水印被手动删除
12
+ - 支持TS
13
+ - 丰富的配置项
14
+
15
+ ## 浏览器兼容性
16
+
17
+ | ![Chrome](https://raw.githubusercontent.com/alrra/browser-logos/main/src/chrome/chrome_48x48.png) | ![Firefox](https://raw.githubusercontent.com/alrra/browser-logos/main/src/firefox/firefox_48x48.png) | ![Safari](https://raw.githubusercontent.com/alrra/browser-logos/main/src/safari/safari_48x48.png) | ![Opera](https://raw.githubusercontent.com/alrra/browser-logos/main/src/opera/opera_48x48.png) | ![Edge](https://raw.githubusercontent.com/alrra/browser-logos/main/src/edge/edge_48x48.png) | ![IE](https://raw.githubusercontent.com/alrra/browser-logos/master/src/archive/internet-explorer_9-11/internet-explorer_9-11_48x48.png) |
18
+ |:-------------------------------------------------------------------------------------------------:|:----------------------------------------------------------------------------------------------------:|:-------------------------------------------------------------------------------------------------:|:----------------------------------------------------------------------------------------------:|:-------------------------------------------------------------------------------------------:|:---------------------------------------------------------------------------------------------------------------------------------------:|
19
+ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | 11 ✔ |
@@ -0,0 +1,33 @@
1
+ ---
2
+ layout: home
3
+ sidebar: false
4
+ title: watermark-js-plus.js
5
+ titleTemplate: Watermark
6
+
7
+ hero:
8
+ name: watermark-js-plus
9
+ text: 高级的水印插件
10
+ tagline: 简易、强大、高性能。
11
+ image:
12
+ src: /logo.png
13
+ alt: watermark-js-plus
14
+ actions:
15
+ - theme: brand
16
+ text: 开始 👆
17
+ link: /zh/guide/getting-started
18
+ - theme: alt
19
+ text: 在 GitHub 上查看
20
+ link: https://github.com/zhensherlock/watermark-js-plus
21
+
22
+ features:
23
+ - icon: 🛠️
24
+ title: 丰富的功能
25
+ details: 支持文本、多行文本、图片、富文本和暗水印。
26
+ - icon: 🔑
27
+ title: 完全类型化的API
28
+ details: 灵活的 API 和完整的 TypeScript 类型。
29
+ - icon: 📦
30
+ title: 极致轻量化
31
+ details: 大小只有 2kb 左右,你甚至可能忘记它的存在!
32
+ ---
33
+
package/package.json ADDED
@@ -0,0 +1,78 @@
1
+ {
2
+ "name": "watermark-js-plus",
3
+ "version": "0.0.1",
4
+ "description": "watermark for the browser",
5
+ "main": "lib/watermark.js",
6
+ "type": "module",
7
+ "scripts": {
8
+ "test": "echo \"Error: no test specified\" && exit 1",
9
+ "prepare": "husky install",
10
+ "lint": "npx eslint \"src/*.{ts,js}\"",
11
+ "dev": "concurrently \"npm run src:dev\" \"npm run docs:dev\"",
12
+ "src:dev": "rollup -c --watch",
13
+ "build": "rollup -c --environment NODE_ENV:production && rollup -c",
14
+ "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0 -n changelog-option.cjs",
15
+ "docs:dev": "vitepress dev docs",
16
+ "docs:build": "vitepress build docs",
17
+ "docs:serve": "vitepress serve docs",
18
+ "lint-changelog": "concurrently \"npm run lint\" \"npm run changelog\""
19
+ },
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "git+https://github.com/zhensherlock/watermark-js-plus.git"
23
+ },
24
+ "author": "zhensherlock",
25
+ "license": "MIT",
26
+ "bugs": {
27
+ "url": "https://github.com/zhensherlock/watermark-js-plus/issues"
28
+ },
29
+ "homepage": "https://zhensherlock.github.io/watermark-js-plus/",
30
+ "keywords": [
31
+ "watermark",
32
+ "canvas",
33
+ "水印",
34
+ "暗水印",
35
+ "盲水印",
36
+ "数据水印",
37
+ "防删除水印",
38
+ "解密水印"
39
+ ],
40
+ "devDependencies": {
41
+ "@babel/core": "^7.20.5",
42
+ "@babel/eslint-parser": "^7.19.1",
43
+ "@babel/plugin-transform-runtime": "^7.19.6",
44
+ "@babel/preset-env": "^7.20.2",
45
+ "@commitlint/cli": "^17.3.0",
46
+ "@commitlint/config-conventional": "^17.3.0",
47
+ "@element-plus/icons-vue": "^2.0.10",
48
+ "@rollup/plugin-babel": "^6.0.3",
49
+ "@rollup/plugin-commonjs": "^23.0.3",
50
+ "@rollup/plugin-eslint": "^9.0.1",
51
+ "@rollup/plugin-node-resolve": "^15.0.1",
52
+ "@rollup/plugin-replace": "^5.0.1",
53
+ "@rollup/plugin-terser": "^0.1.0",
54
+ "@rollup/plugin-typescript": "^10.0.1",
55
+ "@types/markdown-it": "^12.2.3",
56
+ "@typescript-eslint/parser": "^5.45.0",
57
+ "@vue/theme": "^1.3.0",
58
+ "concurrently": "^7.6.0",
59
+ "conventional-changelog-angular": "^5.0.13",
60
+ "conventional-changelog-cli": "^2.2.2",
61
+ "core-js": "^3.26.1",
62
+ "element-plus": "^2.2.26",
63
+ "eslint": "^8.29.0",
64
+ "eslint-config-airbnb-base": "^15.0.0",
65
+ "eslint-config-semistandard": "^17.0.0",
66
+ "eslint-plugin-import": "^2.26.0",
67
+ "husky": "^8.0.2",
68
+ "lint-staged": "^13.1.0",
69
+ "markdown-it": "^13.0.1",
70
+ "rollup": "^3.5.1",
71
+ "rollup-plugin-filesize": "^9.1.2",
72
+ "rollup-plugin-your-function": "^0.4.3",
73
+ "terser": "^5.16.1",
74
+ "typescript": "^4.9.3",
75
+ "unplugin-element-plus": "^0.4.1",
76
+ "vitepress": "^1.0.0-alpha.29"
77
+ }
78
+ }