{"id":19220072,"url":"https://github.com/nativescript-community/plugin-seed-tools","last_synced_at":"2025-02-23T09:20:42.416Z","repository":{"id":37405140,"uuid":"329296652","full_name":"nativescript-community/plugin-seed-tools","owner":"nativescript-community","description":null,"archived":false,"fork":false,"pushed_at":"2024-10-14T15:16:20.000Z","size":2561,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":18,"default_branch":"master","last_synced_at":"2024-11-24T20:07:42.685Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nativescript-community.png","metadata":{"files":{"readme":"readme.js","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-13T12:10:44.000Z","updated_at":"2024-10-14T15:16:38.000Z","dependencies_parsed_at":"2023-10-20T16:37:15.226Z","dependency_job_id":"0d1657d9-3158-4e7e-b6a2-446714355af1","html_url":"https://github.com/nativescript-community/plugin-seed-tools","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nativescript-community%2Fplugin-seed-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nativescript-community%2Fplugin-seed-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nativescript-community%2Fplugin-seed-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nativescript-community%2Fplugin-seed-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nativescript-community","download_url":"https://codeload.github.com/nativescript-community/plugin-seed-tools/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240293293,"owners_count":19778474,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T14:33:52.622Z","updated_at":"2025-02-23T09:20:42.382Z","avatar_url":"https://github.com/nativescript-community.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"const fs = require('fs');\nconst path = require('path');\nconst exec = require('child_process').exec;\n\nconst pluginConfig = fs.readFileSync('config.json');\nconst pluginConfigJson = JSON.parse(pluginConfig);\n\nfunction listFoldersSync(dir) {\n    const folders = [];\n    fs.readdirSync(dir).forEach((f) =\u003e {\n        const dirPath = path.join(dir, f);\n        const isDirectory = fs.statSync(dirPath).isDirectory();\n        if (isDirectory) {\n            folders.push(f);\n        }\n    });\n    return folders;\n}\n\nlet enabled = false;\n\nif ('readme' in pluginConfigJson) {\n    enabled = pluginConfigJson['readme'];\n}\n\nif (enabled) {\n    const files = listFoldersSync('./packages');\n    const packagesCount = files.length;\n\n    let readmeOutput = '';\n\n    if (fs.existsSync('header.md')) {\n        readmeOutput += '{{ load:header.md }}\\n';\n    }\n    if (packagesCount \u003e 1) {\n        readmeOutput += 'This monorepo contains multiple packages:\u003cbr\u003e\u003cbr\u003e';\n    }\n\n    for (const package of files) {\n        const multiPackageMarkdown = `\\n\u003cdetails open\u003e\n\u003csummary\u003e\u003cb\u003e${package}\u003c/b\u003e\u003c/summary\u003e\n\\n{{ load:packages/${package}/README.md }}\n\u003c/details\u003e`;\n\n        const singlePackageMarkdown = `{{ load:packages/${package}/README.md }}`;\n\n        if (packagesCount \u003e 1) {\n            readmeOutput += multiPackageMarkdown;\n        } else {\n            readmeOutput += singlePackageMarkdown;\n        }\n    }\n\n\n    if (fs.existsSync('info.md')) {\n        readmeOutput += '\\n{{ load:info.md }}';\n    }\n\n    readmeOutput += '\\n{{ load:tools/readme/demos-and-development.md }}{{ load:tools/readme/questions.md }}';\n\n    if (fs.existsSync('footer.md')) {\n        readmeOutput += '\\n{{ load:footer.md }}';\n    }\n\n    try {\n        fs.writeFileSync('blueprint.md', readmeOutput);\n    } catch (err) {\n        console.error(err);\n    }\n\n    exec('./node_modules/.bin/readme generate -c ./tools/readme/blueprint.json', function (err, stdout, stderr) {\n        if (err) {\n            console.log(stderr);\n        }\n        console.log(stdout);\n    });\n} else {\n    console.log('README generation is disabled. To enable, add \"readme\": true to the config.json');\n}\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnativescript-community%2Fplugin-seed-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnativescript-community%2Fplugin-seed-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnativescript-community%2Fplugin-seed-tools/lists"}