@hzwtech.com/utils 0.0.1 → 0.0.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.
- package/dist/eslint.d.ts +1 -1
- package/dist/vite.d.ts +1 -1
- package/dist/vite.js +3 -3
- package/package.json +1 -1
- package/readme.md +3 -2
package/dist/eslint.d.ts
CHANGED
|
@@ -2,5 +2,5 @@ import type { OptionsConfig } from '@antfu/eslint-config'
|
|
|
2
2
|
import type { Linter } from 'eslint'
|
|
3
3
|
import type { FlatConfigComposer } from 'eslint-flat-config-utils'
|
|
4
4
|
|
|
5
|
-
declare function eslint(options
|
|
5
|
+
declare function eslint(options?: OptionsConfig & Linter.Config): FlatConfigComposer<Linter.Config, string>
|
|
6
6
|
export default eslint
|
package/dist/vite.d.ts
CHANGED
package/dist/vite.js
CHANGED
|
@@ -8,7 +8,7 @@ function scss(options) {
|
|
|
8
8
|
}
|
|
9
9
|
return {
|
|
10
10
|
additionalData: `
|
|
11
|
-
@use "@
|
|
11
|
+
@use "@hzwtech.com/utils/dist/styles/reference/index.scss" as *;
|
|
12
12
|
${additionalData}
|
|
13
13
|
`,
|
|
14
14
|
...options,
|
|
@@ -29,8 +29,8 @@ function autoImport(options) {
|
|
|
29
29
|
dtsMode: 'overwrite',
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
if (!isPublish && !optDefault.imports.includes('@
|
|
33
|
-
optDefault.imports.push({ '@
|
|
32
|
+
if (!isPublish && !optDefault.imports.includes('@hzwtech.com/utils')) {
|
|
33
|
+
optDefault.imports.push({ '@hzwtech.com/utils': ['utils', 'css', 'bem'] })
|
|
34
34
|
}
|
|
35
35
|
const opt = Object.assign({}, optDefault, options)
|
|
36
36
|
return AutoImportVite(opt)
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @hzwtech.com/utils
|
|
2
2
|
|
|
3
3
|
简称ftw,ts前端工具包,包含常用css类以及ts工具方法等。
|
|
4
4
|
|
|
@@ -17,6 +17,7 @@ yarn add @hzwtech.com/utils
|
|
|
17
17
|
main.ts文件中:
|
|
18
18
|
|
|
19
19
|
```ts
|
|
20
|
+
import hzwUtils from '@hzwtech.com/utils'
|
|
20
21
|
import { createPinia } from 'pinia'
|
|
21
22
|
import { createApp } from 'vue'
|
|
22
23
|
import App from './App.vue'
|
|
@@ -25,7 +26,7 @@ import '@hzwtech.com/utils/dist/styles/index.scss'// 引入全局样式文件
|
|
|
25
26
|
const app = createApp(App)
|
|
26
27
|
app.use(router)
|
|
27
28
|
app.mount('#app')
|
|
28
|
-
app.use(
|
|
29
|
+
app.use(hzwUtils, { storage: { prefix: 'hzw' } })
|
|
29
30
|
```
|
|
30
31
|
|
|
31
32
|
之后可以在ts文件和vue中使用bem,utils等工具方法,比如
|