Skip to content

Commit

Permalink
Merge pull request #36 from rosen-vladimirov/vladimirov/prepare-for-6…
Browse files Browse the repository at this point in the history
….0-release

fix: prepare plugin for NativeScript 6.0.0 release
  • Loading branch information
EddyVerbruggen authored Jun 13, 2019
2 parents 8f7e1f2 + 0680f59 commit d700983
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/plugin-hooks/after-prepare.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
var fs = require('fs-promise');
var path = require('path');

module.exports = function (logger, platformsData, projectData, hookArgs) {
var platform = hookArgs.platform.toLowerCase();
module.exports = function (logger, projectData, hookArgs) {
var platform = (hookArgs && (hookArgs.platform || (hookArgs.prepareData && hookArgs.prepareData.platform)) || '').toLowerCase();

if (platform == 'ios') {
var appResourcesDirectoryPath = projectData.appResourcesDirectoryPath;
Expand All @@ -14,7 +14,7 @@ module.exports = function (logger, platformsData, projectData, hookArgs) {
var fileToCopy = fs.existsSync(entitlementsFile) ? entitlementsFile : entitlementsFileAlt;
return fs.copy(fileToCopy, dest)
.then(function () {
logger.out('Copied `' + fileToCopy + '` to `' + dest + '`');
logger.info('Copied `' + fileToCopy + '` to `' + dest + '`');
});
}

Expand Down
4 changes: 2 additions & 2 deletions src/plugin-hooks/before-prepare.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
var fs = require('fs-promise');
var path = require('path');

module.exports = function (logger, platformsData, projectData, hookArgs) {
var platform = hookArgs.platform.toLowerCase();
module.exports = function (logger, projectData, hookArgs) {
var platform = (hookArgs && (hookArgs.platform || (hookArgs.prepareData && hookArgs.prepareData.platform)) || '').toLowerCase();

if (platform == 'ios') {
var appResourcesDirectoryPath = projectData.appResourcesDirectoryPath;
Expand Down

0 comments on commit d700983

Please sign in to comment.