Skip to content

Commit aec9f11

Browse files
committed
first commit
0 parents  commit aec9f11

File tree

121 files changed

+21558
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+21558
-0
lines changed

.eslintignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
**/node_modules/**
2+
**/platforms/**

.eslintrc.js

+180
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,180 @@
1+
module.exports = {
2+
env: {
3+
browser: true
4+
},
5+
parser: '@typescript-eslint/parser',
6+
parserOptions: {
7+
createDefaultProgram: true,
8+
project: 'tsconfig.json',
9+
sourceType: 'module'
10+
},
11+
plugins: ['@typescript-eslint'],
12+
rules: {
13+
'@typescript-eslint/adjacent-overload-signatures': 'off',
14+
'@typescript-eslint/array-type': 'error',
15+
'@typescript-eslint/await-thenable': 'error',
16+
'@typescript-eslint/ban-types': 'off',
17+
'@typescript-eslint/class-name-casing': 'off',
18+
'@typescript-eslint/consistent-type-assertions': 'error',
19+
'@typescript-eslint/consistent-type-definitions': 'error',
20+
'@typescript-eslint/explicit-member-accessibility': [
21+
'off',
22+
{
23+
accessibility: 'explicit'
24+
}
25+
],
26+
'@typescript-eslint/indent': [
27+
'error',
28+
4,
29+
{
30+
FunctionDeclaration: {
31+
parameters: 'first'
32+
},
33+
FunctionExpression: {
34+
parameters: 'first'
35+
},
36+
SwitchCase:1
37+
}
38+
],
39+
'@typescript-eslint/interface-name-prefix': 'off',
40+
'@typescript-eslint/member-delimiter-style': 'error',
41+
'@typescript-eslint/member-ordering': 'off',
42+
'@typescript-eslint/no-empty-function': 'off',
43+
'@typescript-eslint/no-empty-interface': 'off',
44+
'@typescript-eslint/no-explicit-any': 'off',
45+
'@typescript-eslint/no-floating-promises': 'off',
46+
'@typescript-eslint/no-inferrable-types': 'off',
47+
'@typescript-eslint/no-misused-new': 'off',
48+
'@typescript-eslint/no-namespace': 'off',
49+
'@typescript-eslint/no-parameter-properties': 'off',
50+
'@typescript-eslint/no-require-imports': 'off',
51+
'@typescript-eslint/no-unnecessary-qualifier': 'error',
52+
'@typescript-eslint/no-unnecessary-type-assertion': 'error',
53+
'@typescript-eslint/no-use-before-declare': 'off',
54+
'@typescript-eslint/no-var-requires': 'off',
55+
'@typescript-eslint/prefer-for-of': 'off',
56+
'@typescript-eslint/prefer-function-type': 'error',
57+
'@typescript-eslint/prefer-namespace-keyword': 'error',
58+
'@typescript-eslint/quotes': [
59+
'error',
60+
'single',
61+
{
62+
avoidEscape: true
63+
}
64+
],
65+
'@typescript-eslint/semi': ['error'],
66+
'@typescript-eslint/space-within-parens': ['off', 'never'],
67+
'@typescript-eslint/triple-slash-reference': 'off',
68+
'@typescript-eslint/type-annotation-spacing': 'error',
69+
'@typescript-eslint/unified-signatures': 'off',
70+
'arrow-body-style': 'error',
71+
'arrow-parens': ['off', 'as-needed'],
72+
camelcase: 'off',
73+
'capitalized-comments': 'off',
74+
complexity: 'off',
75+
'constructor-super': 'error',
76+
curly: ['error', 'multi-line'],
77+
'dot-notation': 'off',
78+
'eol-last': 'error',
79+
eqeqeq: ['error', 'smart'],
80+
'guard-for-in': 'off',
81+
'id-blacklist': 'off',
82+
'id-match': 'error',
83+
'sort-imports': [
84+
'error',
85+
{
86+
ignoreCase: false,
87+
ignoreDeclarationSort: true,
88+
ignoreMemberSort: false,
89+
memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single']
90+
}
91+
],
92+
'linebreak-style': 'off',
93+
'max-classes-per-file': 'off',
94+
'max-len': [
95+
'off',
96+
{
97+
ignorePattern: '^import |^export {(.*?)}',
98+
code: 200
99+
}
100+
],
101+
'new-parens': 'off',
102+
'newline-per-chained-call': 'off',
103+
'no-bitwise': 'off',
104+
'no-caller': 'error',
105+
'no-cond-assign': 'off',
106+
'no-console': [
107+
'off',
108+
{
109+
allow: [
110+
'log',
111+
'warn',
112+
'dir',
113+
'timeLog',
114+
'assert',
115+
'clear',
116+
'count',
117+
'countReset',
118+
'group',
119+
'groupEnd',
120+
'table',
121+
'debug',
122+
'dirxml',
123+
'error',
124+
'groupCollapsed',
125+
'Console',
126+
'profile',
127+
'profileEnd',
128+
'timeStamp',
129+
'context'
130+
]
131+
}
132+
],
133+
'no-constant-condition': 'error',
134+
'no-control-regex': 'off',
135+
'no-debugger': 'error',
136+
'no-duplicate-imports': 'error',
137+
'no-empty': 'off',
138+
'no-eval': 'off',
139+
'no-extra-semi': 'off',
140+
'no-fallthrough': 'error',
141+
'no-invalid-regexp': 'error',
142+
'no-invalid-this': 'off',
143+
'no-irregular-whitespace': 'off',
144+
'no-multiple-empty-lines': 'off',
145+
'no-new-wrappers': 'error',
146+
'no-redeclare': 'off',
147+
'no-regex-spaces': 'error',
148+
'no-return-await': 'error',
149+
'no-shadow': [
150+
'off',
151+
{
152+
hoist: 'all'
153+
}
154+
],
155+
'no-throw-literal': 'error',
156+
'no-trailing-spaces': 'error',
157+
'no-undef-init': 'error',
158+
'no-underscore-dangle': 'off',
159+
'no-unsafe-finally': 'error',
160+
'no-unused-expressions': [
161+
'error',
162+
{
163+
allowTaggedTemplates: true,
164+
allowShortCircuit: true
165+
}
166+
],
167+
'no-unused-labels': 'error',
168+
'no-var': 'error',
169+
'object-shorthand': 'error',
170+
'one-var': ['off', 'never'],
171+
'prefer-arrow/prefer-arrow-functions': 'off',
172+
'prefer-const': 'error',
173+
'quote-props': 'off',
174+
radix: 'error',
175+
'space-before-function-paren': 'off',
176+
'spaced-comment': 'error',
177+
'use-isnan': 'error',
178+
'valid-typeof': 'off'
179+
}
180+
};

.github/issue_template.md

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
### Make sure to check the demo app(s) for sample usage
2+
3+
### Make sure to check the existing issues in this repository
4+
5+
### If the demo apps cannot help and there is no issue for your problem, tell us about it
6+
Please, ensure your title is less than 63 characters long and starts with a capital
7+
letter.
8+
9+
### Which platform(s) does your issue occur on?
10+
- iOS/Android/Both
11+
- iOS/Android versions
12+
- emulator or device. What type of device?
13+
14+
### Please, provide the following version numbers that your issue occurs with:
15+
16+
- CLI: (run `tns --version` to fetch it)
17+
- Cross-platform modules: (check the 'version' attribute in the
18+
`node_modules/tns-core-modules/package.json` file in your project)
19+
- Runtime(s): (look for the `"tns-android"` and `"tns-ios"` properties in the `package.json` file of your project)
20+
- Plugin(s): (look for the version numbers in the `package.json` file of your
21+
project and paste your dependencies and devDependencies here)
22+
23+
### Please, tell us how to recreate the issue in as much detail as possible.
24+
Describe the steps to reproduce it.
25+
26+
### Is there any code involved?
27+
- provide a code example to recreate the problem
28+
- (EVEN BETTER) provide a .zip with application or refer to a repository with application where the problem is reproducible.

.gitignore

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
.idea
2+
.vscode
3+
node_modules
4+
platforms
5+
hooks
6+
package-lock.json
7+
.DS_Store
8+
npm-debug.log.*
9+
demo*/app/**/*.js
10+
demo*/typings
11+
*.framework
12+
**/*.js.map
13+
src/**/*.js
14+
plugin/**/*.js
15+
plugin/**/*.d.ts
16+
bin
17+
build
18+
Pods
19+
!plugin/platforms
20+
/plugin/platforms/android/nativescript_*.aar
21+
*.xcuserdatad

