Skip to content

Commit 3f72186

Browse files
committed
add the ref.d.ts to plugin src for dev
1 parent eef263f commit 3f72186

File tree

5 files changed

+30
-22
lines changed

5 files changed

+30
-22
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
*.js.map
33
*.log
44
*.d.ts
5+
!references.d.ts
56
*.tgz
67
*.zip
78
*.DS_Store

package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"name": "camplus-root",
3+
"scripts": {
4+
"precommit": "cd src && lint-staged"
5+
}
6+
}

src/.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ logos/
1111
*.log
1212
*.map
1313
*.ts
14+
references.d.ts
1415
!index.d.ts
1516
*.tgz
1617
*.zip

src/package.json

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -11,39 +11,36 @@
1111
}
1212
},
1313
"scripts": {
14+
"precommit": "lint-staged",
1415
"tsc": "tsc -skipLibCheck",
1516
"build": "npm i && tsc",
1617
"link": "npm i && cd ../demo && npm i && cd ../src && npm run plugin.link",
1718
"demo.reset": "cd ../demo && rimraf platforms",
18-
"plugin.link":
19-
"npm link && cd ../demo && npm link nativescript-camera-plus && cd ../src",
19+
"plugin.link": "npm link && cd ../demo && npm link nativescript-camera-plus && cd ../src",
2020
"plugin.tscwatch": "npm run tsc -- -w",
21-
"nuke":
22-
"rm -rf node_modules && cd ../demo && rm -rf hooks node_modules platforms && cd ../demo-ng && rm -rf hooks node_modules platforms",
21+
"nuke": "rm -rf node_modules && cd ../demo && rm -rf hooks node_modules platforms && cd ../demo-ng && rm -rf hooks node_modules platforms",
2322
"demo.ios": "npm run preparedemo && cd demo && tns run ios --syncAllFiles",
2423
"demo.ios.device": "npm run preparedemo && cd demo && tns run ios",
25-
"demo.ng.ios":
26-
"npm run preparedemong && cd demo-ng && tns run ios --emulator",
24+
"demo.ng.ios": "npm run preparedemong && cd demo-ng && tns run ios --emulator",
2725
"demo.ng.ios.device": "npm run preparedemong && cd demo-ng && tns run ios",
28-
"demo.android":
29-
"npm run preparedemo && cd demo && tns run android --syncAllFiles",
30-
"demo.android.device":
31-
"npm run preparedemo && cd ../demo && tns run android",
32-
"demo.ng.android":
33-
"npm run preparedemong && cd demo-ng && tns run android --emulator",
34-
"demo.ng.android.device":
35-
"npm run preparedemong && cd ../demo-ng && tns run android",
26+
"demo.android": "npm run preparedemo && cd demo && tns run android --syncAllFiles",
27+
"demo.android.device": "npm run preparedemo && cd ../demo && tns run android",
28+
"demo.ng.android": "npm run preparedemong && cd demo-ng && tns run android --emulator",
29+
"demo.ng.android.device": "npm run preparedemong && cd ../demo-ng && tns run android",
3630
"test.ios": "cd demo && tns test ios --emulator",
3731
"test.ios.device": "cd demo && tns test ios",
3832
"test.android": "cd demo && tns test android",
39-
"preparedemo":
40-
"npm i && npm run build && cd ../demo && tns plugin remove nativescript-camera-plus && tns plugin add ../src && tns install",
41-
"preparedemong":
42-
"npm i && npm run build && cd ../demo-ng && tns plugin remove nativescript-camera-plus && tns plugin add ../src && tns install",
43-
"setup":
44-
"npm i && cd demo && npm i && cd .. && npm run build && cd demo && tns plugin add .. && cd ..",
33+
"preparedemo": "npm i && npm run build && cd ../demo && tns plugin remove nativescript-camera-plus && tns plugin add ../src && tns install",
34+
"preparedemong": "npm i && npm run build && cd ../demo-ng && tns plugin remove nativescript-camera-plus && tns plugin add ../src && tns install",
35+
"setup": "npm i && cd demo && npm i && cd .. && npm run build && cd demo && tns plugin add .. && cd ..",
4536
"postclone": "npm i && node scripts/postclone.js"
4637
},
38+
"lint-staged": {
39+
"*.{ts, js, json, css, scss, md}": [
40+
"prettier --write",
41+
"git add"
42+
]
43+
},
4744
"repository": {
4845
"type": "git",
4946
"url": "https://github.com/nstudio/nativescript-camera-plus.git"
@@ -77,8 +74,8 @@
7774
"homepage": "https://github.com/nstudio/nativescript-camera-plus",
7875
"readmeFilename": "README.md",
7976
"devDependencies": {
80-
"husky": "^0.13.4",
81-
"lint-staged": "^3.6.1",
77+
"husky": "^0.14.3",
78+
"lint-staged": "^6.1.0",
8279
"prettier": "^1.10.2",
8380
"tns-core-modules": "~3.4.0",
8481
"tns-platform-declarations": "~3.4.0",

src/references.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/// <reference path="./node_modules/tns-core-modules/tns-core-modules.d.ts" />
2+
/// <reference path="./node_modules/tns-platform-declarations/ios.d.ts" />
3+
/// <reference path="./node_modules/tns-platform-declarations/android.d.ts" />

0 commit comments

Comments
 (0)