Elizabeth Mitchell c35bad0c64 fix: rename internal <styles>.css.js to <styles>.css
We are changing the names of these files to reduce similarity with CSS modules and avoid clashing with tooling built around that. If you're importing `*/internal/styles.css.js`, swap to `*/internal/styles.js`.

PiperOrigin-RevId: 611265000
2024-02-28 16:20:22 -08:00

26 lines
547 B
JavaScript

/**
* @license
* Copyright 2022 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import * as fs from 'fs';
for (let i = 2; i < process.argv.length; i++) {
try {
const filePath = process.argv[i];
const content = fs.readFileSync(filePath);
fs.writeFileSync(filePath.replace('.css', '.ts'), `/**
* @license
* Copyright 2022 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import {css} from 'lit';
export const styles = css\`${content.toString('utf8')}\`;
`);
} catch (error) {
console.error(error);
}
}