utils-lib-js 2.0.7 → 2.0.8

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "utils-lib-js",
3
- "version": "2.0.7",
3
+ "version": "2.0.8",
4
4
  "description": "JavaScript工具函数,封装的一些常用的js函数",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "types": "./dist/cjs/index.d.ts",
package/commonjs.json DELETED
@@ -1,3 +0,0 @@
1
- {
2
- "type": "commonjs"
3
- }
package/example.js DELETED
@@ -1,11 +0,0 @@
1
- import { defer, messageCenter, TaskQueue, Request } from "./dist/esm/index.js";
2
- // const {defer, messageCenter, TaskQueue} = require("./dist/cjs/index.js");
3
- console.log(messageCenter, TaskQueue, defer);
4
- console.log(AbortController);
5
- const resource = new Request("https://www.baidu.com");
6
- // resource
7
- // .GET("/sugrec", {
8
- // prod: "pc",
9
- // wd: "hello world",
10
- // })
11
- // .then(console.log);
package/rollup.config.js DELETED
@@ -1,46 +0,0 @@
1
- import typescript from "@rollup/plugin-typescript";
2
- import resolve from "@rollup/plugin-node-resolve";
3
- import { readFileSync } from "fs";
4
- import { terser } from "rollup-plugin-terser";
5
- import alias from "@rollup/plugin-alias";
6
- const packageJson = JSON.parse(readFileSync("./package.json", "utf8")); // 读取UMD全局模块名,在package中定义了
7
- const pkgName = packageJson.umdModuleName;
8
- export default {
9
- input: "src/index.ts",
10
- output: [
11
- {
12
- file: "dist/esm/index.js",
13
- format: "esm",
14
- },
15
- {
16
- file: "dist/cjs/index.js",
17
- format: "cjs",
18
- },
19
- {
20
- file: "dist/umd/index.js",
21
- format: "umd",
22
- name: pkgName,
23
- globals: {
24
- // 配置依赖中的UMD全局变量名
25
- "event-message-center": "MessageCenter",
26
- "task-queue-lib": "TaskQueue",
27
- "js-request-lib": "JSRequest",
28
- },
29
- },
30
- {
31
- file: "dist/bundle/index.js",
32
- format: "iife",
33
- name: pkgName,
34
- plugins: [terser()],
35
- },
36
- ],
37
- plugins: [
38
- typescript({
39
- tsconfig: "./tsconfig.json",
40
- }),
41
- alias({
42
- resolve: [".js"],
43
- }),
44
- resolve(),
45
- ],
46
- };
package/tsconfig.json DELETED
@@ -1,28 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "allowSyntheticDefaultImports": true,
4
- "sourceMap": true,
5
- "declaration": true,
6
- "target": "es5",
7
- "module": "ESNext",
8
- "moduleResolution": "node",
9
- "esModuleInterop": true,
10
- "noEmitOnError": true,
11
- "noFallthroughCasesInSwitch": true,
12
- "noImplicitReturns": true,
13
- "removeComments": true,
14
- "emitDecoratorMetadata": true,
15
- "experimentalDecorators": true,
16
- "outDir": "dist",
17
- "rootDir": "src",
18
- "skipLibCheck": true,
19
- "lib": [
20
- "DOM",
21
- "ES5",
22
- "ES6",
23
- "ES2015.promise",
24
- "ES2018.promise",
25
- "ES2015.iterable"
26
- ]
27
- }
28
- }