Skip to content

Commit

Permalink
Merge pull request #113 from Clancey/feature/template
Browse files Browse the repository at this point in the history
Added a QuickStart template for "dotnet new"
  • Loading branch information
jonlipsky committed Aug 26, 2019
2 parents 0d33fa6 + 8a847b1 commit 4ea2b80
Show file tree
Hide file tree
Showing 40 changed files with 1,216 additions and 6 deletions.
10 changes: 5 additions & 5 deletions sample/Comet.iOS.Sample/AppDelegate.cs
Expand Up @@ -16,16 +16,16 @@ public class AppDelegate : UIApplicationDelegate {
get;
set;
}
public override void FinishedLaunching (UIApplication application)

UIWindow window;

public override void FinishedLaunching (UIApplication application)
{
base.FinishedLaunching (application);
}
UIWindow window;

public override bool FinishedLaunching (UIApplication application, NSDictionary launchOptions)
{
// Override point for customization after application launch.
// If not required for your application you can safely delete this method

#if DEBUG
Comet.Reload.Init();
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/Comet.iOS/Comet.iOS.csproj
Expand Up @@ -98,7 +98,7 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Comet\Comet.csproj">
<Project>{1817646E-E71E-48CF-80A4-3030EF870D61}</Project>
<Project>{F8F78BA6-F213-4916-8E04-78FE51885C7E}</Project>
<Name>Comet</Name>
</ProjectReference>
</ItemGroup>
Expand Down
3 changes: 3 additions & 0 deletions templates/base/.template.config/dotnetcli.host.json
@@ -0,0 +1,3 @@
{

}
306 changes: 306 additions & 0 deletions templates/base/.template.config/template.json
@@ -0,0 +1,306 @@
{
"author": "Comet",
"classifications": [
"Comet",
"Mobile"
],
"name": "Comet App",
"groupIdentity": "Comet.App",
"identity": "Comet.App.CSharp",
"shortName": "comet-app",
"tags": {
"language": "C#",
"type": "project"
},
"sourceName": "NewApp",
"primaryOutputs": [
{
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\" && (kind == \"quickstart\"))",
"path": "NewApp\\MainPage.cs"
},
{
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\" && (kind == \"quickstart\"))",
"path": "NewApp\\README.md"
},
{
"condition": "CreateiOSProject",
"path": "NewApp.iOS\\NewApp.iOS.csproj"
},
{
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\" && (kind == \"quickstart\"))",
"path": "NewApp\\NewApp.csproj"
}
],
"defaultName": "App",
"preferNameDirectory": "true",
"guids": [
"99E19497-29A6-4B77-B773-BEC55F9B55DC", // .NET Standard Library
"8D9F8CF0-E178-402D-8D40-A88B7B5F3D42", // Android
"91D74A40-E440-42AD-B51F-C2D641C49384", // iOS
"3EA9E612-E717-4E55-9034-C415CD62AF9A", // UWP
"B19C892E-2628-4CA7-AD27-08D406A3B14B" // UITest
],
"symbols": {
"kind": {
"type": "parameter",
"datatype": "choice",
"defaultValue": "quickstart",
"choices": [
{
"choice": "quickstart",
"description": "Quick Start Comet iOS app"
}
]
},
"AppIdentifier": {
"type": "parameter",
"description": "Overrides the Info.plist's CFBundleIdentifier",
"datatype": "string",
"defaultValue": "com.companyname"
},
"AndroidAppIdentifier": {
"type": "parameter",
"description": "Overrides the package name in the AndroidManifest.xml",
"datatype": "string"
},
"iOSAppIdentifier": {
"type": "parameter",
"description": "Overrides the Info.plist's CFBundleIdentifier",
"datatype": "string"
},
"AndroidAppIdentifierReplacer": {
"type": "generated",
"generator": "coalesce",
"parameters": {
"sourceVariableName": "AndroidAppIdentifier",
"fallbackVariableName": "AppIdentifier"
},
"replaces": "com.companyname.NewApp.Android"
},
"iOSAppIdentifierReplacer": {
"type": "generated",
"generator": "coalesce",
"parameters": {
"sourceVariableName": "iOSAppIdentifier",
"fallbackVariableName": "AppIdentifier"
},
"replaces": "com.companyname.NewApp.iOS"
},
"WindowsSdk": {
"type": "parameter",
"description": "Windows SDK Target Version. Minimum Version is Fall Creator's Update (10.0.16278).",
"dataType": "string",
"replaces": "WindowsSdk"
},
"AndroidSDKVersion": {
"type": "parameter",
"datatype": "string",
"replaces": "AndroidSDKVersion",
"defaultValue": "v9.0"
},
"TargetAndroidAPI": {
"type": "parameter",
"datatype": "string",
"replaces": "TargetAndroidAPI",
"defaultValue": "28"
},
"MinAndroidAPI": {
"type": "parameter",
"datatype": "int",
"replaces": "MinAndroidAPI",
"defaultValue": "21"
},
"SupportLibVersion": {
"type": "parameter",
"datatype": "string",
"replaces": "SupportLibVersion",
"defaultValue": "28.0.0.1"
},
"IncludeXamarinEssentials": {
"type": "parameter",
"dataType": "bool",
"defaultValue": "true"
},
"XamarinEssentialsSdk": {
"type": "parameter",
"dataType": "string",
"replaces": "XamarinEssentialsSdk",
"defaultValue": "1.3.0-pre"
},
"CometSdk": {
"type": "parameter",
"dataType": "string",
"replaces": "CometSdk",
"defaultValue": "0.1.7364-beta"
},
"CometReloadSdk": {
"type": "parameter",
"dataType": "string",
"replaces": "CometReloadSdk",
"defaultValue": "0.0.9-alpha"
},
"ProjectID": {
"type": "generated",
"generator": "guid",
"replaces": "Project_ID"
},
"UserID": {
"type": "generated",
"generator": "guid",
"replaces": "User_ID"
},
"IISPort": {
"type": "generated",
"generator": "port",
"replaces": "IISPortNum"
},
"SSLPort": {
"type": "generated",
"generator": "port",
"replaces": "SSLPortNum"
},
// Project Symbols
"CreateSharedProject": {
"type": "parameter",
"dataType": "bool",
"defaultValue": "true"
},
"CreateiOSProject": {
"type": "parameter",
"dataType": "bool",
"defaultValue": "true"
},
"CreateMacProject": {
"type": "parameter",
"dataType": "bool",
"defaultValue": "false"
},
"CreateAndroidProject": {
"type": "parameter",
"dataType": "bool",
"defaultValue": "true"
},
"CreateUWPProject": {
"type": "parameter",
"dataType": "bool",
"defaultValue": "false"
},
"CreateBackendProject": {
"type": "parameter",
"dataType": "bool",
"defaultValue": "false"
},
"CreateUITestProject": {
"type": "parameter",
"dataType": "bool",
"defaultValue": "false"
},
"OpenXaml": {
"type": "parameter",
"dataType": "bool",
"defaultValue": "true"
},
"OpenXamlCs": {
"type": "parameter",
"dataType": "bool",
"defaultValue": "true"
},
"LibraryProjectName": {
"type": "parameter",
"dataType": "string",
"replaces": "LibraryProjectName"
}
},
"postActions": [
{
"condition": "OpenMainCs",
"description": "Opens MainPage.cs in the editor.",
"manualInstructions": [],
"actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6",
"args": {
"files": "0"
},
"continueOnError": true
},
{
"condition": "OpenReadme",
"description": "Opens README.md in the editor.",
"manualInstructions": [],
"actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6",
"args": {
"files": "1"
},
"continueOnError": true
}
],
"sources": [
{
"modifiers": [
{
"condition": "(!CreateSharedProject)",
"exclude": "NewApp/**/*"
},
{
"condition": "(!CreateiOSProject)",
"exclude": [
"NewApp.iOS/**/*"
]
},
{
"condition": "(!CreateAndroidProject)",
"exclude": [
"NewApp.Android/**/*"
]
},
{
"condition": "(!CreateUWPProject)",
"exclude": [
"NewApp.UWP/**/*"
]
},
{
"condition": "(!CreateMacProject)",
"exclude": [
"NewApp.macOS/**/*"
]
}
]
},
{
"source": "../quickstart/",
"condition": "(kind == \"quickstart\")",
"modifiers": [
{
"condition": "(!CreateiOSProject)",
"exclude": [
"NewApp/NewApp.csproj"
]
},
{
"condition": "(!CreateiOSProject)",
"exclude": [
"NewApp.iOS/**/*"
]
},
{
"condition": "(!CreateAndroidProject)",
"exclude": [
"NewApp.Android/**/*"
]
},
{
"condition": "(!CreateUWPProject)",
"exclude": [
"NewApp.UWP/**/*"
]
},
{
"condition": "(!CreateMacProject)",
"exclude": [
"NewApp.macOS/**/*"
]
}
]
}
]
}
17 changes: 17 additions & 0 deletions templates/comet-templates.nuspec
@@ -0,0 +1,17 @@
<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata>
<id>Comet.Templates.Multiplatform</id>
<title>Comet Template Pack</title>
<version>0.0.1</version>
<authors>James Clancey</authors>
<description>Templates for building iOS apps with Comet.</description>
<projectUrl>https://github.com/Clancey/Comet</projectUrl>
<licenseUrl>https://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm</licenseUrl>
<iconUrl>https://xamarin.com/content/images/nuget/xamarin.png</iconUrl>
<copyright>Copyright 2019</copyright>
<packageTypes>
<packageType name="Template" />
</packageTypes>
</metadata>
</package>

0 comments on commit 4ea2b80

Please sign in to comment.