Update docs

This commit is contained in:
github-actions
2023-05-09 19:56:30 +00:00
parent 47e38c7bda
commit 6ae39c4dc1
579 changed files with 30453 additions and 21485 deletions

View File

@ -6,7 +6,7 @@ const fs = require('fs');
const path = require('path');
const match = require('micromatch');
function readJSON (path) {
function readJSON(path) {
return JSON.parse(fs.readFileSync(path));
}
@ -15,11 +15,11 @@ const pkgFiles = readJSON('package.json').files;
// Get only negated patterns.
const ignorePatterns = pkgFiles
.filter(pat => pat.startsWith('!'))
// Remove the negation part. Makes micromatch usage more intuitive.
// Remove the negation part. Makes micromatch usage more intuitive.
.map(pat => pat.slice(1));
const ignorePatternsSubtrees = ignorePatterns
// Add **/* to ignore all files contained in the directories.
// Add **/* to ignore all files contained in the directories.
.concat(ignorePatterns.map(pat => path.join(pat, '**/*')))
.map(p => p.replace(/^\//, ''));