From 5a360bc78e20c5fb8d07b26c62dd71857f643d48 Mon Sep 17 00:00:00 2001 From: Cathal Noonan <14317886+cathalnoonan@users.noreply.github.com> Date: Sat, 2 Sep 2023 18:56:36 +0100 Subject: [PATCH] Update repo template files --- .github/ISSUE_TEMPLATE/bug-report.yml | 37 +++++++++++++++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 1 + .github/workflows/BUILD.yml | 31 ++++++++++++++++++++-- control/tsconfig.json | 12 +++++---- control/webpack.config.js | 5 ++-- 5 files changed, 77 insertions(+), 9 deletions(-) create mode 100755 .github/ISSUE_TEMPLATE/bug-report.yml create mode 100755 .github/ISSUE_TEMPLATE/config.yml diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml new file mode 100755 index 0000000..07279ee --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -0,0 +1,37 @@ +name: Bug report +description: Describe the issue and include steps to reproduce. +body: + - type: textarea + id: description + attributes: + label: Description + validations: + required: true + - type: textarea + id: steps_to_reproduce + attributes: + label: Steps to reproduce + description: | + Describe how to reproduce the issue. + Include any observations about what causes the issue to happen. + placeholder: | + 1. ... + 2. ... + 3. ... + validations: + required: true + - type: textarea + id: screenshots + attributes: + label: Screenshots + description: | + Please include screenshots or gifs of the issue occurring. + Remember to hide any sensitive information included in the images. + validations: + required: false + - type: input + id: version + attributes: + label: Version installed + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100755 index 0000000..3ba13e0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1 @@ +blank_issues_enabled: false diff --git a/.github/workflows/BUILD.yml b/.github/workflows/BUILD.yml index f9613e7..2864d91 100755 --- a/.github/workflows/BUILD.yml +++ b/.github/workflows/BUILD.yml @@ -2,14 +2,13 @@ name: Build on: workflow_dispatch: - branches: [ main ] push: pull_request: jobs: build: + name: Build runs-on: ubuntu-latest - steps: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 @@ -38,3 +37,31 @@ jobs: name: ${{ github.event.repository.name }}__extract_this_zip path: ./dist/* retention-days: 15 + + validate-resx-files: + name: Validate resx files + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v3 + - name: Setup xmllint + run: | + if ! command -v xmllint &> /dev/null + then + sudo apt-get update + sudo apt-get install -y libxml2-utils + fi + shell: bash + - name: Check resx files contain valid xml + run: | + shopt -s globstar + for resx_file in $(/bin/ls ./**/*.resx) + do + if xmllint --noout "$resx_file" > /dev/null 2>&1 ; + then + echo "Valid: $resx_file" + else + echo "Invalid: $resx_file" && exit 1 + fi + done + shell: bash diff --git a/control/tsconfig.json b/control/tsconfig.json index fcc892c..5130d43 100755 --- a/control/tsconfig.json +++ b/control/tsconfig.json @@ -1,9 +1,11 @@ { "extends": "./node_modules/pcf-scripts/tsconfig_base.json", "compilerOptions": { - "typeRoots": ["node_modules/@types"], - "jsx": "react", - "sourceMap": true, - "esModuleInterop": true + "typeRoots": ["node_modules/@types"], + "jsx": "react", + "sourceMap": true, + "esModuleInterop": true, + "target": "ES2015", + "lib": ["dom", "es5", "scripthost", "es2015.promise"] } -} \ No newline at end of file +} diff --git a/control/webpack.config.js b/control/webpack.config.js index 714b061..01a2e83 100755 --- a/control/webpack.config.js +++ b/control/webpack.config.js @@ -7,6 +7,7 @@ module.exports = { // Generate a source map to make debugging easier. devtool: 'source-map', - // Support older browsers. - target: ['web', 'es5'], + // Use "ES5" to support older browsers. + // IE11 is end of support, so this shouldn't be necessary anymore. + target: ['web', 'es2015'], }