Skip to content

Commit 6af07fc

Browse files
author
Zhicheng WANG
committed
chore: 修改模块导入方式
1 parent 0e58a54 commit 6af07fc

8 files changed

+25
-11
lines changed

index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export * from './src/public_api';
1+
export * from './src/public-api';

ng-package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
"$schema": "../../../node_modules/ng-packagr/ng-package.schema.json",
33
"dest": "../../../dist/ui-model/angular",
44
"lib": {
5-
"entryFile": "src/public_api.ts"
5+
"entryFile": "src/public-api.ts"
66
}
7-
}
7+
}

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@ui-model/angular",
33
"version": "0.2.1",
4-
"main": "src/public_api.ts",
4+
"main": "src/public-api.ts",
55
"peerDependencies": {
66
"@angular/common": "^6.0.0 || ^7.0.0 || ^8.0.0",
77
"@angular/core": "^6.0.0 || ^7.0.0 || ^8.0.0",

src/lib/directives/movable-transform.directive.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { ContentChild, Directive, HostBinding } from '@angular/core';
2-
import { MovableDirective } from '@ui-model/angular/src/lib/directives/movable.directive';
2+
import { MovableDirective } from './movable.directive';
33

44
@Directive({
55
selector: '[uiMovableTransform]',

src/lib/directives/movable.directive.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Directive, ElementRef, EventEmitter, HostListener, Output } from '@angular/core';
2-
import { PositionMapper } from '@ui-model/angular/src/lib/services/position-mapper.service';
32
import { Distance, Point } from '@ui-model/core';
3+
import { PositionMapper } from '../services/position-mapper.service';
44

55
@Directive({
66
selector: '[uiMovable]',

src/lib/services/position-mapper.service.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { Injectable } from '@angular/core';
2-
import { findParent } from '@ui-model/angular/src/lib/utils/find-parent';
3-
import { screenToSvg } from '@ui-model/angular/src/lib/utils/screen-to-svg';
4-
import { svgToScreen } from '@ui-model/angular/src/lib/utils/svg-to-screen';
5-
import { Point } from '@ui-model/core/src/lib/utils/point';
2+
import { Point } from '@ui-model/core';
3+
import { findParent } from '../utils/find-parent';
4+
import { screenToSvg } from '../utils/screen-to-svg';
5+
import { svgToScreen } from '../utils/svg-to-screen';
66

77
// SVG 内部的坐标系和外部的坐标系不同,这个映射器用来在两者之间映射,必要时可以覆盖它,以实现自己的映射逻辑
88
@Injectable({
File renamed without changes.

tsconfig.lib.json

+15-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,21 @@
1515
"lib": [
1616
"dom",
1717
"es2015"
18-
]
18+
],
19+
"paths": {
20+
"@ui-model/chart": [
21+
"dist/ui-model/chart",
22+
"projects/ui-model/chart"
23+
],
24+
"@ui-model/core": [
25+
"dist/ui-model/core",
26+
"projects/ui-model/core"
27+
],
28+
"@ui-model/common": [
29+
"dist/ui-model/common",
30+
"projects/ui-model/common"
31+
]
32+
}
1933
},
2034
"angularCompilerOptions": {
2135
"annotateForClosureCompiler": true,

0 commit comments

Comments
 (0)