{"id":19805995,"url":"https://github.com/cycloidio/import-index-generator","last_synced_at":"2025-05-01T07:30:33.801Z","repository":{"id":48000559,"uuid":"84861537","full_name":"cycloidio/import-index-generator","owner":"cycloidio","description":"Autogenerate a JS modules which exports all the modules present on a directory","archived":false,"fork":false,"pushed_at":"2023-01-11T08:49:37.000Z","size":96,"stargazers_count":3,"open_issues_count":3,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-03-25T06:21:03.849Z","etag":null,"topics":["code-generation","javascript","nodejs","tool"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cycloidio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-13T18:35:16.000Z","updated_at":"2021-08-25T11:02:48.000Z","dependencies_parsed_at":"2023-02-09T02:30:48.111Z","dependency_job_id":null,"html_url":"https://github.com/cycloidio/import-index-generator","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cycloidio%2Fimport-index-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cycloidio%2Fimport-index-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cycloidio%2Fimport-index-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cycloidio%2Fimport-index-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cycloidio","download_url":"https://codeload.github.com/cycloidio/import-index-generator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251840098,"owners_count":21652275,"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":["code-generation","javascript","nodejs","tool"],"created_at":"2024-11-12T09:06:07.566Z","updated_at":"2025-05-01T07:30:33.521Z","avatar_url":"https://github.com/cycloidio.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Import Index Generator\n======================\n\nSimple tool which read the content of a directory (without reading the content of its subdirectories) and generates an JS2015 Javascript file which import all those files and has a default export with an array which contains for each file its name and what it exports, because they are assumed to be Javascript module files.\n\n## Considerations\n\nThis tool has been developed with NodeJS v7 and we don't think to add support for previous versions.\n\n## Install\n\nWith NPM\n`npm install import-index-generator`\n\nWith Yarn\n`yarn add import-index-generator`\n\n## Docs\n\nThe tool will show their own help command if your run it without any argument.\n\nIf you don't have installed it globally (it's preferable not to so, for the reasons mentioned on [yarn docs comemnt](https://yarnpkg.com/en/docs/cli/add#toc-caveats)), then run `./node_modules/.bin/iigen`\n\nYou will get the same below message\n\n```\niigen [-r] [src-dir-path] [output] [list-extensions]\n\nGet the list of the file just contained in the passed source directory path and\ngenerates \"index\" files which exports a list of objects with the file name\n(just the name with the extension but without the path) and the exported stuff.\n\nThe [-r] flag indicates to recur the source directory to list all the files on\nit and its sub directories. It's optional, hence, by default, the tool doesn't\nrecur the directory. The flag can be set in any position, it isn't stricly\nnecessary to appear in the same position written in this help message.\n\nThe [ouput] parameter is optional an it's the file path used to write the\ngenerated \"index\" file, otherwise a temporary file is generated.\n\nThe third parameter [list-extensions] is optional and only can be provided if\nthe [output] parameters is provided; it's a list of file extensions, comma\nseparated (with no spaces) which are considered to be Javascript modules, js by\ndefault.\n\nThe command print out to the stdout the path to the autogenerated \"index\" file.\n\nExample:\nif the list of files in \"my-src/components/\" directory is\n - module.js\n - auth.vue\n - ignoreme\n\nexecuting: iigen my-src/components components-index.js js,vue\n\nThe command will output in the stdout 'components-index.js' and will generate\nsuch file with the next content:\n\nimport * as i0 from './my-src/components/auth.vue'\nimport * as i1 from './my-src/components/module.js'\nexport default [{ filename: 'auth.vue', exported: i0 }, { filename: 'module.js', exported: i1 }]\n\n\nNOTE the tool doens't check the content of the files, so they are assumed to be\nwel formatted Javascript modules\n```\n\n## Development\n\nInstall dependencies `npm install` or `yarn install` (recommended).\n\n### lint\nAll the JS code is linted using [standard](https://github.com/feross/standard)\n\n`npm run lint` or `yarn run lint`\n\n### Test\n\n`npm test` or `yarn test`\n\n## License\n\nThe MIT License (MIT)\nCopyright (c) 2017 cycloid.io\nRead the LICENSE file for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcycloidio%2Fimport-index-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcycloidio%2Fimport-index-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcycloidio%2Fimport-index-generator/lists"}