From 556cf43fd4a5b947882a96da69b35d14fa94634a Mon Sep 17 00:00:00 2001 From: Erjan Gavalji Date: Tue, 31 Mar 2015 16:30:32 +0300 Subject: [PATCH] Separate samples from templates --- gruntfile.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/gruntfile.js b/gruntfile.js index a680e7536..c19f45151 100644 --- a/gruntfile.js +++ b/gruntfile.js @@ -33,8 +33,15 @@ module.exports = function(grunt) { var currentAppName = grunt.task.current.data.appName; return updatePackageDef(content, function(contentAsObject) { contentAsObject.version = localCfg.packageVersion; - contentAsObject.name = "tns-samples-" + currentAppName; - contentAsObject.description = "Nativescript " + currentAppName + " sample application"; + if (currentAppName.indexOf("template-") == 0) { + var templateName = currentAppName.substring(0, "template-".length); + contentAsObject.name = "tns-" + currentAppName; + contentAsObject.description = "Nativescript " + templateName + " template"; + } + else { + contentAsObject.name = "tns-samples-" + currentAppName; + contentAsObject.description = "Nativescript " + currentAppName + " sample application"; + } contentAsObject.license = "BSD"; if (!contentAsObject.repository) { contentAsObject.repository = {};