Skip to content

Commit

Permalink
Merge pull request #24 from SilkyFowl/dev
Browse files Browse the repository at this point in the history
 v0.0.3 release.
  • Loading branch information
SilkyFowl committed Aug 28, 2023
2 parents 9ec7514 + e189bb3 commit e2c7270
Show file tree
Hide file tree
Showing 30 changed files with 1,115 additions and 340 deletions.
5 changes: 3 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"editor.inlayHints.enabled": "offUnlessPressed",
// see: https://github.com/fsharp/FsAutoComplete/commit/81c1341b44934dcfa56361377f31a285a90af3df
"omnisharp.autoStart": false,
"FSharp.enableAnalyzers": true,
"FSharp.analyzersPath": [
"packages/Analyzers",
"analyzers",
"localanalyzers"
"analyzers"
]
}
2 changes: 0 additions & 2 deletions Avalonia.FuncUI.LiveView.sln
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@ Global
{20DD3B4D-46C8-4F78-B114-6ED2CCAA1433}.Release|Any CPU.ActiveCfg = Release|Any CPU
{20DD3B4D-46C8-4F78-B114-6ED2CCAA1433}.Release|Any CPU.Build.0 = Release|Any CPU
{049BAB3B-2D97-4B66-94C9-7E5E8F85171C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{049BAB3B-2D97-4B66-94C9-7E5E8F85171C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{049BAB3B-2D97-4B66-94C9-7E5E8F85171C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{049BAB3B-2D97-4B66-94C9-7E5E8F85171C}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{AA59F86F-40EC-4935-928E-ACE854A73DE4} = {DB8DF710-E6E6-4722-99D4-514834AEEB16}
Expand Down
43 changes: 43 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<Project>
<!-- Build Settings -->
<PropertyGroup>
<BuildInParallel>true</BuildInParallel>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<PackageOutputPath>$(MSBuildThisFileDirectory)dist</PackageOutputPath>
</PropertyGroup>

<!-- Package Properties -->
<PropertyGroup>
<PackageId>SilkyFowl.$(MSBuildProjectName)</PackageId>
<Title>SilkyFowl.$(MSBuildProjectName)</Title>
<Product>SilkyFowl.$(MSBuildProjectName)</Product>
<Description>Live fs/fsx previewer for Avalonia.FuncUI.</Description>
<PackageReadmeFile>README.md</PackageReadmeFile>
<Authors>SilkyFowl</Authors>
<Copyright>Copyright (c) 2022 SilkyFowl</Copyright>
<PackageLicenseFile>LICENSE.md</PackageLicenseFile>
<PackageProjectUrl>https://github.com/SilkyFowl/Avalonia.FuncUI.LiveView</PackageProjectUrl>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<RepositoryUrl>https://github.com/SilkyFowl/Avalonia.FuncUI.LiveView.git</RepositoryUrl>
<RepositoryType>git</RepositoryType>

<!-- Read RELEASE_NOTES.md. -->
<_ReleaseNotesContent>$([System.IO.File]::ReadAllText("$(MSBuildThisFileDirectory)RELEASE_NOTES.md"))</_ReleaseNotesContent>
<_LastestReleaseNoteContent>$([System.Text.RegularExpressions.Regex]::Split($(_ReleaseNotesContent), "\n### \d+-?(\w+\d+)?")[0])</_LastestReleaseNoteContent>
<_Pattern>([\d+\.]+\d+)-?(\w+\d+)?(?:\r?\n){2}((?:[^\n]+\n)+)</_Pattern>
<_VersionPrefixString>$([System.Text.RegularExpressions.Regex]::Match( $(_LastestReleaseNoteContent), $(_Pattern)).Groups[1].Value)</_VersionPrefixString>
<_VersionSuffixString>$([System.Text.RegularExpressions.Regex]::Match( $(_LastestReleaseNoteContent), $(_Pattern)).Groups[2].Value)</_VersionSuffixString>
<!-- version from RELEASE_NOTES.md. -->
<VersionPrefix Condition="$(_VersionPrefixString) != ''" >$(_VersionPrefixString)</VersionPrefix>
<VersionSuffix Condition="$(_VersionSuffixString) != ''" >$(_VersionSuffixString)</VersionSuffix>
<!-- releaseNotes from RELEASE_NOTES.md. -->
<PackageReleaseNotes>$([System.Text.RegularExpressions.Regex]::Match( $(_LastestReleaseNoteContent), $(_Pattern)).Groups[3].Value)</PackageReleaseNotes>
</PropertyGroup>

<!-- Package assets -->
<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)LICENSE.md" Pack="true" PackagePath=""/>
<None Include="$(MSBuildThisFileDirectory)README.md" Pack="true" PackagePath=""/>
<None Include="$(MSBuildThisFileDirectory)github\img\README\*.png" Pack="true" PackagePath="github\img\README"/>
</ItemGroup>
</Project>
62 changes: 31 additions & 31 deletions README.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
[Ionide.Ionide-fsharp]: https://marketplace.visualstudio.com/items?itemName=Ionide.Ionide-fsharp
[FsAutoComplete]: https://github.com/fsharp/FsAutoComplete
[Enjoy-It!!]: https://user-images.githubusercontent.com/16532218/174063805-0d8db77d-f408-4639-aced-d38a38145685.mp4
[funcUi-analyzer]: github/img/README.ja/funcUi-analyzer.png
[cant-analyze-du]: github/img/README.ja/cant-analyze-du.png
[install-Ionide.Ionide-fsharp]: github/img/README.ja/install-Ionide.Ionide-fsharp.png
[First-Debug]: github/img/README.ja/First-Debug.png
[First-Debug-success]: github/img/README.ja/First-Debug-success.png
[DU-with-any-no-value-case]: github/img/README.ja/DU-with-any-no-value-case.png
[fsx-in-explorer]: github/img/README.ja/fsx-in-explorer.png
[there-is-no-fsx-in-fs-explorer]: github/img/README.ja/there-is-no-fsx-in-fs-explorer.png
[funcUi-analyzer]: github/img/README/funcUi-analyzer.png
[cant-analyze-du]: github/img/README/cant-analyze-du.png
[install-Ionide.Ionide-fsharp]: github/img/README/install-Ionide.Ionide-fsharp.png
[First-Debug]: github/img/README/First-Debug.png
[First-Debug-success]: github/img/README/First-Debug-success.png
[DU-with-any-no-value-case]: github/img/README/DU-with-any-no-value-case.png
[fsx-in-explorer]: github/img/README/fsx-in-explorer.png
[there-is-no-fsx-in-fs-explorer]: github/img/README/there-is-no-fsx-in-fs-explorer.png

# Avalonia.FuncUI.LiveView

Expand Down Expand Up @@ -55,15 +55,14 @@ AnalyzerとLivePreviewの通信で`localhost:8080`を使用します。
```sh
mkdir YourFuncUIApp
cd YourFuncUIApp
dotnet new tool-manifest
dotnet new gitignore
code .
```

プロジェクトを作成します。

プロジェクトを作成していきます。

```sh
dotnet new tool-manifest
dotnet new gitignore
dotnet new sln
dotnet new console -o ./src/YourFuncUIApp -lang f#
dotnet sln add ./src/YourFuncUIApp/YourFuncUIApp.fsproj
Expand Down Expand Up @@ -108,12 +107,7 @@ nuget FSharp.Core content: none
nuget Avalonia.FuncUI 1.0.1
nuget Avalonia.Desktop 11.0.3
nuget Avalonia.Themes.Fluent 11.0.3
nuget SilkyFowl.Avalonia.FuncUI.LiveView 0.0.1.1
group Analyzers
source https://api.nuget.org/v3/index.json
storage: storage
nuget SilkyFowl.Avalonia.FuncUI.LiveView.Analyzer 0.0.1.1
nuget SilkyFowl.Avalonia.FuncUI.LiveView 0.0.3
```


Expand Down Expand Up @@ -146,20 +140,16 @@ dotnet paket install
<PackageReference Include="Avalonia.Desktop" Version="11.0.3" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.3" />
<PackageReference Include="Avalonia.FuncUI" Version="1.0.1" />
<PackageReference Include="SilkyFowl.Avalonia.FuncUI.LiveView" Version="0.0.1.1" />
<!-- MessagePackのバージョン指定しないと古いライブラリが参照されてしまう。 -->
<PackageReference Include="MessagePack" Version="2.5.124" />
<PackageReference Include="SilkyFowl.Avalonia.FuncUI.LiveView" Version="0.0.3" />
</ItemGroup>
</Project>
```

`nuget`でアナライザをインストールします。

```sh
nuget install SilkyFowl.Avalonia.FuncUI.LiveView.Analyzer -Version 0.0.1.1 -OutputDirectory packages/analyzers
dotnet restore
```

### 動作確認
#### コードを書く

`Program.fs`を以下のように書き換えます。

Expand Down Expand Up @@ -324,22 +314,32 @@ dotnet run --project ./src/YourFuncUIApp/YourFuncUIApp.fsproj

```json
{
"FSharp.enableAnalyzers": true,
"FSharp.analyzersPath": [
"packages/analyzers"
],
"FSharp.enableAnalyzers": true
}
```

ここでデバッガを起動して、動作するのを確認してください
ここでデバッガを起動して、設定によって動作するのを確認してください

![First-Debug]

起動したら次へ進みます。

![First-Debug-success]

### FuncUI Analyzerの動作確認

### FuncUI Analyzerのセットアップ

アナライザをインストールします。

> **Warning**
> v0.0.3からSilkyFowl.Avalonia.FuncUI.LiveView.Analyzerのインストール方法が変わりました。
```sh
dotnet tool install SilkyFowl.Avalonia.FuncUI.LiveView.Analyzer --version 0.0.3 --tool-path analyzers
```


#### FuncUI Analyzerの動作確認

- `FSharp.enableAnalyzers``true`
- `FSharp.analyzersPath`にAnalyzerのDllが存在する
Expand Down
54 changes: 27 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
[Ionide.Ionide-fsharp]: https://marketplace.visualstudio.com/items?itemName=Ionide.Ionide-fsharp
[FsAutoComplete]: https://github.com/fsharp/FsAutoComplete
[Enjoy-It!!]: https://user-images.githubusercontent.com/16532218/174063805-0d8db77d-f408-4639-aced-d38a38145685.mp4
[funcUi-analyzer]: github/img/README.ja/funcUi-analyzer.png
[cant-analyze-du]: github/img/README.ja/cant-analyze-du.png
[install-Ionide.Ionide-fsharp]: github/img/README.ja/install-Ionide.Ionide-fsharp.png
[First-Debug]: github/img/README.ja/First-Debug.png
[First-Debug-success]: github/img/README.ja/First-Debug-success.png
[DU-with-any-no-value-case]: github/img/README.ja/DU-with-any-no-value-case.png
[fsx-in-explorer]: github/img/README.ja/fsx-in-explorer.png
[there-is-no-fsx-in-fs-explorer]: github/img/README.ja/there-is-no-fsx-in-fs-explorer.png
[funcUi-analyzer]: github/img/README/funcUi-analyzer.png
[cant-analyze-du]: github/img/README/cant-analyze-du.png
[install-Ionide.Ionide-fsharp]: github/img/README/install-Ionide.Ionide-fsharp.png
[First-Debug]: github/img/README/First-Debug.png
[First-Debug-success]: github/img/README/First-Debug-success.png
[DU-with-any-no-value-case]: github/img/README/DU-with-any-no-value-case.png
[fsx-in-explorer]: github/img/README/fsx-in-explorer.png
[there-is-no-fsx-in-fs-explorer]: github/img/README/there-is-no-fsx-in-fs-explorer.png

# Avalonia.FuncUI.LiveView

Expand Down Expand Up @@ -55,15 +55,15 @@ Create a working directory and launch VScode.
```sh
mkdir YourFuncUIApp
cd YourFuncUIApp
dotnet new tool-manifest
dotnet new gitignore
code .
```

Create a project.


```sh
dotnet new tool-manifest
dotnet new gitignore
dotnet new sln
dotnet new console -o ./src/YourFuncUIApp -lang f#
dotnet sln add ./src/YourFuncUIApp/YourFuncUIApp.fsproj
Expand Down Expand Up @@ -108,12 +108,7 @@ nuget FSharp.Core content: none
nuget Avalonia.FuncUI 1.0.1
nuget Avalonia.Desktop 11.0.3
nuget Avalonia.Themes.Fluent 11.0.3
nuget SilkyFowl.Avalonia.FuncUI.LiveView 0.0.1.1
group Analyzers
source https://api.nuget.org/v3/index.json
storage: storage
nuget SilkyFowl.Avalonia.FuncUI.LiveView.Analyzer 0.0.1.1
nuget SilkyFowl.Avalonia.FuncUI.LiveView 0.0.3
```


Expand Down Expand Up @@ -146,20 +141,16 @@ Add a dependency to `YourFuncUIApp.fsproj` as follows:
<PackageReference Include="Avalonia.Desktop" Version="11.0.3" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.3" />
<PackageReference Include="Avalonia.FuncUI" Version="1.0.1" />
<PackageReference Include="SilkyFowl.Avalonia.FuncUI.LiveView" Version="0.0.1.1" />
<!-- If no MessagePack version specified, old libraries referenced. -->
<PackageReference Include="MessagePack" Version="2.5.124" />
<PackageReference Include="SilkyFowl.Avalonia.FuncUI.LiveView" Version="0.0.3" />
</ItemGroup>
</Project>
```

Install analyzer with `nuget`.

```sh
nuget install SilkyFowl.Avalonia.FuncUI.LiveView.Analyzer -Version 0.0.1.1 -OutputDirectory packages/analyzers
dotnet restore
```

### Checking behavior
### Write code

Rewrite `Program.fs` as follows:

Expand Down Expand Up @@ -324,10 +315,7 @@ dotnet run --project ./src/YourFuncUIApp/YourFuncUIApp.fsproj

```json
{
"FSharp.enableAnalyzers": true,
"FSharp.analyzersPath": [
"packages/analyzers"
],
"FSharp.enableAnalyzers": true
}
```

Expand All @@ -339,6 +327,18 @@ When launched, proceed to the next step.

![First-Debug-success]


### Setting up FuncUI Analyzer

Install Analyzer.

> **Warning**
> Installation of SilkyFowl.Avalonia.FuncUI.LiveView.Analyzer has changed since v0.0.3.
```sh
dotnet tool install SilkyFowl.Avalonia.FuncUI.LiveView.Analyzer --version 0.0.3 --tool-path analyzers
```

### Check if FuncUI Analyzer works

- `FSharp.enableAnalyzers` is true
Expand Down
29 changes: 29 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,36 @@
### 0.0.3

* Stable release.

### 0.0.3-preview01

* breaking: Analyzer changed from library to dotnet-tool.
* paket
* change resolver strategy max to min.
* see:http://fsprojects.github.io/Paket/nuget-dependencies.html#The-modifier-1
* fix version range.

### 0.0.1.1

* Support Avalonia.FuncUI v1.0.1.

### 0.0.2-preview04

* Support for 1.0.0 of Avalonia.FuncUI.
* Changed to deploy by dotnet tools.

### 0.0.2-preview03

* Fixed a bug that app crashes when displaying LiveViewWindow with SimpleTheme instead of FluentTheme.

### 0.0.2-preview02

* Fix package dependencies.

### 0.0.2-preview01

* Support for 0.6.0-preview9.1 of Avalonia.FuncUI.

### 0.0.1

* This release is to support Avalonia.FuncUI v0.5.x. There are no changes.
Expand Down
Loading

0 comments on commit e2c7270

Please sign in to comment.