|
|
|
|
@ -1,5 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import { globSync } from 'glob';
|
|
|
|
|
import fs from 'fs';
|
|
|
|
|
import path from 'path';
|
|
|
|
|
@ -92,7 +90,8 @@ const templateTitleMap = parseStaticRouteTitles(path.join(routerModulesPath, 'te
|
|
|
|
|
let allNotes = [];
|
|
|
|
|
|
|
|
|
|
// 1. 统计 demo 模块
|
|
|
|
|
const demoFiles = globSync(path.join(viewsPath, 'demo', '**/*.vue')).filter(p => !p.includes('/components/'));
|
|
|
|
|
const demoPattern = path.join(viewsPath, 'demo', '**/*.vue').replace(/\\/g, '/');
|
|
|
|
|
const demoFiles = globSync(demoPattern).filter(p => !p.replace(/\\/g, '/').includes('/components/'));
|
|
|
|
|
demoFiles.forEach(file => {
|
|
|
|
|
const stats = fs.statSync(file);
|
|
|
|
|
allNotes.push({
|
|
|
|
|
@ -104,7 +103,8 @@ demoFiles.forEach(file => {
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// 2. 统计 python 模块
|
|
|
|
|
const pythonFiles = globSync(path.join(viewsPath, 'python', '**/*.vue'));
|
|
|
|
|
const pythonPattern = path.join(viewsPath, 'python', '**/*.vue').replace(/\\/g, '/');
|
|
|
|
|
const pythonFiles = globSync(pythonPattern);
|
|
|
|
|
pythonFiles.forEach(file => {
|
|
|
|
|
const stats = fs.statSync(file);
|
|
|
|
|
allNotes.push({
|
|
|
|
|
@ -116,7 +116,8 @@ pythonFiles.forEach(file => {
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// 3. 统计 template 模块
|
|
|
|
|
const templateFiles = globSync(path.join(viewsPath, 'template', '**/*.vue')).filter(p => !p.includes('/components/'));
|
|
|
|
|
const templatePattern = path.join(viewsPath, 'template', '**/*.vue').replace(/\\/g, '/');
|
|
|
|
|
const templateFiles = globSync(templatePattern).filter(p => !p.replace(/\\/g, '/').includes('/components/'));
|
|
|
|
|
templateFiles.forEach(file => {
|
|
|
|
|
const stats = fs.statSync(file);
|
|
|
|
|
allNotes.push({
|
|
|
|
|
|