-
Notifications
You must be signed in to change notification settings - Fork 59
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
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Kaden Emley <[email protected]>
Signed-off-by: Kaden Emley <[email protected]>
Signed-off-by: Kaden Emley <[email protected]>
Signed-off-by: Kaden Emley <[email protected]>
Signed-off-by: Kaden Emley <[email protected]>
Signed-off-by: Kaden Emley <[email protected]>
Signed-off-by: Kaden Emley <[email protected]>
Signed-off-by: Kaden Emley <[email protected]>
Signed-off-by: Kaden Emley <[email protected]>
Signed-off-by: Kaden Emley <[email protected]>
Signed-off-by: Kaden Emley <[email protected]>
Signed-off-by: Kaden Emley <[email protected]>
Signed-off-by: Kaden Emley <[email protected]>
Signed-off-by: Kaden Emley <[email protected]>
Signed-off-by: Kaden Emley <[email protected]>
Signed-off-by: Kaden Emley <[email protected]>
…rters Signed-off-by: Kaden Emley <[email protected]>
This pull request has a conflict. Could you fix it @kemley76? |
Signed-off-by: Kaden Emley <[email protected]>
This pull request has a conflict. Could you fix it @kemley76? |
Signed-off-by: Kaden Emley <[email protected]>
Signed-off-by: Kaden Emley <[email protected]>
Signed-off-by: Kaden Emley <[email protected]>
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please put all the project information into the package.json file instead of being a standalone config file
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.
done
@@ -8,7 +8,7 @@ | |||
], | |||
"scripts": { | |||
"backend": "yarn workspace heimdall-server", | |||
"build": "lerna run build", | |||
"build": "nx run-many --target=build --all", |
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
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.
ideally this still works if you rename it as .js instead of .cjs
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.
done
libs/hdf-converters/tsconfig.json
Outdated
@@ -10,6 +10,7 @@ | |||
"outDir": "./lib", | |||
"strict": true, | |||
"esModuleInterop": true, | |||
"resolveJsonModule": true | |||
"resolveJsonModule": true, |
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.
unnecessary since already defined in the top level tsconfig.json
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.
done
input: 'index.ts', | ||
output: { | ||
file: 'lib/bundle.js', | ||
format: 'cjs' |
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.
something to keep in mind for us moving wholesale to esm is any explicit format specifications like this.
@@ -24,6 +23,9 @@ import { | |||
IResultSeverity, | |||
IResultStatus | |||
} 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a comment explaining why this needs to be .txt here or wherever is most appropriate
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.
Comments have been added in several places.
Signed-off-by: Kaden Emley <[email protected]>
Signed-off-by: Kaden Emley <[email protected]>
Signed-off-by: Kaden Emley <[email protected]>
Signed-off-by: Kaden Emley <[email protected]>
Signed-off-by: Kaden Emley <[email protected]>
Signed-off-by: Kaden Emley <[email protected]>
This pull request has a conflict. Could you fix it @kemley76? |
Quality Gate passedIssues Measures |
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.