Skip to content

Commit d562be9

Browse files
committed
chore: migration to @NativeScript
1 parent 755c612 commit d562be9

10 files changed

+62
-68
lines changed

Diff for: demo-vue/app/examples/Base.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
</template>
1515

1616
<script lang="ts">
17-
import * as frameModule from 'tns-core-modules/ui/frame';
17+
import * as frameModule from '@nativescript/core/ui/frame';
1818
import Vue from 'vue';
1919
2020
export const title = 'ListView sample';

Diff for: demo-vue/app/examples/VerticalAlignment.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
</template>
2525

2626
<script lang="ts">
27-
import * as frameModule from 'tns-core-modules/ui/frame';
27+
import * as frameModule from '@nativescript/core/ui/frame';
2828
import Vue from 'vue';
2929
3030
export const title = 'verticalAlignment sample';

Diff for: demo-vue/package.json

+13-19
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,28 @@
33
"license": "SEE LICENSE IN LICENSE.md",
44
"readme": "README.md",
55
"nativescript": {
6-
"id": "org.nativescript.demovuehtmllabel",
7-
"tns-ios": {
8-
"version": "6.2.0-rc-2019-10-16-131038-01"
9-
},
10-
"tns-android": {
11-
"version": "6.3.1"
12-
}
6+
"id": "org.nativescript.demovuehtmllabel"
137
},
148
"dependencies": {
159
"nativescript-htmllabel": "../plugin",
1610
"nativescript-theme-core": "~2.0.24",
1711
"nativescript-akylas-vue": "~2.3.5",
18-
"tns-core-modules": "6.1.2",
12+
"@nativescript/core": "6.4.0",
1913
"tslib": "^1.10.0"
2014
},
2115
"devDependencies": {
22-
"nativescript-akylas-webpack-template": "^0.3.1",
23-
"nativescript-dev-webpack": "~1.2.1",
24-
"tns-platform-declarations": "^6.1.2",
25-
"tslint": "^5.20.0",
16+
"nativescript-akylas-webpack-template": "^1.0.15",
17+
"nativescript-dev-webpack": "~1.5.0",
18+
"tns-platform-declarations": "^6.4.0",
19+
"tslint": "^6.0.0",
2620
"tslint-config-prettier": "^1.18.0",
27-
"tslint-config-standard": "^8.0.1",
28-
"typescript": "^3.6.4",
29-
"vue": "^2.6.10",
30-
"vue-i18n": "^8.14.1",
31-
"vue-property-decorator": "^8.2.2",
32-
"webpack": "^4.41.1",
33-
"webpack-cli": "^3.3.9"
21+
"tslint-config-standard": "^9.0.0",
22+
"typescript": "^3.7.5",
23+
"vue": "^2.6.11",
24+
"vue-i18n": "^8.15.3",
25+
"vue-property-decorator": "^8.4.0",
26+
"webpack": "^4.41.6",
27+
"webpack-cli": "^3.3.11"
3428
},
3529
"scripts": {
3630
"tslint": "npm i && tslint --config '../tslint.json' 'app/**/*.ts' --exclude '**/node_modules/**'"

Diff for: demo-vue/tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"paths": {
2020
"~/*": ["app/*"],
2121
"nativescript-vue": ["./node_modules/nativescript-akylas-vue"],
22-
"*": ["./node_modules/tns-core-modules/*", "./node_modules/*"]
22+
"*": ["./node_modules/@nativescript/core/*", "./node_modules/*"]
2323
}
2424
},
2525
"include": ["app/**/*", "references.d.ts"],

Diff for: package.json

