Skip to content
This repository was archived by the owner on Aug 14, 2023. It is now read-only.
/ play26-template Public archive

Template for Play2.6.x projects, including all official Play Framework dependencies, WebJars and JQuery

License

Notifications You must be signed in to change notification settings

mslinn/play26-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Play Framework 2.6 Template

License GitHub version

Template for Play 2.6.x projects, using Scala 2.12, including all official Play Framework dependencies, JQuery and Bootstrap. Dependency injection is used throughout. A Bootstrap view template is provided, and a plain HTML view template is provided.

Links to the appropriate ScalaCourses.com lectures are provided in each file. The Standard Files and Directories and Improved Template lecture discusses this GitHub project in detail.

Using GitHub?

GitHub Pages

play26Template sets up the GitHub pages branch for your new project. Before you can use it, edit build.sbt and change this line so your GitHub user id and project name are substituted for the placeholders yourGithubId and my-new-project:

git.remoteRepo := "git@github.com:yourGithubId/my-new-project.git"

Now you can publish the Scaladoc for your project with this command:

sbt ";doc ;ghpagesPushSite"

The Scaladoc will be available at a URL of the form:

http://yourGithubId.github.io/my-new-project/latest/api/index.html

The Scaladoc for this template project is here

Try Hub!

With hub and play26Template you can create a new SBT project and a matching GitHub project with only two commands. The setup documented below will supply your GitHub username and password, and will only prompt your for your 2-factor-authentication (2FA) token each time you run it if you set up your GitHub account to use 2FA.

Install Hub

Install Hub on Mac OS:

$ brew install hub

Install Hub on Linux:

$ sudo -H pip install hub

Put your GitHub login credentials in ~/.bash_profile or ~/.profile. Also alias hub as git (hub also executes git commands):

export GITHUB_USER=yourGithubUserName
export GITHUB_PASSWORD=yourPassword
alias git=hub

Reload ~/.bash_profile

$ source `~/.bash_profile`

... or reload ~/.profile

$ source `~/.profile`

Using play26Template with Hub

Create a new SBT project and create a new GitHub project, which hub automatically adds as a git remote:

$ play26Template bigBadProject
$ git create -d "Project description"
two-factor authentication code: 881078
Updating origin
created repository: mslinn/bigBadProject

Now check in the new project:

$ git add -A && git commit -m "Initial checkin" && git push -u origin master

About

Template for Play2.6.x projects, including all official Play Framework dependencies, WebJars and JQuery

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published