Coder Social home page Coder Social logo

codelytv / scala-basic-skeleton.g8 Goto Github PK

View Code? Open in Web Editor NEW
15.0 3.0 16.0 53 KB

ฦ›๐Ÿš€ Starting point if you want to bootstrap a project in Scala

Home Page: http://codely.tv/screencasts/scala-sbt-new/

License: MIT License

Scala 73.58% Shell 26.42%
scala sbt bootstrap template hooks editorconfig scalafmt codelytv scalatest skeleton sample g8 codely

scala-basic-skeleton.g8's Introduction

๐Ÿš€ CodelyTV Scala Bootstrap (g8 template)

Software License Build Status

โ„น๏ธ Introduction

This is a Giter8 template intended to serve as a starting point if you want to bootstrap a project in Scala.

It could be useful if you want to start a kata, a little exercise or project from scratch. The idea is that you don't have to worry about the boilerplate, just run sbt new codelytv/scala-basic-skeleton.g8 and you're ready to go:

โ˜๏ธ How To Start

Video screencast (in Spanish)

  1. Install the JDK & SBT tools
  2. Create your new project: sbt new codelytv/scala-basic-skeleton.g8
  3. Set your project parameters. When you run the previous command, you'll be asked for the project parameters such as the Scala language version, the project name and package, and so on.
  4. Move to your project folder and start coding! The template will leave you an example class just to get started quicker in the src/main directory (we avoid the scala default subdirectory because we don't want to split by programming language).
  5. Done! ๐ŸŽ‰๐Ÿฆ„๐ŸŒˆ

You can now move to your project's directory, enter the SBT shell with the sbt command, and run the test example with test or t.

๐Ÿคฝโ€ Pre-push Git hook

There's one Git hook included. It's inside the doc/hooks folder and it will run the prep SBT task before pushing to any remote.

This prep task is intended to run all the checks you consider before pushing. At this very moment, it try to compile and check the code style rules with ScalaFmt.

You can define what this task does modifying the prep task in the build.sbt file. We like the approach of just running 1 single SBT task as the hook instead of multiple tasks because it's more efficient (the hook doesn't have to run SBT multiple times), and also because this way we can control the pre push tasks with the SBT alias defined at the build.sbt without altering the hooks.

If you want to install this hook, just cd doc/hooks and run ./install-hooks.sh.

โ˜•๐Ÿ˜ Other programming languages

  • Java
  • PHP
  • Scala: This other skeleton is not based in the Gitter8 template system. So you can actually clone the repo and just start coding.

โ“ About

This hopefully helpful utility has been developed by CodelyTV and contributors.

We'll try to maintain this project as simple as possible, but Pull Requests are welcome!

โš–๏ธ License

The MIT License (MIT). Please see License File for more information.

scala-basic-skeleton.g8's People

Contributors

albarralnunez avatar gmadorell avatar javiercane avatar othercodes avatar rgomezcasas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

scala-basic-skeleton.g8's Issues

Doc folder disappears when doing sbt new

Expected: when I do sbt new codelytv/scala-bootstrap-template.g8, I expect a doc folder to be created with the hooks.

Actual: when I do sbt new codelytv/scala-bootstrap-template.g8, a doc folder is not created.

Steps to reproduce:

  1. sbt new codelytv/scala-bootstrap-template.g8
  2. accept defaults
  3. cd scala-bootstrap
  4. ls

Error using default versions

Hi!
I've tried to run this basic bootstrap skeleton given the default values but I get an error when doing sbt command:

[error] (Compile / compileIncremental) java.io.IOError: java.lang.RuntimeException: /packages cannot be represented as URI

Used entries:

sbt_version 1.2.6
scala_version 2.12.7
name Scala bootstrap
version 1.0
organization tv.codely
package tv.codely.scala_bootstrap

If I replace scala and sbt versions with latest ones it works properly:

sbt_version 1.3.8
scala_version 2.13.1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.