You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
929 B
JavaScript
27 lines
929 B
JavaScript
6 months ago
|
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');
|
||
|
|
||
|
// eslint-disable-next-line no-console
|
||
|
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');
|
||
|
|
||
|
// eslint-disable-next-line no-console
|
||
|
console.log(chalk.green('✨ `es` directory is valid.'));
|