Skip to content

Commit

Permalink
release v4.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
saqqdy committed May 21, 2023
1 parent 1fc1d16 commit c75c292
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 110 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Change logs

## 2023.05.21 v4.2.0

1. use `use-downloads`
2. some translate work

## 2023.05.20 v4.1.0

1. use `load-source` `mount-css` `mount-image` `mount-script` `mount-style`
Expand Down
3 changes: 2 additions & 1 deletion build/rollup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ function createEntry(config: Config) {
'mount-script',
'mount-image',
'mount-style',
'load-source'
'load-source',
'use-downloads'
)
}

Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "js-cool",
"description": "This is a pure native js front-end common method library",
"version": "4.1.0",
"version": "4.2.0",
"packageManager": "pnpm@8.5.1",
"main": "dist/js-cool.cjs.js",
"module": "dist/js-cool.esm-bundler.js",
Expand Down Expand Up @@ -54,7 +54,8 @@
"mount-css": "^1.0.0",
"mount-image": "^1.0.0",
"mount-script": "^1.0.0",
"mount-style": "^1.0.0"
"mount-style": "^1.0.0",
"use-downloads": "^1.0.0"
},
"devDependencies": {
"@babel/core": "^7.21.8",
Expand Down
8 changes: 8 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

81 changes: 0 additions & 81 deletions src/download.ts

This file was deleted.

4 changes: 2 additions & 2 deletions src/index.default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import mountCss from 'mount-css' // 动态加载css链接资源
import mountImg from 'mount-image' // 动态加载图片资源
import mountJs from 'mount-script' // 动态加载js链接资源
import mountStyle from 'mount-style' // 动态加载css样式
import { download } from 'use-downloads' // 文件下载

// 全局参数
import client from './client' // client方法返回一个浏览器判断结果对象
Expand Down Expand Up @@ -69,7 +70,6 @@ import getType from './getType' // 获取目标类型
import isArray from './isArray' // 判断是否数组
import isPlainObject from './isPlainObject' // 判断是否PlainObject
import cleanData from './cleanData' // 清洗数据
import download from './download' // 文件下载
import searchTreeObject from './searchTreeObject' // 对象查找
import openUrl from './openUrl' // 新标签页打开链接(浏览器不能解析的文件跳转下载)
import toThousands from './toThousands' // 千分位分割方法
Expand Down Expand Up @@ -98,6 +98,7 @@ export default {
mountImg,
mountJs,
mountStyle,
download,
RGBToHex,
addEvent,
all,
Expand Down Expand Up @@ -127,7 +128,6 @@ export default {
decodeBase64,
decodeUtf8,
delay,
download,
encodeBase64,
encodeUtf8,
extend,
Expand Down
4 changes: 2 additions & 2 deletions src/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const {
mountImg,
mountJs,
mountStyle,
download,
CSVToArray,
CSVToJSON,
JSONToCSV,
Expand All @@ -30,7 +31,6 @@ const {
delCookie,
delSession,
delay,
download,
encodeBase64,
encodeUtf8,
extend,
Expand Down Expand Up @@ -90,6 +90,7 @@ export {
mountImg,
mountJs,
mountStyle,
download,
CSVToArray,
CSVToJSON,
JSONToCSV,
Expand All @@ -113,7 +114,6 @@ export {
delCookie,
delSession,
delay,
download,
encodeBase64,
encodeUtf8,
extend,
Expand Down
23 changes: 1 addition & 22 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export { default as mountCss } from 'mount-css' // 动态加载css链接资源
export { default as mountImg } from 'mount-image' // 动态加载图片资源
export { default as mountJs } from 'mount-script' // 动态加载js链接资源
export { default as mountStyle } from 'mount-style' // 动态加载css样式
export { download } from 'use-downloads' // 文件下载

// 全局参数
export { default as client } from './client' // client方法返回一个浏览器判断结果对象
Expand Down Expand Up @@ -71,7 +72,6 @@ export { default as getType } from './getType' // 获取目标类型
export { default as isArray } from './isArray' // 判断是否数组
export { default as isPlainObject } from './isPlainObject' // 判断是否PlainObject
export { default as cleanData } from './cleanData' // 清洗数据
export { default as download } from './download' // 文件下载
export { default as searchTreeObject, type SearchKeySet } from './searchTreeObject' // 对象查找
export { default as openUrl } from './openUrl' // 新标签页打开链接(浏览器不能解析的文件跳转下载)
export { default as toThousands } from './toThousands' // 千分位分割方法
Expand All @@ -92,24 +92,3 @@ export { default as unique } from './unique' // 数组去重
export { default as fillIPv6 } from './fillIPv6' // ipv6地址补全
export { default as getProperty } from './getProperty' // 根据路径字符串获取数组、对象属性值
export { default as setProperty } from './setProperty' // 根据路径字符串设置数组、对象属性值

// export { default as loadSource, type SourceFileType, type SourceOptions } from './loadSource' // 动态加载资源,支持js、图片、css链接、css样式字符串
// export {
// default as mountCss,
// type LinkAttributes,
// type HTMLLinkElementEX,
// type CssOptions
// } from './mountCss' // 动态加载css链接资源
// export {
// default as mountImg,
// type ImageAttributes,
// type HTMLImageElementEX,
// type ImgOptions
// } from './mountImg' // 动态加载图片资源
// export {
// default as mountJs,
// type ScriptAttributes,
// type HTMLScriptElementEX,
// type JsOptions
// } from './mountJs' // 动态加载js链接资源
// export { default as mountStyle, type StyleAttributes, type StyleOptions } from './mountStyle' // 动态加载css样式

0 comments on commit c75c292

Please sign in to comment.