Skip to content
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

Build hdf-converters with Rollup for html-mapper #6004

Open
wants to merge 32 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
5bf602f
setup hdf-converters to use rollup for refactoring of html export
kemley76 Jul 16, 2024
68b494d
add rollup typescript package
kemley76 Jul 17, 2024
72c1768
ensure hdf-converters is rebuilt before running frontend
kemley76 Jul 17, 2024
19ea07f
point package json to actual generated types
kemley76 Jul 17, 2024
3f5b943
fix unknown file type errors in hdf-converters jest tests
kemley76 Jul 17, 2024
4e72734
remove unused dev dependency
kemley76 Jul 17, 2024
414cada
add accidently gitignored tailwind file
kemley76 Jul 17, 2024
fd42bab
move rollup dev deps into normal deps
kemley76 Jul 18, 2024
2855915
transform html export tempalte files for frontend tests
kemley76 Jul 18, 2024
0acdb73
build hdf-converters before frontend test
kemley76 Jul 18, 2024
a84cf1a
move rollup dev deps to deps
kemley76 Jul 18, 2024
a961cf5
build hdf-converters before building frontend
kemley76 Jul 18, 2024
635e936
include tsx as non-dev dependency
kemley76 Jul 18, 2024
ffa6c21
modify dependencies and build order
kemley76 Jul 18, 2024
cdc68af
build lerna with include dependencies
kemley76 Jul 19, 2024
8714213
build hdf-converters before frontend
kemley76 Jul 22, 2024
779de05
added implicit dependency relationship between frontend and hdf-conve…
kemley76 Jul 25, 2024
93ffcbf
Merge branch 'master' into rollup-html-mapper
kemley76 Jul 25, 2024
f07ee17
setup nx for prebuild, build, and test for frontend
kemley76 Jul 25, 2024
c86852c
build tailwind before hdf-converters tests
kemley76 Jul 26, 2024
7274fd5
Merge branch 'master' into rollup-html-mapper
kemley76 Jul 26, 2024
410c5fa
build hdf-converters before frontend tests
kemley76 Jul 26, 2024
c68f7df
move tsx back to dev dependencies
kemley76 Jul 26, 2024
73e2e8d
Merge branch 'master' into rollup-html-mapper
kemley76 Jul 29, 2024
2037b69
remove redeclaration of resolveJsonModule: true
kemley76 Jul 29, 2024
9658559
rename rollup.config.cjs to rollup.config.js
kemley76 Jul 29, 2024
cdabb7d
add comments for what the html template files are
kemley76 Jul 29, 2024
826dd13
migrate from lerna to nx completely
kemley76 Jul 30, 2024
8796c90
ensure each package minus the frontend doesnt need nx
kemley76 Jul 30, 2024
70d4ba8
install nx before trying to use nx in frontend test action
kemley76 Jul 30, 2024
22b9627
Merge branch 'master' into rollup-html-mapper
kemley76 Jul 30, 2024
90eff2c
Merge branch 'master' into rollup-html-mapper
kemley76 Aug 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/frontend-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
run: rm -rf apps/backend

- name: Install frontend dev dependencies
run: yarn frontend install --frozen-lockfile
run: yarn workspace @mitre/heimdall-lite install --frozen-lockfile

- name: Run frontend tests
run: yarn frontend test
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,7 @@ certs/*.pem
.pnp.*

# Database Content
data/*
data/*

# Nx build manager
.nx/*
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ WORKDIR /src
# python3/make/compiler is a requirement for node-gyp
RUN curl -sL https://dl.yarnpkg.com/rpm/yarn.repo -o /etc/yum.repos.d/yarn.repo && microdnf install -y python3 make gcc-c++ yarn && microdnf clean all && rm -rf /mnt/rootfs/var/cache/* /mnt/rootfs/var/log/dnf* /mnt/rootfs/var/log/yum.*

COPY package.json yarn.lock lerna.json tsconfig.json postcss.config.js ./
COPY package.json yarn.lock nx.json tsconfig.json ./
COPY apps/backend/package.json apps/backend/tsconfig.* ./apps/backend/
COPY apps/frontend/package.json apps/frontend/tsconfig.* ./apps/frontend/
COPY libs/hdf-converters/package.json libs/hdf-converters/tsconfig.* ./libs/hdf-converters/
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.lite
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ WORKDIR /src
# python3/make/compiler is a requirement for node-gyp
RUN curl -sL https://dl.yarnpkg.com/rpm/yarn.repo -o /etc/yum.repos.d/yarn.repo && microdnf install -y python3 make gcc-c++ yarn && microdnf clean all && rm -rf /mnt/rootfs/var/cache/* /mnt/rootfs/var/log/dnf* /mnt/rootfs/var/log/yum.*

COPY package.json yarn.lock lerna.json tsconfig.json postcss.config.js ./
COPY package.json yarn.lock nx.json tsconfig.json ./
COPY apps/frontend/package.json apps/frontend/tsconfig.json ./apps/frontend/
COPY libs/hdf-converters/package.json libs/hdf-converters/tsconfig.* ./libs/hdf-converters/
COPY libs/inspecjs/package.json libs/inspecjs/tsconfig.* ./libs/inspecjs/
Expand Down
25 changes: 21 additions & 4 deletions apps/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
],
"scripts": {
"prebuild": "rimraf ../../dist/frontend",
"build:tailwind": "tailwindcss -i ./src/tailwind.css -o ./public/static/export/style.css --minify",
"build": "yarn build:tailwind && vue-cli-service build",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint",
"lint:ci": "vue-cli-service lint --no-fix --maxWarnings 0",
"make:component": "vue-cli-service make:component",
Expand All @@ -25,7 +24,7 @@
"make:view": "vue-cli-service make:view",
"prepack": "vue-cli-service build --dest dist && cp ../../README.md README.md && cp package.json package.json.orig && cat package.json.orig | jq '.dependencies = (.dependencies | with_entries(select(.key | contains(\"express\"))))' > package.json",
"postpack": "mv package.json.orig package.json && rm README.md",
"start:dev": "vue-cli-service serve & yarn build:tailwind --watch",
"start:dev": "vue-cli-service serve",
"test": "jest"
},
"dependencies": {
Expand Down Expand Up @@ -123,6 +122,7 @@
"chai-as-promised": "^7.1.1",
"jest": "^27.0.6",
"jest-useragent-mock": "^0.1.1",
"nx": "^19.5.3",
"sinon": "^18.0.0",
"ts-jest": "^29.1.0",
"vue-jest": "^3.0.7"
Expand All @@ -133,5 +133,22 @@
"branch": "/blob/master/",
"changelog": "/releases",
"issues": "/issues/new/choose",
"readme": "README.md"
"readme": "README.md",
"nx": {
"implicitDependencies": [
"@mitre/hdf-converters"
],
"targets": {
"start:dev": {
"dependsOn": [
"^build"
]
},
"test": {
"dependsOn": [
"^build"
]
}
}
}
}
1 change: 0 additions & 1 deletion apps/frontend/public/static/export/style.css

This file was deleted.

Loading
Loading