Skip to content

Commit 02883d8

Browse files
jonrohanCopilot
andauthored
Apply suggestions from code review
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 54d2e41 commit 02883d8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

script/export-css-selectors

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const exportSelectors = (folder, {classNameExcludedFiles = []} = {}) => {
5555
if (collectClassNames) {
5656
parsed.forEach(compound => {
5757
compound.forEach(token => {
58-
if (token.type === 'attribute' && token.name === 'class') {
58+
if (token.type === 'attribute' && token.name === 'class' && token.action === 'element') {
5959
allClassNames.add(token.value)
6060
}
6161
})
@@ -142,7 +142,7 @@ Promise.all([componentsBuild, libBuild])
142142
console.log('Writing static/classnames.js')
143143
return writeFile(
144144
'static/classnames.js',
145-
`const classNames = new Set([\n${body}\n])\n\nexport default classNames\n`
145+
`const classNames = new Set([\n${body}\n])\n\nmodule.exports = classNames\n`
146146
)
147147
})
148148
.catch(error => console.error("failed to write static/classnames.js", { error }))

0 commit comments

Comments
 (0)