Skip to content

Commit

Permalink
migrated to dotnet script for better intellisence and debugging insid…
Browse files Browse the repository at this point in the history
…e VSCode
  • Loading branch information
RicardoNiepel committed Sep 11, 2018
1 parent 010250d commit 974e1b7
Show file tree
Hide file tree
Showing 12 changed files with 52 additions and 121 deletions.
13 changes: 9 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
# ScriptCS
scriptcs_packages

# VisualStudioCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

scripts/.vscode/*
!scripts/.vscode/settings.json
!scripts/.vscode/tasks.json
!scripts/.vscode/launch.json
!scripts/.vscode/extensions.json

# Custom
source/official/*
!source/official/README.md
!source/official/README.md

dist/table.md
11 changes: 11 additions & 0 deletions Azure-PlantUML.code-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"folders": [
{
"path": "scripts"
},
{
"path": "."
}
],
"settings": {}
}
93 changes: 0 additions & 93 deletions dist/table.md

This file was deleted.

18 changes: 18 additions & 0 deletions scripts/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"version": "0.2.0",
"configurations": [
{
"name": ".NET Script Debug",
"type": "coreclr",
"request": "launch",
"program": "dotnet",
"args": [
"exec",
"${env:USERPROFILE}/.dotnet/tools/.store/dotnet-script/0.26.1/dotnet-script/0.26.1/tools/netcoreapp2.1/any/dotnet-script.dll",
"${file}"
],
"cwd": "${workspaceFolder}",
"stopAtEntry": true
}
]
}
7 changes: 3 additions & 4 deletions scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@ If you want to have customized builds and/or experiment with Azure-PlantUML, you

## Prerequisites

* You need [scriptcs](http://scriptcs.net/) installed for executing the scripts
* You need [dotnet script](https://github.com/filipw/dotnet-script) installed for executing the scripts
* You also need to download the [Microsoft Azure, Cloud and Enterprise Symbol / Icon Set](http://aka.ms/CnESymbols) and copy all files from `Symbols\CnE_Cloud\SVG` to [source/official](../source/official)
* TO have all third party libraries available, it is necessary to execute `scriptcs -install`

## Configure

It is required to have [PlantUML](http://plantuml.com/) and [Inkscape](https://inkscape.org/) installed.
Please make sure, that the following variables at the beginning of `Process.csx` are correct configured for your system:
Please make sure, that the following variables at the beginning of `main.csx` are correct configured for your system:

```csharp
var plantUmlPath = @"C:\ProgramData\chocolatey\lib\plantuml\tools\plantuml.jar";
Expand All @@ -28,7 +27,7 @@ On top each Azure service is mapped to his primary category.
You can just execute

```text
scriptcs Process.csx`
dotnet script main.csx
```

### What happens
Expand Down
2 changes: 1 addition & 1 deletion scripts/lib/Config.csx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#r "YamlDotNet"
#r "nuget: YamlDotNet, 5.0.1"

using System.Linq;
using YamlDotNet.Serialization;
Expand Down
2 changes: 1 addition & 1 deletion scripts/lib/Grayscale.csx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#r "System.Drawing"
#r "nuget: System.Drawing.Common, 4.5.0"

using System.Drawing;
using System.Drawing.Imaging;
Expand Down
2 changes: 1 addition & 1 deletion scripts/lib/VSCodeSnippets.csx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#r "Newtonsoft.Json"
#r "nuget: Newtonsoft.Json, 11.0.2"

using System.Text.RegularExpressions;
using Newtonsoft.Json;
Expand Down
8 changes: 2 additions & 6 deletions scripts/Process.csx → scripts/main.csx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#! "netcoreapp2.0"

#load "lib/Config.csx"
#load "lib/Grayscale.csx"
#load "lib/Colorize.csx"
Expand Down Expand Up @@ -28,12 +30,6 @@ public void Main()
var lookupTable = ReadConfig("Config.yaml");

// Cleanup
//System.IO.DirectoryInfo di = new DirectoryInfo(targetFolder);
// foreach (DirectoryInfo dir in di.GetDirectories())
// {
// dir.Delete(true);
// }
//di.Delete(true);
if (Directory.Exists(targetFolder))
{
Directory.Delete(targetFolder, true);
Expand Down
6 changes: 6 additions & 0 deletions scripts/omnisharp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"script": {
"enableScriptNuGetReferences": true,
"defaultTargetFramework": "netcoreapp2.1"
}
}
6 changes: 0 additions & 6 deletions scripts/scriptcs_nuget.config

This file was deleted.

5 changes: 0 additions & 5 deletions scripts/scriptcs_packages.config

This file was deleted.

0 comments on commit 974e1b7

Please sign in to comment.