Explorar o código

Fix ignoring mock artifacts on release

Nicolás Venturo %!s(int64=5) %!d(string=hai) anos
pai
achega
e7bded655b
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      scripts/prepare.js

+ 2 - 2
scripts/prepare.js

@@ -18,8 +18,8 @@ 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.
-  .map(pat => pat.slice(1));
+// Remove the negation part and initial slash. Makes micromatch usage more intuitive.
+  .map(pat => pat.slice(1).replace(/^\//, ''));
 
 const ignorePatternsSubtrees = ignorePatterns
 // Add **/* to ignore all files contained in the directories.