+13-13
Original file line numberDiff line numberDiff line change
@@ -45,22 +45,22 @@
4545
"homepage": "https://github.com/Akylas/nativescript-label",
4646
"readmeFilename": "README.md",
4747
"devDependencies": {
48-
"@commitlint/cli": "^8.2.0",
49-
"@commitlint/config-conventional": "^8.2.0",
50-
"@angular/core": "^8.2.11",
51-
"@types/node": "^12.11.1",
52-
"husky": "^3.0.9",
53-
"lerna": "^3.18.1",
48+
"@commitlint/cli": "^8.3.5",
49+
"@commitlint/config-conventional": "^8.3.4",
50+
"@angular/core": "^9.0.1",
51+
"@types/node": "^13.7.1",
52+
"husky": "^4.2.3",
53+
"lerna": "^3.20.2",
5454
"npm-watch": "^0.6.0",
5555
"prompt": "^1.0.0",
56-
"rimraf": "^3.0.0",
57-
"tns-core-modules": "6.1.2",
58-
"tns-platform-declarations": "^6.1.2",
59-
"tslint": "^5.20.0",
56+
"rimraf": "^3.0.2",
57+
"@nativescript/core": "6.4.0",
58+
"tns-platform-declarations": "^6.4.0",
59+
"tslint": "^6.0.0",
6060
"tslint-config-prettier": "^1.18.0",
61-
"tslint-config-standard": "^8.0.1",
62-
"cpy-cli": "^2.0.0",
63-
"typescript": "~3.6.4"
61+
"tslint-config-standard": "^9.0.0",
62+
"cpy-cli": "^3.1.0",
63+
"typescript": "~3.7.5"
6464
},
6565
"dependencies": {},
6666
"bootstrapper": "nativescript-plugin-seed",

Diff for: src/label-common.ts

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
import { isIOS } from 'tns-core-modules/platform';
2-
import { CssProperty, InheritedCssProperty, makeParser, makeValidator, Property } from 'tns-core-modules/ui/core/properties';
3-
import { booleanConverter, Color, CSSType, dip } from 'tns-core-modules/ui/core/view';
4-
import { Label as TNLabel } from 'tns-core-modules/ui/label';
5-
import { Style } from 'tns-core-modules/ui/styling/style';
6-
import { layout } from 'tns-core-modules/utils/utils';
1+
import { isIOS } from '@nativescript/core/platform';
2+
import { CssProperty, InheritedCssProperty, makeParser, makeValidator, Property } from '@nativescript/core/ui/core/properties';
3+
import { booleanConverter, Color, CSSType, dip } from '@nativescript/core/ui/core/view';
4+
import { Label as TNLabel } from '@nativescript/core/ui/label';
5+
import { Style } from '@nativescript/core/ui/styling/style';
6+
import { layout } from '@nativescript/core/utils/utils';
77
import { Label as LabelViewDefinition, TextShadow } from './label';
8-
import { FormattedString } from 'tns-core-modules/text/formatted-string';
9-
import { Span } from 'tns-core-modules/text/span';
8+
import { FormattedString } from '@nativescript/core/ui/text-base/formatted-string';
9+
import { Span } from '@nativescript/core/ui/text-base/span';
1010

1111

