Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[POC] Add Safe.Plugin.Template #2

Draft
wants to merge 17 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
976 changes: 488 additions & 488 deletions .paket/Paket.Restore.targets

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion paket.dependencies
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
source https://api.nuget.org/v3/index.json
framework: netcoreapp3.1, netstandard2.0
framework: netcoreapp3.1, netstandard2.0, netstandard2.1

nuget McMaster.NETCore.Plugins
nuget FSharp.Core
Expand Down
805 changes: 404 additions & 401 deletions paket.lock

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions src/SAFE.Plugin.Template/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.fake/
.ionide/
bin/
obj/
nupkg/
packages/
paket-files/
488 changes: 488 additions & 0 deletions src/SAFE.Plugin.Template/.paket/Paket.Restore.targets

Large diffs are not rendered by default.

24 changes: 24 additions & 0 deletions src/SAFE.Plugin.Template/Content/.config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"version": 1,
"isRoot": true,
"tools": {
"safe.tool": {
"version": "0.0.6",
"commands": [
"safe"
]
},
"paket": {
"version": "6.0.0-alpha014",
"commands": [
"paket"
]
},
"fake-cli": {
"version": "5.19.0",
"commands": [
"fake"
]
}
}
}
8 changes: 8 additions & 0 deletions src/SAFE.Plugin.Template/Content/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
root = true

[*]
indent_style = space
indent_size = 4
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = false
16 changes: 16 additions & 0 deletions src/SAFE.Plugin.Template/Content/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.fable/
.fake/
.vs/
obj/
bin/
packages/
paket-files/
node_modules/
src/Client/public/js/
release.cmd
release.sh
.idea/
*.orig
*.DotSettings.user
deploy
.ionide/
494 changes: 494 additions & 0 deletions src/SAFE.Plugin.Template/Content/.paket/Paket.Restore.targets

Large diffs are not rendered by default.

