mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-24 15:46:10 +08:00
25 lines
851 B
JavaScript
25 lines
851 B
JavaScript
|
const $ = require('dekko');
|
||
|
const chalk = require('chalk');
|
||
|
|
||
|
$('lib').isDirectory().hasFile('index.js').hasFile('index.d.ts');
|
||
|
|
||
|
$('lib/*')
|
||
|
.filter((filename) => !['index.js', 'index.d.ts', '.map'].some((ext) => filename.endsWith(ext)))
|
||
|
.isDirectory()
|
||
|
.filter((filename) => !['style', '_util', 'locale'].some((ext) => filename.endsWith(ext)))
|
||
|
.hasFile('index.js')
|
||
|
.hasFile('index.d.ts');
|
||
|
|
||
|
console.log(chalk.green('✨ `lib` directory is valid.'));
|
||
|
|
||
|
$('es').isDirectory().hasFile('index.js').hasFile('index.d.ts');
|
||
|
|
||
|
$('es/*')
|
||
|
.filter((filename) => !['index.js', 'index.d.ts', '.map'].some((ext) => filename.endsWith(ext)))
|
||
|
.isDirectory()
|
||
|
.filter((filename) => !['style', '_util', 'locale'].some((ext) => filename.endsWith(ext)))
|
||
|
.hasFile('index.js')
|
||
|
.hasFile('index.d.ts');
|
||
|
|
||
|
console.log(chalk.green('✨ `es` directory is valid.'));
|