3.0.1 • Published 10 months ago

@webpart/stat v3.0.1

Weekly downloads
9
License
MIT
Repository
github
Last release
10 months ago

@webpart/stat

统计开发阶段中的文件信息和用 CMD 模式定义的模块信息。

npm install @webpart/stat

const { Module, HTML, } = require('@webpart/stat');
let dir = './htdocs/';

//分析统计出最原始的文件信息和模块信息。
let file$info = Module.parse(dir, {
     defines: [
        'define',
        'define.panel',
        'define.view',
        'KISP.panel',
        'KISP.view',
    ],

    patterns: [
        'data/**/*.js',
        'lib/**/*.js',
        'modules/**/*.js',
        'views/**/*.js',
    ],

    excludes: [ ],
});


let html$info = HTML.parse(dir, {
    //用来提取出引用了 html 片段文件的标签的正则表达式。
    link: /<link\s+.*rel\s*=\s*["\']html["\'].*\/>/ig,

    //用来提取 panel 或者 view 关联模块的选择器。
    selectors: [
        '[data-view]',
        '[data-panel]',
    ],

    patterns: [
        'lib/**/*.html',
        'modules/**/*.html',
        'views/**/*.html',
    ],

    excludes: [],
});
3.0.1

10 months ago

1.0.9

2 years ago

3.0.0

11 months ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.1.7

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.0

4 years ago