-
Notifications
You must be signed in to change notification settings - Fork 80
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
CIF-1548 - Generate CSS API file #380
Conversation
Codecov Report
@@ Coverage Diff @@
## master #380 +/- ##
=========================================
Coverage 84.81% 84.81%
Complexity 924 924
=========================================
Files 179 179
Lines 4570 4570
Branches 614 614
=========================================
Hits 3876 3876
Misses 557 557
Partials 137 137
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
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.
We need to document this feature in the README - what are CSS API files and how to use them.
@@ -16,7 +16,7 @@ | |||
"scripts": { | |||
"lint": "eslint 'src/**/*.js'", | |||
"webpack:dev": "webpack --mode=development", | |||
"webpack:prod": "webpack --mode=production", | |||
"webpack:prod": "webpack --mode=production && node css-template.js", |
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'm not sure what you exactly want to achieve: only generate the files when we release (but they wouldn't be committed in the repo, right?) so that they are included in the NPM package? (sorry I haven't checked the recent changes to create the NPM package).
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.
The templates are created in the dist
folder which is published as npm package as part of the release. It's also generated for normal builds, but since the dist
folder is part of .gitignore
, it will never be committed.
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.
Aren't "normal builds" building with webpack:dev
? Also if we do that for React Components, do we also want to do the same for the css
styles of the HTL components?
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.
Aren't "normal builds" building with webpack:dev?
Correct :)
Also if we do that for React Components, do we also want to do the same for the css styles of the HTL components?
Those files already exist in https://github.com/adobe/aem-cif-guides-venia/tree/main/ui.frontend/src/main/styles. We could automate the generation of those files too, but it would work differently, since we would need to commit them directly to the venia project + archetype.
Description
*-template.css
.Screenshots (if appropriate):
Types of changes
Checklist: