Giter VIP home page Giter VIP logo

nhsuk.base-application's Introduction

nhsuk.base-application

Build Status

A .NET project which include some of the common things needed at NHS.UK.

View the latest deployment of main branch.

Overview

ASP .NET Core web application

  • ASP .NET Core MVC Views using .NET 3.1 Framework
  • NHS.UK frontend library
  • NHS.UK header and footer Nuget package

NUnit test project

Setup for NUnit unit tests.

Azure pipeline

Automated CI pipeline to deploy pushes to main to nhsuk development environment.

  • Checkout
  • Nuget - restore packages including
  • Test - runs tests in NUnit test project
  • Build - build web application
  • Publish - publish web application
  • Deploy - deploy to Azure web service

ASP .NET Core web application

The application runs on Windows and Linux using either Visual Studio or CLI.

For dev the application will run on https://localhost:5001/service-name with the base path being configurable in Startup.cs

We always use base paths for applications so it is easier for infra to handle our application in higher environments and to ensure any assets are served from the correct application and not the domain root which would hit Wagtail.

Build

Building the web application will automatically run npm install && npm run build.

The npm install command installs all NPM dependencies listed within the package.json.

The npm run build command runs the gulp build task.

Gulp

The application contains 2 tasks in gulpfile.js.

The task gulp build will build CSS and JS assets and add them to wwwroot/dist. These files are not commited to the repository.

The task gulp does the same as gulp build but adds a watch to recompile assets as they change in wwwroot/src/**/*.

SCSS

A single JavaScript file exists as wwwroot/src/main.scss.

This file imports the required SCSS from NHS.UK frontend library.

Any custom SCSS can be added or imported into this file.

The Gulp tasks compile this file into CSS and minify it for production.

The resulting JavaScript is saved in wwwroot/dist/main.css. This file is not commited to the repository.

JavaScript

A single JavaScript file exists as wwwroot/src/main.js.

This file imports the required JavaScript from NHS.UK frontend library.

Any custom ES2015 JavaScript can be added or imported into this file.

The Gulp tasks transpile this file into ES5 JavaScript using Babel and minify it for production. This file is not commited to the repository.

The resulting JavaScript is saved in wwwroot/dist/main.js. This file is not commited to the repository.

NHS.UK header and footer Nuget package

The header and footer are dynamically built by the nhsuk.header-and-footer-client Nuget package.

Adobe analytics

Adobe analytics script is loaded in based on AdobeAnalyticsScriptUrl set in appsettings.json.

Adobe analytics digitalData object is built dynamically from application URL.

Cookie banner

NHS.UK cookier banner is loaded in based on CookieScriptUrl set in appsettings.json.

nhsuk.base-application's People

Contributors

thomashdoughty avatar tomdoughty avatar chrimesdev 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.