.prettierrc

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"printWidth": 200,
3+
"semi": true,
4+
"tabWidth": 4,
5+
"singleQuote": true
6+
}

.travis.yml

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
matrix:
2+
include:
3+
- stage: "Lint"
4+
language: node_js
5+
os: linux
6+
node_js: "6"
7+
script: cd src && npm run ci.tslint && cd ../demo && npm run ci.tslint
8+
- stage: "WebPack"
9+
os: osx
10+
env:
11+
- Platform="iOS"
12+
osx_image: xcode8.3
13+
language: node_js
14+
node_js: "6"
15+
jdk: oraclejdk8
16+
script: cd demo && npm run build.plugin && npm i && npm run build-ios-bundle
17+
- language: android
18+
os: linux
19+
env:
20+
- Platform="Android"
21+
jdk: oraclejdk8
22+
before_install: nvm install 6.10.3
23+
script: cd demo && npm run build.plugin && npm i && npm run build-android-bundle
24+
- stage: "Build and Test"
25+
env:
26+
- BuildAndroid="25"
27+
language: android
28+
os: linux
29+
jdk: oraclejdk8
30+
before_install: nvm install stable
31+
script:
32+
- cd src && npm i && npm run tsc && cd ../demo && tns build android
33+
- os: osx
34+
env:
35+
- BuildiOS="10.3"
36+
- Xcode="8.3"
37+
osx_image: xcode8.3
38+
language: node_js
39+
node_js: "6"
40+
jdk: oraclejdk8
41+
script:
42+
- cd src && npm i && npm run tsc && cd ../demo && tns build ios
43+
- os: linux
44+
language: android
45+
dist: precise
46+
sudo: required
47+
jdk: oraclejdk8
48+
before_script:
49+
- echo no | android create avd --force -n test -t android-21 -b armeabi-v7a
50+
- emulator -avd test -no-audio -no-window &
51+
- android-wait-for-emulator
52+
before_install:
53+
- nvm install 6
54+
script: cd src && npm run test.android
55+
- os: osx
56+
language: node_js
57+
node_js: "6"
58+
jdk: oraclejdk8
59+
osx_image: xcode8.3
60+
script: cd src && npm run test.ios
61+
62+
android:
63+
components:
64+
- tools
65+
- platform-tools
66+
- build-tools-25.0.2
67+
- android-25
68+
- extra-android-m2repository
69+
- sys-img-armeabi-v7a-android-21
70+
71+
install:
72+
- echo no | npm install -g nativescript
73+
- tns usage-reporting disable
74+
- tns error-reporting disable

0 commit comments

Comments
 (0)