mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-02 12:09:14 +08:00
1df1034f20
* chore(deps-dev): bump glob from 8.1.0 to 9.2.1 Bumps [glob](https://github.com/isaacs/node-glob) from 8.1.0 to 9.2.1. - [Release notes](https://github.com/isaacs/node-glob/releases) - [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md) - [Commits](https://github.com/isaacs/node-glob/compare/v8.1.0...v9.2.1) --- updated-dependencies: - dependency-name: glob dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * fix: update api * fix * fix * fix path * fix path * update snap * update snap * update snap --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: 栗嘉男 <574980606@qq.com>
15 lines
453 B
JavaScript
15 lines
453 B
JavaScript
const path = require('path');
|
|
const yfm = require('yaml-front-matter');
|
|
const glob = require('glob');
|
|
const fs = require('fs');
|
|
|
|
const demoFiles = glob.globSync(path.join(process.cwd(), 'components/**/demo/*.md'));
|
|
// eslint-disable-next-line no-restricted-syntax
|
|
for (const url of demoFiles) {
|
|
const demoContent = fs.readFileSync(url);
|
|
const meta = yfm.loadFront(demoContent);
|
|
if (meta.only) {
|
|
throw Error(`there is a 'only': ${url}`);
|
|
}
|
|
}
|