Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit 00f9a4d

Browse files
Bundle postinstall script dependencies. #213 (also, switched to prompt-lite as it has way less dependencies)
1 parent 2c25fa4 commit 00f9a4d

File tree

7 files changed

+8
-17
lines changed

7 files changed

+8
-17
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
.DS_Store
33
node_modules
44
*.tgz
5-
scripts/postinstall.js
5+
scripts/postinstall.js

.npmignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ CHANGELOG.md
55
*.tgz
66
scripts/webpack.config.js
77
scripts/installer.js
8-
scripts/winston-mock.js
8+
scripts/winston-mock.js

README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,5 @@ that is being updated otherwise it will seem as though your updates have no effe
218218
#### Found play-services:9.0.0, but version 9.0.2 is needed..
219219
Update your Android bits like the issue above and reinstall the android platform in your project.
220220

221-
#### EEXIST: file already exists, symlink '../mkdirp/bin/cmd.js
222-
This is a race condition in a tool deep down the toolchain, so not the fault of this plugin.
223-
Just rerun the build, it only pops up sometimes.
224-
225221
## Credits
226222
The starting point for this plugin was [this great Gist](https://gist.github.com/jbristowe/c89a7bcae7fc9a035ee7) by [John Bristowe](https://github.com/jbristowe).

package.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@
1111
}
1212
},
1313
"scripts": {
14-
"bundle-installer": "webpack --config scripts/webpack.config.js scripts/installer.js scripts/postinstall.js",
14+
"bundle-installer": "npm install --ignore-scripts && webpack --config scripts/webpack.config.js scripts/installer.js scripts/postinstall.js",
1515
"prepublish": "npm run bundle-installer",
16-
"postinstall": "node scripts/postinstall.js"
1716
"postinstall": "node scripts/postinstall.js",
1817
"config": "node scripts/postinstall.js config"
1918
},
@@ -46,10 +45,8 @@
4645
},
4746
"homepage": "https://github.com/eddyverbruggen/nativescript-plugin-firebase",
4847
"devDependencies": {
49-
"prompt": "^1.0.0",
48+
"prompt-lite": "^0.1.1",
49+
"xcode": "0.8.0",
5050
"webpack": "~2.1.0-beta.25"
51-
"dependencies": {
52-
"app-root-path": "^2.0.1",
53-
"prompt-lite": "0.1.1"
5451
}
5552
}

scripts/installer.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
var fs = require('fs');
22
var path = require('path');
33
var prompt = require('prompt-lite');
4-
var path = require('path');
5-
var prompt = require('prompt');
64

75
// Default settings for using ios and android with Firebase
86
var usingiOS = false, usingAndroid = false;
@@ -15,7 +13,7 @@ var directories = {
1513

1614
console.log('NativeScript Firebase Plugin Installation');
1715

18-
var appRoot = require('app-root-path').toString();
16+
var appRoot = "../../";
1917
var pluginConfigPath = path.join(appRoot, "firebase.nativescript.json");
2018

2119
var config = {};

scripts/webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ module.exports = {
1717
//pkginfo is unpackable too, but we can replace it with a simple expression
1818
"pkginfo": "function(){}"
1919
}
20-
}
20+
};

scripts/winston-mock.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module.exports.Logger.prototype = {
44
cli: function() {},
55
help: function() {},
66
input: function() {},
7-
error: function() {},
7+
error: function() {}
88
};
99

1010
module.exports.transports = {

0 commit comments

Comments
 (0)