Skip to content

Commit d0f7309

Browse files
authored
chore: Use simplified styles build (#29)
1 parent 0d2a8ea commit d0f7309

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

scripts/compile-styles.js

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
11
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
// SPDX-License-Identifier: Apache-2.0
3-
import { ThemeBuilder, buildThemedComponentsInternal } from "@cloudscape-design/theming-build";
3+
import { buildStyles } from "@cloudscape-design/theming-build/internal";
44

5-
// Generates scoped styles for the component
6-
// The output includes files like 'styles.css.js', 'styles.scoped.css', and 'styles.selectors.js'
7-
await buildThemedComponentsInternal({
8-
primary: new ThemeBuilder("unused", ":root", []).build(), // "unused" as placeholder and ":root" for global style
9-
componentsOutputDir: "lib/components", // sets the output directory for the processed styles
10-
skip: ["design-tokens", "preset"], // skips generation of design tokens and presets
11-
scssDir: "src", // sets the source directory for SCSS files
12-
variablesMap: {}, // not needed - can be used for custom token-variable mappings
13-
exposed: [], // not needed - can be used for exposing specific design tokens
14-
});
5+
await buildStyles("src", "lib/components");

0 commit comments

Comments
 (0)