Skip to content

Commit bcfae9f

Browse files
committed
fix: ignore readme files in installer
1 parent 65a73f0 commit bcfae9f

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

lib/features.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ const localsMapPath = path.join(appRoot, 'config', 'locals_map.js');
1010
const coreVersion = require(path.join(appRoot, 'package.json')).version;
1111

1212
const manifestCandidates = ['feature.json', 'config.json'];
13+
const isIgnoredInstallFile = (fileName) => String(fileName).toLowerCase() === 'readme.md';
1314
const runtimeFeatureDirs = new Set([
1415
'api',
1516
'lib',
@@ -297,6 +298,8 @@ const resolveFeatureSourcePath = (featureName, manifest, relativePath) => {
297298
* @param {String[]} installedFiles Mutable list receiving app-root-relative installed file paths.
298299
*/
299300
const copyRecursive = (sourcePath, targetPath, installedFiles, preservedFiles = new Set()) => {
301+
if (isIgnoredInstallFile(path.basename(sourcePath))) return;
302+
300303
const stats = fs.statSync(sourcePath);
301304

302305
if (stats.isDirectory()) {
@@ -371,7 +374,7 @@ const copyFeatureFiles = (featureDir, featureName, manifest) => {
371374
.filter(Boolean));
372375

373376
fs.readdirSync(featureDir, { withFileTypes: true }).forEach(dirent => {
374-
if (manifestFiles.has(dirent.name) || dirent.name.startsWith('.')) return;
377+
if (manifestFiles.has(dirent.name) || isIgnoredInstallFile(dirent.name) || dirent.name.startsWith('.')) return;
375378

376379
const sourcePath = path.join(featureDir, dirent.name);
377380
let targetPath;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "simplestrichliste",
3-
"version": "0.6.0",
3+
"version": "0.6.1",
44
"description": "",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)