Skip to content

Commit

Permalink
utils/index.comm修改; pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
luoxiao-supermap committed Feb 20, 2025
1 parent 3f86b0d commit 020df9d
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 8 deletions.
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

pnpm exec lint-staged
4 changes: 2 additions & 2 deletions vue3/packages/common/hooks/useTheme.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import type { ThemeProps } from '@supermapgis/common/utils'
import type { ThemeProps } from '@supermapgis/common/utils/index.common'
import type { ThemeStyleParams } from 'vue-iclient-core/utils/style/color/serialColors';
import { ref, computed, reactive, watch, toRefs, onBeforeMount, onMounted, onBeforeUnmount, getCurrentInstance } from 'vue'
import globalEvent from 'vue-iclient-core/utils/global-event';
import { getDerivedColorsByTextColor } from 'vue-iclient-core/utils/util';
import { getPrimarySerialColors, getRootStyleSelector } from 'vue-iclient-core/utils/style/color/serialColors';
import { themeProps } from '@supermapgis/common/utils'
import { themeProps } from '@supermapgis/common/utils/index.common'

interface ThemeData {
backgroundData: string
Expand Down
4 changes: 2 additions & 2 deletions vue3/packages/mapboxgl/components/layer-list/layerList.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { PropType, CSSProperties } from 'vue'
import type { ShortEmits, ThemeProps } from '@supermapgis/common/utils'
import type { ShortEmits, ThemeProps } from '@supermapgis/common/utils/index.common'
import type { ControlPosition } from 'vue-iclient-core/controllers/mapboxgl/utils/MapControl'
import type {
PaginationParams,
Expand All @@ -10,7 +10,7 @@ import type {
ToolbarParams
} from '@supermapgis/vue-iclient-mapboxgl/attributes/attributes.vue'
import type { CardProps, ControlProps } from '@supermapgis/mapboxgl/utils'
import { getPropsDefaults, themeProps } from '@supermapgis/common/utils'
import { getPropsDefaults, themeProps } from '@supermapgis/common/utils/index.common'
import { cardProps, controlProps } from '@supermapgis/mapboxgl/utils'

export interface AttributesParams {
Expand Down
4 changes: 2 additions & 2 deletions vue3/packages/mapboxgl/components/layer-list/layerList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ import {
import { useMapGetter, useLocale, useTheme } from '@supermapgis/common/hooks'
import { useMapControl } from '@supermapgis/mapboxgl/hooks'
import { Card as ACard } from 'ant-design-vue'
import SmAttributes from '@supermapgis/vue-iclient-mapboxgl/attributes/attributes.vue'
import SmCollapseCard from '@supermapgis/vue-iclient-common/collapse-card/collapseCard.vue'
import SmAttributes from '@supermapgis/mapboxgl/components/attributes/attributes.vue'
import SmCollapseCard from '@supermapgis/common/components/collapse-card/collapseCard.vue'
import LayerListViewModel from 'vue-iclient-core/controllers/mapboxgl/LayerListViewModel'
import LayerGroup from './layerGroup.vue'
import { isEqual } from 'lodash-es'
Expand Down
1 change: 0 additions & 1 deletion vue3/packages/mapboxgl/vue-iclient-mapboxgl/component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { SmConfigProvider } from '@supermapgis/common/components/config-provider'

import { SmAttributes } from '@supermapgis/mapboxgl/components/attributes'
import { SmWebMap } from '@supermapgis/mapboxgl/components/web-map'
import type { Plugin } from 'vue'
Expand Down
19 changes: 19 additions & 0 deletions vue3/pnpm-lock.yaml

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

5 changes: 4 additions & 1 deletion vue3/tools/build/src/tasks/modules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ const plugins: Plugin[] = [
{
name: 'replace-chunk-during-render',
renderChunk(code) {
return code.replaceAll('./common/', './').replaceAll(`./${pkgName}/`, './')
return code
.replaceAll('./common/', './')
.replaceAll(`./${pkgName}/`, './')
.replaceAll('.scss', '.css')
}
},
vue({
Expand Down

0 comments on commit 020df9d

Please sign in to comment.