Skip to content

Commit 23fd718

Browse files
committed
deps, script
1 parent 6720688 commit 23fd718

File tree

2 files changed

+32
-27
lines changed

2 files changed

+32
-27
lines changed

demo/package.json

Lines changed: 8 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,24 @@
11
{
22
"nativescript": {
3-
"id": "org.nativescript.floatingactionbutton",
4-
"tns-ios": {
5-
"version": "3.2.0"
6-
},
7-
"tns-android": {
8-
"version": "3.2.0"
9-
}
3+
"id": "org.nativescript.floatingactionbutton"
104
},
115
"dependencies": {
126
"nativescript-floatingactionbutton": "../src",
7+
"nativescript-theme-core": "^1.0.4",
138
"nativescript-unit-test-runner": "^0.3.4",
14-
"tns-core-modules": "^3.1.1"
9+
"tns-core-modules": "^4.2.0"
1510
},
1611
"devDependencies": {
17-
"awesome-typescript-loader": "~3.1.3",
18-
"babel-traverse": "6.12.0",
19-
"babel-types": "6.11.1",
20-
"babylon": "6.8.4",
21-
"copy-webpack-plugin": "~4.0.1",
22-
"extract-text-webpack-plugin": "~3.0.0",
23-
"filewalker": "0.1.2",
2412
"jasmine-core": "^2.5.2",
2513
"karma": "^1.3.0",
2614
"karma-jasmine": "^1.0.2",
2715
"karma-nativescript-launcher": "^0.4.0",
28-
"lazy": "1.0.11",
29-
"nativescript-css-loader": "~0.26.0",
30-
"nativescript-dev-typescript": "libs",
31-
"nativescript-dev-webpack": "^0.8.0",
32-
"raw-loader": "~0.5.1",
33-
"resolve-url-loader": "~2.1.0",
34-
"tns-platform-declarations": "^3.1.0",
16+
"nativescript-css-loader": "~0.26.1",
17+
"nativescript-dev-typescript": "~0.7.2",
18+
"nativescript-dev-webpack": "~0.15.1",
19+
"tns-platform-declarations": "^4.2.0",
3520
"tslint": "~5.4.3",
36-
"typescript": "~2.3.0",
37-
"webpack": "~3.2.0",
38-
"webpack-bundle-analyzer": "^2.8.2",
39-
"webpack-sources": "~1.0.1",
40-
"nativescript-worker-loader": "~0.8.1"
21+
"typescript": "~2.8.2"
4122
},
4223
"scripts": {
4324
"build.plugin": "cd ../src && npm run build",

src/scripts/build-native.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
const { exec } = require('child_process');
2+
const semver = require('semver');
3+
4+
exec('tns --version', (err, stdout, stderr) => {
5+
if (err) {
6+
// node couldn't execute the command
7+
console.log(`tns --version err: ${err}`);
8+
return;
9+
}
10+
11+
const tnsVersion = semver.major(stdout);
12+
13+
// execute 'tns plugin build' for {N} version > 4. This command builds .aar in platforms/android folder.
14+
if (tnsVersion >= 4) {
15+
console.log(`executing 'tns plugin build'`);
16+
exec('tns plugin build', (err, stdout, stderr) => {
17+
if (err) {
18+
// node couldn't execute the command
19+
console.log(`${err}`);
20+
return;
21+
}
22+
});
23+
}
24+
});

0 commit comments

Comments
 (0)