F# Template for creating and publishing libraries targeting .NET Full (net461) and Core (netstandard2.0)
MacOS/Linux | Windows |
---|---|
Stable | Prerelease |
---|---|
dotnet new -i "MiniScaffold::*"
dotnet new mini-scaffold -n MyCoolNewLib --githubUsername MyGithubUsername -lang F#
cd MyCoolNewLib
It will scaffold out something similar to:
$ tree /f
.
│ .DS_Store
│ .editorconfig
│ .gitignore
│ .travis.yml
│ appveyor.yml
│ build.cmd
│ build.fsx
│ build.sh
│ MyCoolNewLib.sln
│ LICENSE.md
│ paket.dependencies
│ paket.lock
│ README.md
│ RELEASE_NOTES.md
│
├───.github
│ ISSUE_TEMPLATE.md
│ PULL_REQUEST_TEMPLATE.md
│
├───.paket
│ paket.exe
│ paket.exe.config
│ Paket.Restore.targets
│ paket.targets
│
├───src
│ └───MyCoolNewLib
│ AssemblyInfo.fs
│ MyCoolNewLib.fsproj
│ Library.fs
│ paket.references
│
├───tests
│ └───MyCoolNewLib.Tests
│ AssemblyInfo.fs
│ MyCoolNewLib.Tests.fsproj
│ Main.fs
│ paket.references
│ Tests.fs
│
└───tools
paket.references
tools.csproj
> .\build.cmd // on windows
$ ./build.sh // on unix
The bin of your new lib should look similar to:
$ tree src/MyCoolNewLib/bin/Release
src/MyCoolNewLib/bin/Release/
├── net461
│ ├── FSharp.Core.dll
│ ├── MyLib.dll
│ ├── MyLib.pdb
└── netstandard2.0
├── MyLib.deps.json
├── MyLib.dll
└── MyLib.pdb
The WatchTests
target will use dotnet-watch to watch for changes in your lib or tests and re-run your tests on all TargetFrameworks
./build.sh WatchTests
git add .
git commit -m "Scaffold"
git remote add origin origin https://github.com/user/MyCoolNewLib.git
git push -u origin master
paket config add-token "https://www.nuget.org" 4003d786-cc37-4004-bfdf-c4f3e8ef9b3a
- Then update the
RELEASE_NOTES.md
with a new version, date, and release notes ReleaseNotesHelper
#### 0.2.0 - 2017-04-20
* FEATURE: Does cool stuff!
* BUGFIX: Fixes that silly oversight
- You can then use the
Release
target. This will:- make a commit bumping the version:
Bump version to 0.2.0
and add the release notes to the commit - publish the package to nuget
- push a git tag
- make a commit bumping the version:
./build.sh Release
This is uesd to atomatically configure author information in the nuget package, as well as configure push urls for repo locations.
Defaults to Library
When set to either Console or Library project and the supporting infrastructure around their respective types.
-bash: ./build.sh: Permission denied
This is because dotnet template loses permissions of files. (TheAngryByrd#37) added a post hook to address this but this only fixes it for dotnet sdk 2.x users. dotnet sdk 1.x will need to run chmod +x ./build.sh
- Paket
- FAKE
- Expecto
- Heavily inspired by Project Scaffold
- Buildstats.info
- SourceLink
- AltCover
- ReportGenerator
- Fantomas
- Argu
- dotnet-packaging