-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create shared resource #1887
Merged
Merged
Create shared resource #1887
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
0af7414
working
nickbristow 1f12e9e
add shared dir
nickbristow 4ea023b
moved shared resources folder
nickbristow ed64d25
Merge branch 'main' into 1863/shared-accordion
nickbristow c2fb3a0
webpack test
nickbristow f3a1265
test
nickbristow aee86e6
test
nickbristow 5ecbf8d
test
nickbristow 47daf98
test
nickbristow d2211bb
test
nickbristow 7893520
Update docker-compose.yml
nickbristow e1e0028
Update buildContainers.yaml
nickbristow e1ea0e4
test
nickbristow f25a0f5
another test
nickbristow 9c284b7
remove symlinks if needed
nickbristow 08cff87
tests
nickbristow 69c07c8
tests
nickbristow 4be10df
Merge branch 'main' into 1863/shared-accordion
nickbristow e9f7411
fix lighthouse
nickbristow 90660f4
remove symlinks from lighthouse
nickbristow 92eac58
Merge branch 'main' into 1863/shared-accordion
nickbristow cd762d1
update readme
nickbristow d4300af
fix package
nickbristow 7b7a361
Merge branch 'main' into 1863/shared-accordion
nickbristow cfd9d20
Update Dockerfile
nickbristow 92dab05
Update package.json
nickbristow a2c2f4d
Merge branch 'main' into 1863/shared-accordion
nickbristow b51b880
Merge branch 'main' into 1863/shared-accordion
nickbristow 97a6930
Merge branch 'main' into 1863/shared-accordion
nickbristow 441a15f
Merge branch 'main' into 1863/shared-accordion
nickbristow File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this renaming