Skip to content
This repository has been archived by the owner on Dec 19, 2021. It is now read-only.

Commit

Permalink
release: 4.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanWalker committed Apr 17, 2021
1 parent dffe9ae commit ca2dc76
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 27 deletions.
23 changes: 12 additions & 11 deletions src/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nstudio/nativescript-loading-indicator",
"version": "4.0.0",
"version": "4.1.0",
"description": "A NativeScript plugin for showing an overlayed loading indicator.",
"main": "loading-indicator",
"typings": "index.d.ts",
Expand All @@ -18,19 +18,20 @@
"tsc": "tsc -skipLibCheck",
"build": "npm run tsc && npm run build.native",
"build.native": "node scripts/build-native.js",
"postclone": "npm i && node scripts/postclone.js && cd ../demo && npm i && npx rimraf -- package-lock.json && cd ../src",
"postclone": "npm run npm-i && node scripts/postclone.js && cd ../demo && npm run npm-i && npx rimraf -- package-lock.json && cd ../src",
"npm-i": "npm i --legacy-peer-deps",
"test.android": "npm run tsc && npm run tslint && cd ../demo && tns build android && tns test android --justlaunch",
"test.ios": "npm run tsc && npm run tslint && cd ../demo && tns build ios && tns test ios --justlaunch",
"tslint": "cd .. && tslint \"**/*.ts\" --config tslint.json --exclude \"**/node_modules/**\" --exclude '**/platforms/**' --exclude \"**/typings/**\"",
"demo.ios": "npm run tsc && cd ../demo && tns run ios",
"demo.android": "npm run tsc && cd ../demo && tns run android",
"demo.reset": "cd ../demo && npx rimraf -- hooks node_modules platforms package-lock.json",
"demo-angular.ios": "npm i && cd ../demo-angular && tns run ios",
"demo-angular.android": "npm i && cd ../demo-angular && tns run android",
"demo-angular.ios": "npm run npm-i && cd ../demo-angular && tns run ios",
"demo-angular.android": "npm run npm-i && cd ../demo-angular && tns run android",
"demo-angular.reset": "cd ../demo-angular && npx rimraf -- hooks node_modules platforms package-lock.json",
"plugin.prepare": "npm run build && cd ../demo && tns plugin remove nativescript-loading-indicator && tns plugin add ../src",
"clean": "npm run demo.reset && npx rimraf -- node_modules package-lock.json && npm i",
"ci.tslint": "npm i && tslint '**/*.ts' --config '../tslint.json' --exclude '**/node_modules/**' --exclude '**/platforms/**' --exclude '**/typings/**'",
"clean": "npm run demo.reset && npx rimraf node_modules package-lock.json && npm run npm-i",
"ci.tslint": "npm run npm-i && tslint '**/*.ts' --config '../tslint.json' --exclude '**/node_modules/**' --exclude '**/platforms/**' --exclude '**/typings/**'",
"prepack": "npm run build.native",
"generate.typings.ios": "cd ../demo && TNS_DEBUG_METADATA_PATH=\"$(pwd)/metadata\" tns build ios && TNS_TYPESCRIPT_DECLARATIONS_PATH=\"$(pwd)/typings\" tns build ios && echo 'Now look for your library typings in demo/typings!'"
},
Expand Down Expand Up @@ -80,11 +81,11 @@
"readmeFilename": "README.md",
"devDependencies": {
"husky": "~4.3.0",
"lint-staged": "~10.3.0",
"prettier": "~2.1.1",
"@nativescript/core": "~7.0.3",
"@nativescript/types": "~7.0.3",
"typescript": "~3.9.0",
"lint-staged": "~10.5.0",
"prettier": "~2.2.1",
"@nativescript/core": "~8.0.0",
"@nativescript/types": "~8.0.0",
"typescript": "~4.1.0",
"prompt": "^1.0.0",
"rimraf": "^3.0.2",
"tslint": "^6.1.3",
Expand Down
Binary file modified src/platforms/android/nativescript_loading_indicator.aar
Binary file not shown.
19 changes: 3 additions & 16 deletions src/scripts/build-native.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,11 @@
const { exec } = require('child_process');
const semver = require('semver');

exec('tns --version', (err, stdout, stderr) => {
console.log(`executing 'ns plugin build'`);
exec('ns plugin build', (err, stdout, stderr) => {
if (err) {
// node couldn't execute the command
console.log(`tns --version err: ${err}`);
console.log(`${err}`);
return;
}

const tnsVersion = semver.major(stdout);

// execute 'tns plugin build' for {N} version > 4. This command builds .aar in platforms/android folder.
if (tnsVersion >= 4) {
console.log(`executing 'tns plugin build'`);
exec('tns plugin build', (err, stdout, stderr) => {
if (err) {
// node couldn't execute the command
console.log(`${err}`);
return;
}
});
}
});

0 comments on commit ca2dc76

Please sign in to comment.