mirror of
https://github.com/material-components/material-web.git
synced 2026-01-09 07:21:09 +08:00
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
26 lines
547 B
JavaScript
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);
|
|
}
|
|
}
|