Build hdf-converters with Rollup for html-mapper#6004
Build hdf-converters with Rollup for html-mapper#6004
Conversation
Signed-off-by: Kaden Emley <kemley@mitre.org>
Signed-off-by: Kaden Emley <kemley@mitre.org>
Signed-off-by: Kaden Emley <kemley@mitre.org>
Signed-off-by: Kaden Emley <kemley@mitre.org>
Signed-off-by: Kaden Emley <kemley@mitre.org>
Signed-off-by: Kaden Emley <kemley@mitre.org>
Signed-off-by: Kaden Emley <kemley@mitre.org>
Signed-off-by: Kaden Emley <kemley@mitre.org>
Signed-off-by: Kaden Emley <kemley@mitre.org>
Signed-off-by: Kaden Emley <kemley@mitre.org>
Signed-off-by: Kaden Emley <kemley@mitre.org>
Signed-off-by: Kaden Emley <kemley@mitre.org>
Signed-off-by: Kaden Emley <kemley@mitre.org>
Signed-off-by: Kaden Emley <kemley@mitre.org>
Signed-off-by: Kaden Emley <kemley@mitre.org>
Signed-off-by: Kaden Emley <kemley@mitre.org>
…rters Signed-off-by: Kaden Emley <kemley@mitre.org>
|
This pull request has a conflict. Could you fix it @kemley76? |
Signed-off-by: Kaden Emley <kemley@mitre.org>
|
This pull request has a conflict. Could you fix it @kemley76? |
Signed-off-by: Kaden Emley <kemley@mitre.org>
Signed-off-by: Kaden Emley <kemley@mitre.org>
Signed-off-by: Kaden Emley <kemley@mitre.org>
apps/frontend/package.json
Outdated
| "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": "nx run build", |
There was a problem hiding this comment.
please swap out all lerna commands for nx. this will also require updating the release docs. i would also make sure everything works with the docker builds.
apps/frontend/project.json
Outdated
There was a problem hiding this comment.
please put all the project information into the package.json file instead of being a standalone config file
| "scripts": { | ||
| "backend": "yarn workspace heimdall-server", | ||
| "build": "lerna run build", | ||
| "build": "nx run-many --target=build --all", |
There was a problem hiding this comment.
if it's possible to swap out the lerna config file for nx as well, that'd be great
There was a problem hiding this comment.
ideally this still works if you rename it as .js instead of .cjs
libs/hdf-converters/tsconfig.json
Outdated
| "strict": true, | ||
| "esModuleInterop": true, | ||
| "resolveJsonModule": true | ||
| "resolveJsonModule": true, |
There was a problem hiding this comment.
unnecessary since already defined in the top level tsconfig.json
| input: 'index.ts', | ||
| output: { | ||
| file: 'lib/bundle.js', | ||
| format: 'cjs' |
There was a problem hiding this comment.
something to keep in mind for us moving wholesale to esm is any explicit format specifications like this.
| } from './html-types'; | ||
| import tailwindStyles from './style.css'; | ||
| import htmlTemplate from './template.html'; | ||
| import twElementsScript from './tw-elements.umd.min.js.txt'; |
There was a problem hiding this comment.
add a comment explaining why this needs to be .txt here or wherever is most appropriate
There was a problem hiding this comment.
Comments have been added in several places.
Signed-off-by: Kaden Emley <kemley@mitre.org>
Signed-off-by: Kaden Emley <kemley@mitre.org>
Signed-off-by: Kaden Emley <kemley@mitre.org>
Signed-off-by: Kaden Emley <kemley@mitre.org>
Signed-off-by: Kaden Emley <kemley@mitre.org>
Signed-off-by: Kaden Emley <kemley@mitre.org>
|
This pull request has a conflict. Could you fix it @kemley76? |
|
State as of 8/16/24These changes are all to get HTML export working in the SAF CLI: PR Features addedI've made all the functional changes needed:
What is left to do
|
|
This pull request has a conflict. Could you fix it @kemley76? |



As a way to simplify the usage of hdf-converter's hdf to html mapper, I have setup hdf-converters to be built using Rollup. This allows the template files (html, css, js) necessary for the html mapper to be bundled directly in with the hdf-converter's package. This removes the need for extra config for users of this mapper (no need to setup tailwind and move tailwind-elements files). Also, the main purpose of these changes is to allow for the mapper to work within the SAF CLI, which is now possible because it doesn't rely on Axios.