-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* working * add shared dir * moved shared resources folder * webpack test * test * test * test * test * test * Update docker-compose.yml * Update buildContainers.yaml * test * another test * remove symlinks if needed * tests * tests * fix lighthouse * remove symlinks from lighthouse * update readme * fix package * Update Dockerfile * Update package.json
- Loading branch information
1 parent
f844f75
commit d145dd9
Showing
18 changed files
with
18,065 additions
and
23 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
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
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
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
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
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 @@ | ||
../../../../../shared-resources/src/ |
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
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
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,3 @@ | ||
./node_modules | ||
.next/ | ||
.env.local |
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,35 @@ | ||
# Shared Modules for PHDI Containers | ||
|
||
This folder contains shared modules that can be used across PHDI Next.js projects. Follow the instructions below to integrate these shared modules into other containers. | ||
|
||
## Step 1: Sym link the folder to your container | ||
|
||
From the repo you want to sym link to | ||
|
||
Example: | ||
``` | ||
ln -s ../../../../../shared-resources/src/ ./src/app/shared/ | ||
``` | ||
|
||
## Step 2: Install local requirements for shared-resources | ||
In the shared resources folder run: | ||
``` | ||
npm install | ||
``` | ||
|
||
## Step 3: Update various build commands | ||
Certain github build commands will need to be updated. | ||
|
||
In order for docker to work, the files need to be located in the repo they are being used in. See these examples from build container. | ||
|
||
``` | ||
- name: Remove symlinks (if needed) | ||
if: ${{ matrix.container-to-build == 'ecr-viewer' }} | ||
working-directory: ./containers/${{matrix.container-to-build}}/src/app/shared | ||
run: rm -rf ./* | ||
- name: Copy shared-resources (if needed) | ||
if: ${{ matrix.container-to-build == 'ecr-viewer' }} | ||
working-directory: ./containers/${{matrix.container-to-build}} | ||
run: cp -r ../../shared-resources/src/ ./src/app/shared/ | ||
``` |
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,15 @@ | ||
const nextJest = require("next/jest"); | ||
|
||
const createJestConfig = nextJest({ | ||
// Provide the path to your Next.js app to load next.config.js and .env files in your test environment | ||
dir: "./", | ||
}); | ||
|
||
// Add any custom config to be passed to Jest | ||
const customJestConfig = { | ||
setupFilesAfterEnv: ["<rootDir>/jest.setup.ts"], | ||
testEnvironment: "jest-environment-jsdom", | ||
}; | ||
|
||
// createJestConfig is exported this way to ensure that next/jest can load the Next.js config which is async | ||
module.exports = createJestConfig(customJestConfig); |
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,6 @@ | ||
import "@testing-library/jest-dom"; | ||
import { toHaveNoViolations } from "jest-axe"; | ||
import * as matchers from "jest-extended"; | ||
|
||
expect.extend(toHaveNoViolations); | ||
expect.extend(matchers); |
Oops, something went wrong.