@ajaxjs/util 1.2.1 → 1.2.2

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 (2) hide show
  1. package/README.md +1 -113
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -16,116 +16,4 @@ Some common JS functions.
16
16
 
17
17
 
18
18
 
19
- NPM: https://www.npmjs.com/package/@ajaxjs/util
20
-
21
-
22
-
23
-
24
-
25
- # How to create a NPM package?
26
-
27
- Use Rollup to build your package.
28
-
29
-
30
-
31
- ```
32
-
33
- npm init
34
-
35
- npm add typescript -D
36
-
37
- tsc --init
38
-
39
-
40
-
41
- npm install rollup -g # 全局安装
42
-
43
- npm install rollup -D # 项目本地安装
44
-
45
- npm install @rollup/plugin-typescript -D # 将Typescript转换成为 ES6+ 标准
46
-
47
- npm install @rollup/plugin-commonjs -D # rollup默认不支持CommonJS,自己写的时候可以尽量避免使用CommonJS模块的语法,但有些外部库的是cjs或者umd(由webpack打包的)。如果使用这些外部库就需要支持CommonJS模块。
48
-
49
- npm install @rollup/plugin-node-resolve -D
50
-
51
- npm init @eslint/config
52
-
53
- npm install -D eslint @typescript-eslint/parser @typescript-eslint/eslint-plugin
54
-
55
- ```
56
-
57
-
58
-
59
- https://chieminchan.vercel.app/articles/Project%20Management/%E6%89%8B%E6%8A%8A%E6%89%8B%E6%95%99%E4%BD%A0%E5%8F%91%E4%B8%AAnpm%E5%8C%85.html
60
-
61
-
62
-
63
- # Rollup Config
64
-
65
- ## 1
66
-
67
-
68
-
69
- 升级到最新版本 rollup: 4.14.3 后 rollup.config.js 配置文件中却不能使用 es6 import 语法了!
70
-
71
-
72
-
73
- rollup: 4.14.3 时报错:SyntaxError: Cannot use import statement outside a module
74
-
75
-
76
-
77
- 解决方法1
78
-
79
- 打包命令添加: `--bundleConfigAsCjs`
80
-
81
- 修改打包命令: `"dev": "rollup -c rollup.config.js --bundleConfigAsCjs -w"` 重新执行则解决
82
-
83
-
84
-
85
-
86
-
87
- 解决方法2
88
-
89
- package.json 中添加:"type": "module",
90
-
91
- 这样设置只是支持 es6语法,但 import 语法是不可以引入 .json文件的!
92
-
93
-
94
-
95
-
96
-
97
- 链接:https://juejin.cn/post/7359893210797015051
98
-
99
-
100
-
101
- ## 2
102
-
103
- 项目至少包含一个扩展名为 `.ts` 的文件
104
-
105
-
106
-
107
- error TS18003: No inputs were found in config file '/Users/jiyik/workspace/ts/tsconfig.json'. Specified 'include' paths were '["src/**/*"]' and 'exclude' paths were '["node_modules"]'
108
-
109
-
110
-
111
- `tsconfig.json` 文件中设置:
112
-
113
-
114
-
115
- ```json
116
-
117
- {
118
-
119
- "compilerOptions": {
120
-
121
- // ... 配置项
122
-
123
- },
124
-
125
- "include": ["src/**/*"],
126
-
127
- "exclude": ["node_modules"]
128
-
129
- }
130
-
131
- ```
19
+ NPM: https://www.npmjs.com/package/@ajaxjs/util
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ajaxjs/util",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "Core JS Utils",
5
5
  "scripts": {
6
6
  "dev": "rollup -w -c",