mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-15 19:26:42 +08:00
Separate samples from templates
This commit is contained in:
11
gruntfile.js
11
gruntfile.js
@ -33,8 +33,15 @@ module.exports = function(grunt) {
|
|||||||
var currentAppName = grunt.task.current.data.appName;
|
var currentAppName = grunt.task.current.data.appName;
|
||||||
return updatePackageDef(content, function(contentAsObject) {
|
return updatePackageDef(content, function(contentAsObject) {
|
||||||
contentAsObject.version = localCfg.packageVersion;
|
contentAsObject.version = localCfg.packageVersion;
|
||||||
contentAsObject.name = "tns-samples-" + currentAppName;
|
if (currentAppName.indexOf("template-") == 0) {
|
||||||
contentAsObject.description = "Nativescript " + currentAppName + " sample application";
|
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";
|
contentAsObject.license = "BSD";
|
||||||
if (!contentAsObject.repository) {
|
if (!contentAsObject.repository) {
|
||||||
contentAsObject.repository = {};
|
contentAsObject.repository = {};
|
||||||
|
Reference in New Issue
Block a user