From b98bb56e463f9d0f48ee7e716a1ef122c0757973 Mon Sep 17 00:00:00 2001 From: Sergey Kurochkin Date: Mon, 16 Jan 2017 18:11:59 +0300 Subject: [PATCH 1/4] change postinstall script --- package.json | 2 +- scripts/postinstall.js | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 scripts/postinstall.js diff --git a/package.json b/package.json index 502275a..d7d8578 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ }, "main": "index.js", "scripts": { - "postinstall": "unzip ios/libs/TwilioSDK/Libraries/libTwilioClient.a.zip -d ios/libs/TwilioSDK/Libraries/" + "postinstall": "scripts/postinstall.js" }, "keywords": [ "react-component", diff --git a/scripts/postinstall.js b/scripts/postinstall.js new file mode 100644 index 0000000..16ddb9f --- /dev/null +++ b/scripts/postinstall.js @@ -0,0 +1,13 @@ +let sys = require('sys'); +let exec = require('child_process').exec; +let os = require('os'); + +if (os.platform === 'darwin') { + exec("unzip ../ios/libs/TwilioSDK/Libraries/libTwilioClient.a.zip -d ../ios/libs/TwilioSDK/Libraries/", function(err, stdout, stderr) { + sys.print('stdout: ' + stdout); + sys.print('stderr: ' + stderr); + if (err !== null) { + console.log('exec error: ' + error); + } + }); +} From e989fb75ea709f6217d323786ee579269867e377 Mon Sep 17 00:00:00 2001 From: Sergey Kurochkin Date: Mon, 16 Jan 2017 18:24:26 +0300 Subject: [PATCH 2/4] change postinstall --- package.json | 2 +- scripts/postinstall.js | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 scripts/postinstall.js diff --git a/package.json b/package.json index 502275a..7119cea 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ }, "main": "index.js", "scripts": { - "postinstall": "unzip ios/libs/TwilioSDK/Libraries/libTwilioClient.a.zip -d ios/libs/TwilioSDK/Libraries/" + "postinstall": "node scripts/postinstall.js" }, "keywords": [ "react-component", diff --git a/scripts/postinstall.js b/scripts/postinstall.js new file mode 100644 index 0000000..16ddb9f --- /dev/null +++ b/scripts/postinstall.js @@ -0,0 +1,13 @@ +let sys = require('sys'); +let exec = require('child_process').exec; +let os = require('os'); + +if (os.platform === 'darwin') { + exec("unzip ../ios/libs/TwilioSDK/Libraries/libTwilioClient.a.zip -d ../ios/libs/TwilioSDK/Libraries/", function(err, stdout, stderr) { + sys.print('stdout: ' + stdout); + sys.print('stderr: ' + stderr); + if (err !== null) { + console.log('exec error: ' + error); + } + }); +} From c863e430d76450af37f0cfeeb3d9ef824158d510 Mon Sep 17 00:00:00 2001 From: Sergez Date: Thu, 19 Jan 2017 14:32:53 +0300 Subject: [PATCH 3/4] Update postinstall.js --- scripts/postinstall.js | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/postinstall.js b/scripts/postinstall.js index 16ddb9f..30161b2 100644 --- a/scripts/postinstall.js +++ b/scripts/postinstall.js @@ -2,6 +2,7 @@ let sys = require('sys'); let exec = require('child_process').exec; let os = require('os'); +console.log(os.platform); if (os.platform === 'darwin') { exec("unzip ../ios/libs/TwilioSDK/Libraries/libTwilioClient.a.zip -d ../ios/libs/TwilioSDK/Libraries/", function(err, stdout, stderr) { sys.print('stdout: ' + stdout); From 2bdd96675281f924d6156905c8df6b33e8ef70e8 Mon Sep 17 00:00:00 2001 From: Sergez Date: Thu, 19 Jan 2017 14:42:14 +0300 Subject: [PATCH 4/4] remove deprecated sys --- scripts/postinstall.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/scripts/postinstall.js b/scripts/postinstall.js index 30161b2..c3eb99f 100644 --- a/scripts/postinstall.js +++ b/scripts/postinstall.js @@ -1,12 +1,9 @@ -let sys = require('sys'); let exec = require('child_process').exec; let os = require('os'); console.log(os.platform); if (os.platform === 'darwin') { exec("unzip ../ios/libs/TwilioSDK/Libraries/libTwilioClient.a.zip -d ../ios/libs/TwilioSDK/Libraries/", function(err, stdout, stderr) { - sys.print('stdout: ' + stdout); - sys.print('stderr: ' + stderr); if (err !== null) { console.log('exec error: ' + error); }