{"size": 881, "ext": "js", "max_stars_repo_path": "patch-platforms.js", "max_stars_repo_name": "berrylands/nativescript-nodeify", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "patch-platforms.js", "max_issues_repo_name": "berrylands/nativescript-nodeify", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "patch-platforms.js", "max_forks_repo_name": "berrylands/nativescript-nodeify", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 62.9285714286, "max_line_length": 139, "alphanum_fraction": 0.7695800227}
module.exports = function ($logger, $projectData, $usbLiveSyncService, $platformsData, hookArgs) {
    var path = require("path");
    var platformName = hookArgs.platform.toLowerCase();
    
    //appDestinationDir is the platform specific app folder. For Android, this will be YOUR_PROJECT_ROOT/platforms/android/src/main/assets/
    var appDestinationDir = $platformsData.getPlatformData(platformName).appDestinationDirectoryPath;
    var patchNpmPackageDir = path.join(appDestinationDir, "app", "tns_modules", "nativescript-nodeify", "patch-npm-packages.js");
    
    //Calling patch-npm-packages.js under platforms to patch the node_modules in the platforms folder.
    //This will leave the source code folder YOUR_PROJECT_ROOT/node_modules untouched.
    var patchNpmPackage = require(patchNpmPackageDir);
    patchNpmPackage($logger, $projectData, $usbLiveSyncService);
}
