-
Notifications
You must be signed in to change notification settings - Fork 7
chore: Expose styles build as a standalone feature #72
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #72 +/- ##
=======================================
Coverage 95.60% 95.60%
=======================================
Files 47 47
Lines 2889 2891 +2
Branches 364 366 +2
=======================================
+ Hits 2762 2764 +2
Misses 123 123
Partials 4 4 ☔ View full report in Codecov by Sentry. |
3230045 to
2d8e7ec
Compare
| } | ||
|
|
||
| export async function createStyles(inlines: InlineStylesheet[], outputDir: string, sassDir: string) { | ||
| export async function buildStyles(sassDir: string, outputDir: string, inlines: InlineStylesheet[] = []) { |
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.
Updated this function to follow more intuitive signature "source, destination, options"
| // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
| import sass from 'sass'; | ||
| import * as sass from 'sass'; |
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.
Fixing deprecation warning
`import sass from 'sass'` is deprecated.
Please use `import * as sass from 'sass'` instead.
| main: './build/index.js', | ||
| exports: { | ||
| '.': './build/index.js', | ||
| './internal': './build/internal.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.
Moving forward, we should replace all current imports
import { buildThemedComponentsInternal } from "@cloudscape-design/theming-build";to the new subpath
import { buildThemedComponentsInternal } from "@cloudscape-design/theming-build/internal";Follow our standard naming convention where all team-internal APIs are coming from /internal imports
Issue #, if available:
Description of changes:
Allows simplified usage:
Currently we use some hacky options here and there. We can improve this
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.