added travis integration (doing test installation)

This commit is contained in:
Sefa Ilkimen
2017-08-20 23:44:21 +02:00
parent a20821378b
commit 613593ba51
5 changed files with 21 additions and 1 deletions

1
.gitignore vendored
View File

@@ -2,3 +2,4 @@ node_modules/**
tags
.zedstate
/www/umd-tough-cookie.js
/temp

View File

@@ -1,2 +1,4 @@
tags
.zedstate
/scripts
/temp

View File

@@ -4,7 +4,8 @@
"description": "Cordova / Phonegap plugin for communicating with HTTP servers using SSL pinning",
"scripts": {
"build": "cp node_modules/umd-tough-cookie/lib/umd-tough-cookie.js www/umd-tough-cookie.js",
"prepublish": "npm run build"
"prepublish": "npm run build",
"test": "npm run build && ./scripts/test-installation.sh"
},
"cordova": {
"id": "cordova-plugin-advanced-http",
@@ -50,6 +51,7 @@
},
"homepage": "https://github.com/silkimen/cordova-plugin-advanced-http#readme",
"devDependencies": {
"cordova": "7.0.1",
"umd-tough-cookie": "2.3.2"
}
}

12
scripts/test-installation.sh Executable file
View File

@@ -0,0 +1,12 @@
#!/usr/bin/env bash
set -e
ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"/..
CDV=$ROOT/node_modules/.bin/cordova
rm -rf $ROOT/temp
$CDV create $ROOT/temp
cd $ROOT/temp
$CDV platforms add android
$CDV platforms add ios
$CDV plugins add $ROOT

3
travis.yml Normal file
View File

@@ -0,0 +1,3 @@
language: node_js
node_js:
- 'lts/*'