diff --git a/lerna.json b/lerna.json index 3f93f9b4c..6b1f70c91 100644 --- a/lerna.json +++ b/lerna.json @@ -3,11 +3,13 @@ "useWorkspaces": true, "version": "independent", "command": { + "version": { + "ignoreChanges": ["**/__tests__/**", "**/*.md"], + "message": "chore: publish %s", + "private": false + }, "publish": { - "packages": ["packages/*"], - "ignoreChanges": ["__tests__", "*.md", "website", "storybook"], - "registry": "https://registry.npmjs.com", - "message": "chore: publish" + "registry": "https://registry.npmjs.org" } }, "publishConfig": { diff --git a/package.json b/package.json index e4b663f55..013855991 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,9 @@ "build-website": "lerna run build --stream --scope=l7plot-website", "bundle": "lerna run build:umd --stream --scope=@antv/l7plot", "deploy-website": "lerna run deploy --stream --scope=l7plot-website", - "publish": "lerna publish" + "version": "lerna version", + "prepublish-package": "yarn build && yarn bundle", + "publish-package": "lerna publish from-package" }, "devDependencies": { "@commitlint/cli": "^12.1.4", diff --git a/packages/component/__tests__/unit/tooltip/index.test.ts b/packages/component/__tests__/unit/tooltip/index.test.ts index 6b91c112d..158581bf4 100644 --- a/packages/component/__tests__/unit/tooltip/index.test.ts +++ b/packages/component/__tests__/unit/tooltip/index.test.ts @@ -33,12 +33,12 @@ describe('tooltip', () => { const container = tooltip.getContainer(); expect(Array.from(container.classList).includes('l7plot-tooltip')).toBe(true); - const title = container.getElementsByClassName('l7plot-tooltip-title')[0] as HTMLElement; + const title = container.getElementsByClassName('l7plot-tooltip__title')[0] as HTMLElement; expect(title.innerText).toBe('my title'); - const listItems = Array.from(container.getElementsByClassName('l7plot-tooltip-list-item')) as HTMLElement[]; + const listItems = Array.from(container.getElementsByClassName('l7plot-tooltip__list-item')) as HTMLElement[]; each(listItems, (listItem, index) => { - expect(listItem.getElementsByClassName('l7plot-tooltip-value')[0].innerText).toBe(items[index].value); + expect(listItem.getElementsByClassName('l7plot-tooltip__value')[0].innerText).toBe(items[index].value); }); each(Theme[Constants.CONTAINER_CLASS], (val, key) => { diff --git a/packages/component/package.json b/packages/component/package.json index 16b32a248..5759fe9a9 100644 --- a/packages/component/package.json +++ b/packages/component/package.json @@ -1,6 +1,6 @@ { "name": "@antv/l7plot-component", - "version": "0.0.3-alpha.5", + "version": "0.0.3-alpha.6", "description": "Components for L7Plot", "main": "dist/lib/index.js", "types": "dist/lib/index.d.ts", diff --git a/packages/component/src/index.ts b/packages/component/src/index.ts index 994435ac8..a8c607e34 100644 --- a/packages/component/src/index.ts +++ b/packages/component/src/index.ts @@ -1,4 +1,4 @@ -export const version = '0.0.3-alpha.5'; +export const version = '0.0.3-alpha.6'; // 类型定义导出 export * from './types'; diff --git a/packages/component/src/tooltip/constants.ts b/packages/component/src/tooltip/constants.ts index f07d45c9a..c11ca1436 100644 --- a/packages/component/src/tooltip/constants.ts +++ b/packages/component/src/tooltip/constants.ts @@ -1,9 +1,9 @@ export const CONTAINER_CLASS = 'l7plot-tooltip'; -export const TITLE_CLASS = 'l7plot-tooltip-title'; -export const LIST_CLASS = 'l7plot-tooltip-list'; -export const LIST_ITEM_CLASS = 'l7plot-tooltip-list-item'; -export const NAME_CLASS = 'l7plot-tooltip-name'; -export const VALUE_CLASS = 'l7plot-tooltip-value'; +export const TITLE_CLASS = 'l7plot-tooltip__title'; +export const LIST_CLASS = 'l7plot-tooltip__list'; +export const LIST_ITEM_CLASS = 'l7plot-tooltip__list-item'; +export const NAME_CLASS = 'l7plot-tooltip__name'; +export const VALUE_CLASS = 'l7plot-tooltip__value'; export const CONTAINER_TPL = `