generated from hmcts/expressjs-template
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 00e11c6
Showing
73 changed files
with
12,034 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# exclude all by default | ||
|
||
* | ||
|
||
# exceptions from `exclude all` rule | ||
|
||
!package.json | ||
!yarn.lock | ||
|
||
!tsconfig.json | ||
!webpack/** | ||
!src/main/** | ||
!config/** | ||
!webpack.config.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# http://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# /node_modules/* in the project root is ignored by default | ||
# build artefacts | ||
dist/* | ||
coverage/* | ||
# data definition files | ||
**/*.d.ts | ||
# 3rd party libs | ||
/src/main/public/ | ||
# custom definition files | ||
/src/main/types/ | ||
jest.*config.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
module.exports = { | ||
"env": { "browser": true, "es6": true, "node": true }, | ||
"extends": ["eslint:recommended"], | ||
"globals": { "Atomics": "readonly", "SharedArrayBuffer": "readonly" }, | ||
"parser": "babel-eslint", | ||
"parserOptions": { | ||
"ecmaVersion": 2018, | ||
"sourceType": "module" | ||
}, | ||
"rules": { | ||
"indent": ["error", 2, { "SwitchCase": 1 }], | ||
"linebreak-style": ["error", "unix"], | ||
"quotes": ["error", "single"], | ||
"comma-dangle": ["error", "always-multiline"], | ||
"semi": ["error", "always"] | ||
}, | ||
"overrides": [ | ||
{ | ||
"files": ["**/*.ts", "**/*.tsx"], | ||
"env": { "browser": true, "es6": true, "node": true }, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/eslint-recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
], | ||
"globals": { "Atomics": "readonly", "SharedArrayBuffer": "readonly" }, | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": 2018, | ||
"sourceType": "module", | ||
"project": "./tsconfig.json" | ||
}, | ||
"plugins": ["@typescript-eslint"], | ||
"rules": { | ||
"indent": ["error", 2, { "SwitchCase": 1 }], | ||
"linebreak-style": ["error", "unix"], | ||
"quotes": ["error", "single", { "avoidEscape": true }], | ||
"comma-dangle": ["error", "always-multiline"], | ||
"@typescript-eslint/no-var-requires": 0 | ||
}, | ||
} | ||
] | ||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Contribution guidelines | ||
|
||
We're happy to accept 3rd-party contributions. Please make sure you read this document before you do any work though, | ||
as we have some expectations related to the content and quality of change sets. | ||
|
||
## What you should know about this application | ||
|
||
This project is a template Express application (http://expressjs.com/). It aims to speed up the creation of frontend applications in HMCTS, | ||
by serving as the initial setup. | ||
|
||
## Before contributing | ||
|
||
Any ideas on the user journeys and general service experience you may have **should be first consulted | ||
with us by submitting a new issue** to this repository. Ideas are always welcome, but if something is divergent or unrelated | ||
to what we're trying to achieve we won't be able to accept it. Please keep this in mind as we don't want to waste anybody's time. | ||
|
||
In the interest of creating a friendly collaboration environment, please read and adhere to an open source contributor's | ||
[code of conduct](http://contributor-covenant.org/version/1/4/). | ||
|
||
## Making a contribution | ||
|
||
After your idea has been accepted you can implement it. We don't allow direct changes to the codebase from the public, | ||
they have to go through a review first. | ||
|
||
Here's what you should do: | ||
1. [fork](https://help.github.com/articles/fork-a-repo/) this repository and clone it to your machine, | ||
2. create a new branch for your change: | ||
* use the latest *master* to branch from, | ||
3. implement the change in your branch: | ||
* if the change is non-trivial it's a good practice to split it into several logically independent units and deliver | ||
each one as a separate commit, | ||
* make sure the commit messages use proper language and accurately describe commit's content, e.g. *"Unify postcode lookup elements spacing"*. | ||
More information on good commit messages can be found [here](http://chris.beams.io/posts/git-commit/), | ||
4. test if your feature works as expected and does not break any existing features, this may include implementing additional automated tests or amending existing ones, | ||
5. push the change to your GitHub fork, | ||
6. submit a [pull request](https://help.github.com/articles/creating-a-pull-request-from-a-fork/) to our repository: | ||
* ensure that the pull request and related GitHub issue reference each other. | ||
|
||
At this point the pull request will wait for someone from our team to review. It may be accepted straight away, | ||
or we may ask you to make some additional amendments before incorporating it into the main branch. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
### What would you like to change? | ||
|
||
### How do you think that would improve the project? | ||
|
||
### If this entry is related to a bug, please provide the steps to reproduce it |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
**Before creating a pull request make sure that:** | ||
|
||
- [ ] commit messages are meaningful and follow good commit message guidelines | ||
- [ ] README and other documentation has been updated / added (if needed) | ||
- [ ] tests have been updated / new tests has been added (if needed) | ||
|
||
Please remove this line and everything above and fill the following sections: | ||
|
||
|
||
### JIRA link ### | ||
|
||
|
||
|
||
### Change description ### | ||
|
||
|
||
|
||
**Does this PR introduce a breaking change?** (check one with "x") | ||
|
||
``` | ||
[ ] Yes | ||
[ ] No | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: npm | ||
directory: "/" | ||
schedule: | ||
interval: weekly | ||
open-pull-requests-limit: 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"enabledManagers": ["helm-requirements", "nvm"], | ||
"automerge": true, | ||
"labels": ["dependencies"], | ||
"helm-requirements": | ||
{ | ||
"fileMatch": ["\\Chart.yaml$"], | ||
"aliases": { | ||
"hmctspublic": "https://hmctspublic.azurecr.io/helm/v1/repo/" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: CI Checks | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 14 | ||
- run: yarn --version | ||
- run: yarn cichecks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
node_modules/ | ||
.nyc_output | ||
.sass-cache | ||
*.css | ||
|
||
.idea/ | ||
*.iml | ||
|
||
*swp | ||
*log | ||
.DS_Store | ||
|
||
src/main/public/img/lib/* | ||
src/main/public/js/lib/**/*.js | ||
src/main/public/stylesheets/lib/* | ||
|
||
node-rpm-packaging/ | ||
mochawesome-report/ | ||
npm-debug.log.* | ||
|
||
.project | ||
.settings/ | ||
dist/ | ||
public/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
14.18.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
options: | ||
max-warnings: 0 | ||
files: | ||
include: 'src/**/*.scss' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# ---- Base image ---- | ||
FROM hmctspublic.azurecr.io/base/node:14-alpine as base | ||
COPY --chown=hmcts:hmcts . . | ||
RUN yarn install --production \ | ||
&& yarn cache clean | ||
|
||
# ---- Build image ---- | ||
FROM base as build | ||
RUN yarn install && yarn build:prod | ||
|
||
# ---- Runtime image ---- | ||
FROM base as runtime | ||
RUN rm -rf webpack/ webpack.config.js | ||
COPY --from=build $WORKDIR/src/main ./src/main | ||
# TODO: expose the right port for your application | ||
EXPOSE 3100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!groovy | ||
|
||
@Library("Infrastructure") | ||
|
||
def type = "nodejs" | ||
def product = "rpe" | ||
def component = "expressjs-template" | ||
|
||
def yarnBuilder = new uk.gov.hmcts.contino.YarnBuilder(this) | ||
|
||
withPipeline(type, product, component) { | ||
disableLegacyDeployment() | ||
|
||
after('build') { | ||
yarnBuilder.yarn('build') | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!groovy | ||
|
||
properties([ | ||
// H allow predefined but random minute see https://en.wikipedia.org/wiki/Cron#Non-standard_characters | ||
pipelineTriggers([cron('H 05 * * *')]) | ||
]) | ||
|
||
@Library("Infrastructure") | ||
|
||
def type = "nodejs" | ||
def product = "rpe" | ||
def component = "expressjs-template" | ||
|
||
withNightlyPipeline(type, product, component) { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2017 HMCTS (HM Courts & Tribunals Service) | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
Oops, something went wrong.