arron-green / typelevel-library.g8

Template for starting FP libraries ready to be published

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Typelevel Library Template

Build status Scala Steward badge

This is a Giter8 template for creating libraries ready to be published.

Usage

Using sbt run the following in a terminal:

sbt --sbt-version 1.3.13 new alexandru/typelevel-library.g8

Setting Up GitHub (with main instead of master)

NOTE: the template is set to use main as the default branch, instead of master and this is reflected in the README pixels.

First initialize the local git repository, and do your first commit:

cd $project-folder/

git init

git branch -m master main

git commit -am 'Initial commit'

Create a new repository on GitHub, see github.com/new and add it as your origin:

git remote add origin https://github.com/$GITHUB_USERNAME/$GITHUB_REPOSITORY

git push -u origin main

Next in GitHub:

  • Navigate to your repository > Settings > Branches
  • Select main as your default branch
  • Update your branch protection rules
  • Navigate to Code > Branches and delete master

(Hoping GitHub will soon make this easier)

Configuration of Automatic Releases to Sonatype

The created project already has workflows defined for building and releasing the library on Sonatype via GitHub Actions. For automated releases to work, you need to configure:

To publish the website to GitHub Pages, it is recommended that you first create the gh-pages branch:

git checkout --orphan gh-pages
git rm --cached -r .
touch index.html && git add index.html
git commit -am 'Initial commit'
git push --set-upstream origin gh-pages
git add .
git reset --hard HEAD
git checkout main

Sample Project

See sample library generated out of the box:

Features

Template license

Cloned from scala/scala-seed, inspired by the build definition of Monix and by ChristopherDavenport/library.g8, another template with similar goals.

To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this template to the public domain worldwide. This template is distributed without any warranty. See http://creativecommons.org/publicdomain/zero/1.0/.

About

Template for starting FP libraries ready to be published

License:Creative Commons Zero v1.0 Universal


Languages

Language:Scala 97.5%Language:Shell 2.1%Language:Ruby 0.4%