Skip to content

Commit 0241140

Browse files
authored
fix: update output of create new component script (#826)
1 parent 150a100 commit 0241140

File tree

1 file changed

+11
-0
lines changed
  • packages/main/lib/create-new-component

1 file changed

+11
-0
lines changed

packages/main/lib/create-new-component/index.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,14 @@ const fs = require("fs");
6868
fs.writeFileSync(filePaths.js, sJsFileContentTemplate, { flag: "wx+" });
6969
fs.writeFileSync(filePaths.css, "", { flag: "wx+" });
7070
fs.writeFileSync(filePaths.hbs, "<div>Hello World</div>", { flag: "wx+" });
71+
72+
73+
console.log(`Successfully generated ${componentName}.js`);
74+
console.log(`Successfully generated ${componentName}.css`);
75+
console.log(`Successfully generated ${componentName}.hbs`);
76+
77+
// Change the color of the output
78+
console.warn('\x1b[33m%s\x1b[0m', `
79+
Please import the generated component in bundle.esm.js:
80+
import ${componentName} from "./dist/${componentName}.js";
81+
`);

0 commit comments

Comments
 (0)