mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-31 05:06:38 +00:00
Code more like cli
This commit is contained in:
parent
fe37f8fad5
commit
b2ec3c8c37
@ -17,24 +17,24 @@ import "./translations.js";
|
||||
import "./rspack.js";
|
||||
|
||||
gulp.task("generate-component-docs", async function generateComponentDocs() {
|
||||
// npx @custom-elements-manifest/analyzer analyze --litelement --globs "src/components/ha-alert.ts --dev"
|
||||
|
||||
const filePaths = ["src/components/ha-alert.ts"];
|
||||
|
||||
const modules = await Promise.all(
|
||||
filePaths.map(async (file) => {
|
||||
const filePath = path.resolve(file);
|
||||
return ts.createSourceFile(
|
||||
filePath,
|
||||
await fs.promises.readFile(filePath, "utf-8"),
|
||||
ts.ScriptTarget.ES2015,
|
||||
true
|
||||
);
|
||||
console.log(`Reading ${file} -> ${filePath}`);
|
||||
const source = fs.readFileSync(filePath).toString();
|
||||
|
||||
return ts.createSourceFile(file, source, ts.ScriptTarget.ES2015, true);
|
||||
})
|
||||
);
|
||||
|
||||
const manifest = create({
|
||||
modules,
|
||||
plugins: [...litPlugin()],
|
||||
context: { dev: false },
|
||||
plugins: litPlugin(),
|
||||
context: { dev: true },
|
||||
});
|
||||
|
||||
console.log(manifest);
|
||||
|
Loading…
x
Reference in New Issue
Block a user