1
0
mirror of https://github.com/sahadev/vue-component-creater-ui.git synced 2025-12-15 23:14:18 +08:00

将主要逻辑收拢在Main.vue中,可以跑通

This commit is contained in:
Shangbin
2021-04-10 21:03:35 +08:00
parent e87ebafdcb
commit e5a2ed4484
12 changed files with 322 additions and 855 deletions

View File

@@ -1,27 +1,26 @@
const compiler = require("./compileComponent.js");
// const glob = require("glob");
// const path = require("path");
// const process = require("process");
const glob = require("glob");
const path = require("path");
const process = require("process");
// const componentsPath = path.join(process.cwd(), "src/rawComponents");
const componentsPath = path.join(process.cwd(), "src/rawComponents");
// console.info(`当前正在读取${componentsPath}中的vue原始组件`);
console.info(`当前正在读取${componentsPath}中的vue原始组件`);
// // options is optional
// glob(
// "**/*.vue",
// {
// cwd: componentsPath,
// absolute: true,
// ignore: ['**/element/index.vue', '**/vant/index.vue', '**/iview/index.vue']
// },
// function (er, files) {
// console.info(`正在对${files.length}个文件进行编译...`);
// files.forEach((filePath) => {
// console.info(`正在编译${filePath}`);
// options is optional
glob(
"**/*.vue",
{
cwd: componentsPath,
absolute: true,
ignore: ['**/element/index.vue', '**/vant/index.vue', '**/iview/index.vue']
},
function (er, files) {
console.info(`正在对${files.length}个文件进行编译...`);
files.forEach((filePath) => {
console.info(`正在编译${filePath}`);
// });
// }
// );
compiler("/Users/sahadevshang/openSource/tal/vue-component-creater-ui/Main.vue");
});
}
);