Skip to content

Commit 7feeb95

Browse files
committed
add prettier to source
1 parent 038440e commit 7feeb95

File tree

3 files changed

+41
-47
lines changed

3 files changed

+41
-47
lines changed

checkbox.android.ts

+10-16
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,42 @@
1-
import { Color } from "tns-core-modules/color";
2-
import { device } from "tns-core-modules/platform";
3-
import app = require("tns-core-modules/application");
1+
import { Color } from 'tns-core-modules/color'
2+
import { device } from "tns-core-modules/platform"
3+
import app = require("tns-core-modules/application")
44
import { CheckBoxInterface } from ".";
5-
import {
6-
View,
7-
Property,
8-
CssProperty,
9-
Style,
10-
booleanConverter
11-
} from "tns-core-modules/ui/core/view";
5+
import { View, Property, CssProperty, Style, booleanConverter} from "tns-core-modules/ui/core/view"
126
declare const android: any;
137

148
export const checkedProperty = new Property<CheckBox, boolean>({
159
name: "checked",
1610
defaultValue: false,
1711
valueConverter: booleanConverter,
1812
valueChanged: onCheckedPropertyChanged
19-
});
13+
})
2014

2115
export const textProperty = new Property<CheckBox, string>({
2216
name: "text",
2317
defaultValue: "",
2418
valueChanged: onTextPropertyChanged
25-
});
19+
})
2620

2721
export const fillColorProperty = new CssProperty<Style, string>({
2822
name: "fillColor",
2923
cssName: "fill-color",
3024
valueConverter: v => {
3125
return String(v);
3226
}
33-
});
27+
})
3428

3529
export const tintColorProperty = new CssProperty<Style, string>({
3630
name: "tintColor",
3731
cssName: "tint-color",
3832
defaultValue: "#0075ff",
3933
valueConverter: v => {
40-
return String(v);
34+
return String(v)
4135
}
42-
});
36+
})
4337

4438
export class CheckBox extends View implements CheckBoxInterface {
45-
private _android: any; /// android.widget.CheckBox
39+
private _android: any /// android.widget.CheckBox
4640
private _checkStyle: string;
4741
private _checkPadding: string;
4842
private _checkPaddingLeft: string;

checkbox.ios.ts

+22-23
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
1-
import { CheckBoxInterface } from "./index";
2-
import {
3-
Property,
4-
CssProperty,
5-
Style,
6-
booleanConverter
7-
} from "tns-core-modules/ui/core/view";
8-
import { Color } from "tns-core-modules/color";
9-
import { Button } from "tns-core-modules/ui/button";
1+
import { CheckBoxInterface } from "./index"
2+
import { Property, CssProperty, Style, booleanConverter} from "tns-core-modules/ui/core/view"
3+
import { Color } from "tns-core-modules/color"
4+
import { Button } from "tns-core-modules/ui/button"
105

116
declare const CGRectMake: any, CGPointMake: any;
127
const checkBoxBackgroundColorProperty = new CssProperty<Style, string>({
@@ -21,44 +16,48 @@ const onCheckColorProperty = new CssProperty<Style, string>({
2116
cssName: "on-check-color",
2217
defaultValue: "#ffffff",
2318
valueConverter: v => {
24-
return String(v);
19+
return String(v)
2520
}
26-
});
21+
})
22+
2723
const tintColorProperty = new CssProperty<Style, string>({
2824
name: "tintColor",
2925
cssName: "tint-color",
3026
// defaultValue: "#0075ff",
3127
valueConverter: v => {
32-
return String(v);
28+
return String(v)
3329
}
34-
});
30+
})
31+
3532
const onTintColorProperty = new CssProperty<Style, string>({
3633
name: "onTintColor",
3734
cssName: "on-tint-color",
3835
valueConverter: v => {
39-
return String(v);
36+
return String(v)
4037
}
41-
});
38+
})
39+
4240
const fillColorProperty = new CssProperty<Style, string>({
4341
name: "fillColor",
4442
cssName: "fill-color",
4543
valueConverter: v => {
46-
return String(v);
44+
return String(v)
4745
}
48-
});
46+
})
4947

5048
const checkedProperty = new Property<CheckBox, boolean>({
5149
name: "checked",
5250
defaultValue: false,
5351
valueConverter: booleanConverter,
5452
valueChanged: onCheckedPropertyChanged
55-
});
53+
})
54+
5655
export class CheckBox extends Button implements CheckBoxInterface {
57-
_onCheckColor: string;
58-
_checkBoxBackgroundColor: any;
59-
_onTintColor: string;
60-
_tintColor: string;
61-
_onFillColor: string;
56+
_onCheckColor: string
57+
_checkBoxBackgroundColor: any
58+
_onTintColor: string
59+
_tintColor: string
60+
_onFillColor: string
6261
_fillColor: string;
6362
private _iosCheckbox: BEMCheckBox;
6463
private _delegate: BEMCheckBoxDelegateImpl;

package.json

+9-8
Original file line numberDiff line numberDiff line change
@@ -78,20 +78,21 @@
7878
"@angular/http": "~4.0.3",
7979
"@angular/platform-browser": "~4.0.3",
8080
"@angular/router": "~4.0.3",
81-
"rxjs": "~5.0.1",
82-
"zone.js": "~0.8.9",
83-
"nativescript-angular": "~3.0.0",
84-
8581
"grunt": "1.0.1",
86-
"grunt-contrib-copy": "1.0.0",
8782
"grunt-contrib-clean": "1.0.0",
83+
"grunt-contrib-copy": "1.0.0",
8884
"grunt-exec": "2.0.0",
89-
85+
"husky": "^0.13.4",
86+
"lint-staged": "^3.6.1",
87+
"nativescript-angular": "~3.0.0",
88+
"prettier": "^1.4.4",
89+
"rxjs": "~5.0.1",
9090
"tns-core-modules": "^3.0.0",
9191
"tns-platform-declarations": "^3.0.0",
92-
"typescript": "^2.2.0"
92+
"typescript": "^2.2.0",
93+
"zone.js": "~0.8.9"
9394
},
9495
"peerDependencies": {
9596
"tns-core-modules": "^3.0.0"
9697
}
97-
}
98+
}

0 commit comments

Comments
 (0)