nativescript-dev-android-snapshot
Advanced tools
Comparing version 0.0.5 to 0.0.6
@@ -11,7 +11,3 @@ var path = require("path"); | ||
// Force the CLI to return the deleted packages | ||
if (!shelljs.test("-e", path.join(platformAppDirectory, "tns_modules/application")) || | ||
!shelljs.test("-e", path.join(platformAppDirectory, "tns_modules/tns-core-modules/application"))) { | ||
shelljs.touch("-c", path.join(projectData.projectDir, "node_modules/nativescript-angular/package.json")); | ||
shelljs.touch("-c", path.join(projectData.projectDir, "node_modules/tns-core-modules/package.json")); | ||
} | ||
common.prepareDeletedModules(platformAppDirectory, projectData.projectDir); | ||
@@ -18,0 +14,0 @@ shelljs.rm("-rf", path.join(platformAppDirectory, "_embedded_script_.js")); |
@@ -7,2 +7,10 @@ var path = require("path"); | ||
exports.prepareDeletedModules = function(platformAppDirectory, projectDir) { | ||
if (!shelljs.test("-e", path.join(platformAppDirectory, "tns_modules/application")) && | ||
!shelljs.test("-e", path.join(platformAppDirectory, "tns_modules/tns-core-modules/application"))) { | ||
shelljs.touch("-c", path.join(projectDir, "node_modules/nativescript-angular/package.json")); | ||
shelljs.touch("-c", path.join(projectDir, "node_modules/tns-core-modules/package.json")); | ||
} | ||
}; | ||
exports.isSnapshotEnabled = function(projectData, hookArgs) { | ||
@@ -96,5 +104,10 @@ if (hookArgs.platform !== "android") { | ||
var latestTagVersion = publishedSnapshotPackageVersions[packageInfo.version]; | ||
var proc = shelljs.exec("npm ls --json " + packageInfo.name + "@" + latestTagVersion, { silent: true }); | ||
var packageInfo = JSON.parse(proc.stdout.toString("utf8")); | ||
if (packageInfo.dependencies) { | ||
if (!latestTagVersion) { | ||
return false; | ||
} | ||
proc = shelljs.exec("npm ls --json " + packageInfo.name + "@" + latestTagVersion, { silent: true }); | ||
localPackageInfo = JSON.parse(proc.stdout.toString("utf8")); | ||
if (localPackageInfo.dependencies) { | ||
return true; | ||
@@ -101,0 +114,0 @@ } |
{ | ||
"name": "nativescript-dev-android-snapshot", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"license": "Apache-2.0", | ||
@@ -5,0 +5,0 @@ "dependencies": { |
@@ -9,7 +9,3 @@ var path = require('path'); | ||
if (!shelljs.test("-e", path.join(platformAppDirectory, "tns_modules/application")) || | ||
!shelljs.test("-e", path.join(platformAppDirectory, "tns_modules/tns-core-modules/application"))) { | ||
shelljs.touch("-c", path.join(projectDir, "node_modules/nativescript-angular/package.json")); | ||
shelljs.touch("-c", path.join(projectDir, "node_modules/tns-core-modules/package.json")); | ||
} | ||
common.prepareDeletedModules(platformAppDirectory, projectDir); | ||
@@ -16,0 +12,0 @@ common.executeInProjectDir(projectDir, function() { |
293
20028