Giter Club home page Giter Club logo

hmrc.dc-template-frontend.g8's Introduction

A Giter8 template for creating a HMRC Digital Scala Play 2.7 Frontend Microservice

How to create a new project based on the template?

  • Before generating the project, make sure to use the blank repo creation template when using the jenkins job to create a new repository

  • Install g8 commandline tool (http://www.foundweekends.org/giter8/setup.html)

  • Go to the directory where you want to create the template

  • Agree on a service name

  • Run the following command replacing the relevant elements to match your service name

    g8 hmrc/dc-template-frontend --serviceName="Some Service Frontend" --serviceTargetPort="9999" -o some-service-frontend

    NOTE If for some reason you're having difficulty running giter8 against github (key errors and the likes), try the following after cloning the repo locally:

    g8 file://../dc-template-frontend.g8 --serviceName="Some Service Frontend" --serviceTargetPort="9999" -o target/sandbox/some-service-frontend

    After which your project will be generated here: target/sandbox/some-service-frontend

and then

cd some-service-frontend
git init
git add .
git commit -m start
  • Test generated project using command

    sbt test it:test

How to test the template and generate an example project?

  • Run ./test.sh

An example project will be then created and tested in target/sandbox/some-service-frontend

How to modify the template?

  • review template sources in /src/main/g8
  • modify files as you need, but be careful about placeholders, paths and so on
  • run ./test.sh in template root to validate your changes

or (safer) ...

  • run ./test.sh first
  • open target/sandbox/some-service-frontend in your preferred IDE,
  • modify the generated example project as you wish,
  • build and test it as usual, you can run sbt test it:test,
  • when you are done switch back to the template root
  • run ./update-g8.sh in order to port your changes back to the template.
  • run ./test.sh again to validate your changes

What is in the template?

Assuming the command above the template will supply the following values for the placeholders:

$serviceNameCamel$ -> SomeServiceFrontend
$serviceNamecamel$ -> someServiceFrontend
$serviceNameNoSpaceLowercase$ -> someservicefrontend
$serviceNameNoSpaceUppercase$ -> SOMESERVICEFRONTEND
$serviceNamesnake$ -> some_service_frontend
$serviceNameSnake$ -> SOME_SERVICE_FRONTEND
$serviceNameHyphen$ -> some-service-frontend
$serviceNameLowercase$ -> some service frontend
$serviceNameUppercase$ -> SOME SERVICE FRONTEND
$serviceTargetPort$ -> 9999

and produce the folders and files as shown below:

hmrc.dc-template-frontend.g8's People

Contributors

elabeca avatar hmrc-web-operations avatar

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.