mirror of
https://github.com/nsnail/dot.git
synced 2025-06-17 21:13:21 +08:00
<chore>
This commit is contained in:
parent
254e6f2a45
commit
e82626ded5
14
add-meta-files-to-sln.csx
Normal file
14
add-meta-files-to-sln.csx
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
using System.Text.RegularExpressions;
|
||||||
|
|
||||||
|
var slnFile = Directory.GetFiles(@".", "*.sln").First();
|
||||||
|
var content = File.ReadAllText(slnFile);
|
||||||
|
content = Regex.Replace(content,@"ProjectSection\(SolutionItems\) = preProject(?:.|\n)*?EndProjectSection",
|
||||||
|
$"""
|
||||||
|
ProjectSection(SolutionItems) = preProject
|
||||||
|
{string.Join('\n',
|
||||||
|
Directory.GetFiles(@".", "*").Where(x => !x.EndsWith(".sln"))
|
||||||
|
.Select(x=>$"\t\t{Path.GetFileName(x)} = {Path.GetFileName(x)}"))}
|
||||||
|
{'\t'}EndProjectSection
|
||||||
|
""");
|
||||||
|
Console.WriteLine(content);
|
||||||
|
File.WriteAllText(slnFile, content);
|
26
dot.sln
26
dot.sln
@ -7,22 +7,24 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dot", "src\dot.csproj", "{E
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "meta", "meta", "{AD79881E-74D9-4EC7-AFE9-82D10CD32C3A}"
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "meta", "meta", "{AD79881E-74D9-4EC7-AFE9-82D10CD32C3A}"
|
||||||
ProjectSection(SolutionItems) = preProject
|
ProjectSection(SolutionItems) = preProject
|
||||||
.gitignore = .gitignore
|
|
||||||
dot.sln.DotSettings = dot.sln.DotSettings
|
|
||||||
.gitattributes = .gitattributes
|
|
||||||
.editorconfig = .editorconfig
|
.editorconfig = .editorconfig
|
||||||
|
.gitattributes = .gitattributes
|
||||||
|
.gitignore = .gitignore
|
||||||
|
.tgitconfig = .tgitconfig
|
||||||
|
add-meta-files-to-sln.csx = add-meta-files-to-sln.csx
|
||||||
|
build.ps1 = build.ps1
|
||||||
|
code-cleanup-on-save.csx = code-cleanup-on-save.csx
|
||||||
|
code-format.cmd = code-format.cmd
|
||||||
|
Directory.Build.props = Directory.Build.props
|
||||||
|
dot.sln.DotSettings = dot.sln.DotSettings
|
||||||
|
dotnet-tools.json = dotnet-tools.json
|
||||||
|
GenerateResx.targets = GenerateResx.targets
|
||||||
|
git-clean.ps1 = git-clean.ps1
|
||||||
|
global.json = global.json
|
||||||
LICENSE = LICENSE
|
LICENSE = LICENSE
|
||||||
README.md = README.md
|
README.md = README.md
|
||||||
README.zh-CN.md = README.zh-CN.md
|
README.zh-CN.md = README.zh-CN.md
|
||||||
Directory.Build.props = Directory.Build.props
|
safe-delete-unused-resx.ahk = safe-delete-unused-resx.ahk
|
||||||
global.json = global.json
|
|
||||||
dotnet-tools.json = dotnet-tools.json
|
|
||||||
build.ps1 = build.ps1
|
|
||||||
.tgitconfig = .tgitconfig
|
|
||||||
git-clean.ps1 = git-clean.ps1
|
|
||||||
code-format.cmd = code-format.cmd
|
|
||||||
GenerateResx.targets = GenerateResx.targets
|
|
||||||
code-cleanup-on-save.csx = code-cleanup-on-save.csx
|
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
|
Loading…
x
Reference in New Issue
Block a user