12-
declare module 'tns-core-modules/text/formatted-string' {
12+
declare module '@nativescript/core/ui/text-base/formatted-string' {
1313
interface FormattedString {
1414
addPropertyChangeHandler(): void;
1515
removePropertyChangeHandler(): void;
1616
}
1717
}
18-
declare module 'tns-core-modules/text/span' {
18+
declare module '@nativescript/core/ui/text-base/span' {
1919
interface Span {
2020
addPropertyChangeHandler(): void;
2121
removePropertyChangeHandler(): void;

Diff for: src/label.android.ts

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import * as application from 'tns-core-modules/application';
2-
import * as fs from 'tns-core-modules/file-system';
3-
import { Font, FontStyle } from 'tns-core-modules/ui/styling/font';
4-
import { FontWeight } from 'tns-core-modules/ui/styling/font-common';
1+
import * as application from '@nativescript/core/application';
2+
import * as fs from '@nativescript/core/file-system';
3+
import { Font, FontStyle } from '@nativescript/core/ui/styling/font';
4+
import { FontWeight } from '@nativescript/core/ui/styling/font-common';
55
import {
66
TextTransform,
77
WhiteSpace,
@@ -35,11 +35,11 @@ import {
3535
Property,
3636
Observable,
3737
backgroundColorProperty
38-
} from 'tns-core-modules/ui/text-base/text-base';
39-
import { layout } from 'tns-core-modules/utils/utils';
40-
import { FormattedString } from 'tns-core-modules/text/formatted-string';
41-
import { Span } from 'tns-core-modules/text/span';
42-
import { profile } from 'tns-core-modules/profiling';
38+
} from '@nativescript/core/ui/text-base/text-base';
39+
import { layout } from '@nativescript/core/utils/utils';
40+
import { FormattedString } from '@nativescript/core/ui/text-base/formatted-string';
41+
import { Span } from '@nativescript/core/ui/text-base/span';
42+
import { profile } from '@nativescript/core/profiling';
4343
import { Label as LabelViewDefinition, TextShadow } from './label';
4444
import { lineBreakProperty, maxLinesProperty, textShadowProperty, VerticalTextAlignment, verticalTextAlignmentProperty, cssProperty } from './label-common';
4545

@@ -56,12 +56,12 @@ Font.prototype.getAndroidTypeface = function() {
5656
return this._typeface;
5757
};
5858

59-
declare module 'tns-core-modules/text/formatted-string' {
59+
declare module '@nativescript/core/ui/text-base/formatted-string' {
6060
interface FormattedString {
6161
toNativeString(): string;
6262
}
6363
}
64-
declare module 'tns-core-modules/text/span' {
64+
declare module '@nativescript/core/ui/text-base/span' {
6565
interface Span {
6666
toNativeString(): string;
6767
}
@@ -134,7 +134,7 @@ enum SuspendType {
134134
UISetup = 1 << 22,
135135
IncrementalCountMask = ~((1 << 20) + (1 << 21) + (1 << 22))
136136
}
137-
declare module 'tns-core-modules/ui/core/view-base' {
137+
declare module '@nativescript/core/ui/core/view-base' {
138138
interface ViewBase {
139139
_resumeNativeUpdates(type: SuspendType);
140140
_defaultPaddingTop: number;

Diff for: src/label.d.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
* Contains the Label class, which represents a custom label widget which correctly supports html.
33
*/ /** */
44

5-
import { Property, View } from 'tns-core-modules/ui/core/view';
6-
import { Label as TNLabel } from 'tns-core-modules/ui/label/label';
7-
import { dip } from 'tns-core-modules/ui/core/view';
8-
import { Color } from 'tns-core-modules/color/color';
5+
import { Property, View } from '@nativescript/core/ui/core/view/view';
6+
import { Label as TNLabel } from '@nativescript/core/ui/label/label';
7+
import { dip } from '@nativescript/core/ui/core/view/view';
8+
import { Color } from '@nativescript/core/color/color';
99
/**
1010
* Represents a label with html content. Use this component instead WebView when you want to show just static HTML content.
1111
* [iOS support](https://developer.apple.com/library/ios/documentation/UIKit/Reference/NSAttributedString_UIKit_Additions/#//apple_ref/occ/instm/NSAttributedString/initWithData:options:documentAttributes:error:)

Diff for: src/label.ios.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { fontInternalProperty, Length, paddingBottomProperty, paddingLeftProperty, paddingRightProperty, paddingTopProperty, View, colorProperty, Color } from 'tns-core-modules/ui/page/page';
2-
import { Font } from 'tns-core-modules/ui/styling/font';
1+
import { fontInternalProperty, Length, paddingBottomProperty, paddingLeftProperty, paddingRightProperty, paddingTopProperty, View, colorProperty, Color } from '@nativescript/core/ui/page/page';
2+
import { Font } from '@nativescript/core/ui/styling/font';
33
import {
44
borderBottomWidthProperty,
55
borderLeftWidthProperty,
@@ -10,9 +10,9 @@ import {
1010
whiteSpaceProperty,
1111
formattedTextProperty,
1212
FormattedString
13-
} from 'tns-core-modules/ui/text-base/text-base';
14-
import { isString } from 'tns-core-modules/utils/types';
15-
import { layout } from 'tns-core-modules/utils/utils';
13+
} from '@nativescript/core/ui/text-base';
14+
import { isString } from '@nativescript/core/utils/types';
15+
import { layout } from '@nativescript/core/utils/utils';
1616
import { TextShadow, VerticalTextAlignment, verticalTextAlignmentProperty } from './label';
1717
import { htmlProperty, LabelBase, lineBreakProperty, maxLinesProperty, textShadowProperty } from './label-common';
1818

@@ -24,7 +24,7 @@ enum FixedSize {
2424
BOTH = 3
2525
}
2626

27-
declare module 'tns-core-modules/ui/text-base/text-base' {
27+
declare module '@nativescript/core/ui/text-base' {
2828
interface TextBase {
2929
_requestLayoutOnTextChanged();
3030
}

Diff for: tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"rootDir": "src",
2727
"paths": {
2828
"*": [
29-
"./node_modules/tns-core-modules/*",
29+
"./node_modules/@nativescript/core/*",
3030
"./node_modules/*"
3131
]
3232
}

0 commit comments

Comments
 (0)