Skip to content

Commit 7bf4a7e

Browse files
asynclizcopybara-github
authored andcommitted
fix: remove internal *-styles.js generated files
Use `*-styles.cssresult.js` instead if importing internal component stylesheets. Public stylesheets have backwards compatibility files to import from the previous `*-styles.js` path. PiperOrigin-RevId: 897592289
1 parent 81807b2 commit 7bf4a7e

3 files changed

Lines changed: 9 additions & 27 deletions

File tree

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ node_modules
44
!commitlint.config.js
55
*.css
66
*.cssresult.ts
7-
*-styles.ts
8-
!adopt-styles.ts
97
tokens/versions/**/*-meta.scss
108
*.map
119
*.d.ts

package.json

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,7 @@
9999
"tsconfig.base.json",
100100
"**/*.ts",
101101
"!**/*.d.ts",
102-
"!**/*-styles.ts",
103-
"**/adopt-styles.ts",
102+
"!**/*.cssresult.ts",
104103
"!catalog/",
105104
"!scripts/"
106105
],
@@ -140,12 +139,6 @@
140139
]
141140
},
142141
"build:css-to-ts": {
143-
"dependencies": [
144-
"build:css-to-ts:cssresult",
145-
"build:css-to-ts:styles"
146-
]
147-
},
148-
"build:css-to-ts:cssresult": {
149142
"command": "find . \\( -path ./.wireit -o -path ./node_modules -o -path ./catalog \\) -prune -o -name '*.css' -print | xargs -L1 node scripts/css-to-ts.js --suffix=.cssresult",
150143
"files": [
151144
"**/*.css",
@@ -160,22 +153,6 @@
160153
"build:sass"
161154
]
162155
},
163-
"build:css-to-ts:styles": {
164-
"command": "find . \\( -path ./.wireit -o -path ./node_modules -o -path ./catalog \\) -prune -o -name '*-styles.css' -print | xargs -L1 node scripts/css-to-ts.js",
165-
"files": [
166-
"**/*-styles.css",
167-
"!catalog/"
168-
],
169-
"output": [
170-
"**/*-styles.ts",
171-
"!**/adopt-styles.ts",
172-
"!catalog/"
173-
],
174-
"dependencies": [
175-
"build:scripts",
176-
"build:sass"
177-
]
178-
},
179156
"build:sass": {
180157
"command": "sass --style=compressed --load-path=node_modules --load-path=node_modules/sass-true/sass $(ls -d */ | grep -vE 'node_modules|catalog')",
181158
"files": [
@@ -242,7 +219,7 @@
242219
"docs/components/*.md",
243220
"**/*.ts",
244221
"!**/*.d.ts",
245-
"!**/*-styles.ts",
222+
"!**/*.cssresult.ts",
246223
"!catalog/",
247224
"!scripts/",
248225
"scripts/analyzer/update-docs.js"

typography/md-typescale-styles.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/**
2+
* @license
3+
* Copyright 2026 Google LLC
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
export * from './md-typescale-styles.cssresult.js';

0 commit comments

Comments
 (0)