152 changes: 152 additions & 0 deletions src/SAFE.Plugin.Template/Content/.template.config/template.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
{
"$schema": "http://json.schemastore.org/template",
"author": "Michał Niegrzybowski",
"classifications": [
"SAFE",
"SAFE-Stack",
"SAFE-Plugin"
],
"name": "SAFE-Stack Plugin v0.0.1",
"tags": {
"language": "F#",
"type": "project"
},
"identity": "SAFE.Plugin.Template",
"shortName": "SAFEPlugin",
"sourceName": "SAFE.Plugin.Template",
"symbols": {
"creator": {
"type": "parameter",
"datatype": "text",
"replaces": "Michał Niegrzybowski",
"defaultValue": "Robert Kubica EEEEEEEEE"
},
"createdate": {
"type": "generated",
"generator": "now",
"parameters": {
"format": "yyyy-MM-dd"
},
"replaces":"1970-01-01"
},
"target": {
"type": "parameter",
"datatype": "choice",
"defaultValue": "shared",
"choices": [
{
"choice": "shared",
"description": "plugin made for shared part of an application."
},
{
"choice": "client",
"description": "plugin made for client part of an application."
},
{
"choice": "server",
"description": "plugin made for server part of an application."
},
{
"choice": "sersha",
"description": "plugin made for server and shared part of an application."
},
{
"choice": "sercli",
"description": "plugin made for server and client part of an application."
},
{
"choice": "clisha",
"description": "plugin made for client and shared part of an application."
},
{
"choice": "all",
"description": "plugin made for server, client and shared part of an application."
}
]
},
"shared": {
"type": "computed",
"value": "(target == \"shared\" || target == \"clisha\" || target == \"sersha\") || target == \"all\""
},
"server": {
"type": "computed",
"value": "(target == \"server\" || target == \"sercli\" || target == \"sersha\") || target == \"all\""
},
"client": {
"type": "computed",
"value": "(target == \"client\" || target == \"clisha\" || target == \"sercli\") || target == \"all\""
}
},
"sources": [
{
"exclude": [
"**/.template.config/**/*",
"**/src/Server/**/*",
"**/src/Client/**/*",
"**/src/Shared/**/*"
],
"modifiers": [
{
"include": ["**/src/Server/**/*"],
"condition": "(server)"
},
{
"include": ["**/src/Client/**/*"],
"condition": "(client)"
},
{
"include": ["**/src/Shared/**/*"],
"condition": "(shared)"
}
]
}
],
"SpecialCustomOperations": {
"**/paket.*": {
"operations": [
{
"type": "conditional",
"configuration": {
"if": [
"#if"
],
"else": [
"#else"
],
"elseif": [
"#elseif"
],
"endif": [
"#endif"
],
"trim": "true",
"wholeLine": "true"
}
}
]
},
"**/*.fs*": {
"operations": [
{
"type": "conditional",
"configuration": {
"if": [
"#if"
],
"else": [
"#else"
],
"elseif": [
"#elseif"
],
"endif": [
"#endif"
],
"trim": "true",
"wholeLine": "true"
}
}
]
}
}
}
44 changes: 44 additions & 0 deletions src/SAFE.Plugin.Template/Content/SAFE.Plugin.Template.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27004.2005
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{08CCFCF6-2248-43ED-A6EF-E972A2DA0E6A}"
ProjectSection(SolutionItems) = preProject
paket.dependencies = paket.dependencies
EndProjectSection
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Shared", "src\Shared\SAFE.SAFE.Plugin.Template.Shared.fsproj", "{8410F039-8343-4391-B566-4AFF5C87162C}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Plugin", "src\Plugin\SAFE.SAFE.Plugin.Template.fsproj", "{B02CD397-2DD7-4AF0-B257-8AEC18E439BA}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{73E8E820-C8AA-47CC-BB2B-152CA4D0B855}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{73E8E820-C8AA-47CC-BB2B-152CA4D0B855}.Debug|Any CPU.Build.0 = Debug|Any CPU
{73E8E820-C8AA-47CC-BB2B-152CA4D0B855}.Release|Any CPU.ActiveCfg = Release|Any CPU
{73E8E820-C8AA-47CC-BB2B-152CA4D0B855}.Release|Any CPU.Build.0 = Release|Any CPU
{73E8E820-C8AA-47CC-BB2B-152CA4D0B856}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{73E8E820-C8AA-47CC-BB2B-152CA4D0B856}.Debug|Any CPU.Build.0 = Debug|Any CPU
{73E8E820-C8AA-47CC-BB2B-152CA4D0B856}.Release|Any CPU.ActiveCfg = Release|Any CPU
{73E8E820-C8AA-47CC-BB2B-152CA4D0B856}.Release|Any CPU.Build.0 = Release|Any CPU
{8410F039-8343-4391-B566-4AFF5C87162C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8410F039-8343-4391-B566-4AFF5C87162C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8410F039-8343-4391-B566-4AFF5C87162C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8410F039-8343-4391-B566-4AFF5C87162C}.Release|Any CPU.Build.0 = Release|Any CPU
{B02CD397-2DD7-4AF0-B257-8AEC18E439BA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B02CD397-2DD7-4AF0-B257-8AEC18E439BA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B02CD397-2DD7-4AF0-B257-8AEC18E439BA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B02CD397-2DD7-4AF0-B257-8AEC18E439BA}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {7A0AA30E-4CD9-4359-9513-BA68E2E85245}
EndGlobalSection
EndGlobal
41 changes: 41 additions & 0 deletions src/SAFE.Plugin.Template/Content/build.fsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
open System.IO
#r "paket: groupref build //"
#load "./.fake/build.fsx/intellisense.fsx"

#if !FAKE
#r "netstandard"
#r "Facades/netstandard" // https://github.com/ionide/ionide-vscode-fsharp/issues/839#issuecomment-396296095
#endif

open System

open Fake.Core
open Fake.DotNet
open Fake.IO
open Fake.Tools

//Target.create "Clean" (fun _ ->
//Git.CommandHelper.directRunGitCommandAndFail "." "clean -fxd"
//)

Target.create "Build" (fun _ ->
let projects =
DirectoryInfo(__SOURCE_DIRECTORY__).GetDirectories "src"
|> Array.tryHead
|> fun src ->
match src with
| Some dir -> DirectoryInfo.getMatchingFilesRecursive "*.fsproj" dir
| None -> [||]

projects
|> Array.iter (fun proj ->
let result = DotNet.exec (fun x -> { x with DotNetCliPath = "dotnet" }) "build" proj.FullName
if not result.OK then failwithf "`dotnet build %s failed with %O" proj.Name result
)
)

open Fake.Core.TargetOperators

"Build"

Target.runOrDefaultWithArguments "Build"
16 changes: 16 additions & 0 deletions src/SAFE.Plugin.Template/Content/paket.dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
group Build

source C:\git\SAFE\nupkg
source ~/Desktop/Repositories/github/SAFE/nupkg
source https://api.nuget.org/v3/index.json
framework: netcoreapp3.1, netstandard2.0

nuget FSharp.Core
nuget Fake.Core.ReleaseNotes
nuget Fake.Core.Target
nuget Fake.DotNet.Cli
nuget Fake.DotNet.Paket
nuget Fake.IO.FileSystem
nuget Fake.Tools.Git
nuget SAFE
nuget FSharp.Core
Loading