{"id":16146567,"url":"https://github.com/voxpelli/linemod","last_synced_at":"2025-09-13T00:31:49.239Z","repository":{"id":37776107,"uuid":"332842036","full_name":"voxpelli/linemod","owner":"voxpelli","description":"Comment driven line modifications","archived":false,"fork":false,"pushed_at":"2024-04-30T10:36:45.000Z","size":36,"stargazers_count":3,"open_issues_count":8,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-05-01T12:23:56.238Z","etag":null,"topics":["cli","code-modification","codemod","comments","converter"],"latest_commit_sha":null,"homepage":"","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/voxpelli.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-25T18:22:03.000Z","updated_at":"2024-05-06T23:35:32.588Z","dependencies_parsed_at":"2024-04-16T02:27:50.514Z","dependency_job_id":"179cd3a8-d249-4193-904c-c14194ff3b77","html_url":"https://github.com/voxpelli/linemod","commit_stats":{"total_commits":46,"total_committers":3,"mean_commits":"15.333333333333334","dds":"0.15217391304347827","last_synced_commit":"9ce55a522aa58e7af79fb7d45737ebe512c9b620"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpelli%2Flinemod","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpelli%2Flinemod/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpelli%2Flinemod/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpelli%2Flinemod/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/voxpelli","download_url":"https://codeload.github.com/voxpelli/linemod/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232802717,"owners_count":18578681,"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":["cli","code-modification","codemod","comments","converter"],"created_at":"2024-10-10T00:20:37.527Z","updated_at":"2025-01-06T23:38:49.220Z","avatar_url":"https://github.com/voxpelli.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Linemod\n\n[![npm version](https://img.shields.io/npm/v/linemod.svg?style=flat)](https://www.npmjs.com/package/linemod)\n[![npm downloads](https://img.shields.io/npm/dm/linemod.svg?style=flat)](https://www.npmjs.com/package/linemod)\n[![neostandard javascript style](https://img.shields.io/badge/code_style-neostandard-7fffff?style=flat\u0026labelColor=ff80ff)](https://github.com/neostandard/neostandard)\n[![Follow @voxpelli@mastodon.social](https://img.shields.io/mastodon/follow/109247025527949675?domain=https%3A%2F%2Fmastodon.social\u0026style=social)](https://mastodon.social/@voxpelli)\n\nCLI companion for [linemod-core](https://github.com/voxpelli/linemod-core/), a comment driven line modification tool.\n\n## Usage\n\n### As npm script\n\n```json\n\"scripts\": {\n  \"test\": \"linemod -e new index.js lib/utils.js\"\n}\n```\n\n### Command line\n\n```bash\nnpm install -g linemod\n```\n\nThen run it at on your files that has modifications:\n\n```bash\nlinemod -e new index.js lib/utils.js\n```\n\nIf your command line supports globbing, then you can do:\n\n```bash\nlinemod -e new *.js lib/**/*.js\n```\n\n### Programmatic use\n\nUse [linemod-core](https://github.com/voxpelli/linemod-core) directly.\n\n## Flags\n\n* `--extension` / `-e` – **required** – the file extension used on the output files.\n\n### Additional command line flags\n\n* `--help` / `-h` – prints all available flags\n* `--strict` / `-s` – treats warnings as errors\n* `--verbose` / `-v` – prints warnings and notices\n\n## Available modifications\n\nAll [`linemod-core` modifications](https://github.com/voxpelli/linemod-core/#available-modifications) are supported. Linemods are added at the end of the line they are supposed to apply to.\n\n### `linemod-add:`\n\nPrefixes the line with whatever is specified after the keyword:\n\n```javascript\n// linemod-add: import escape from 'stringify-entities';\n```\n\nBecomes:\n\n```javascript\nimport escape from 'stringify-entities';\n```\n\n### `linemod-prefix-with:`\n\nPrefixes the line with whatever is specified after the keyword:\n\n```javascript\nconst exportedMethod = () =\u003e {}; // linemod-prefix-with: export\n```\n\nBecomes:\n\n```javascript\nexport const exportedMethod = () =\u003e {};\n```\n\n### `linemod-replace-with:`\n\nReplaces the line with whatever is specified after the keyword:\n\n```javascript\nconst escape = require('stringify-entities'); // linemod-replace-with: import escape from 'stringify-entities';\n```\n\nBecomes:\n\n```javascript\nimport escape from 'stringify-entities';\n```\n\n### `linemod-remove`\n\nSimply removes the entire line.\n\nQuite useful when combined with `linemod-prefix-with`:\n\n```javascript\nconst exportedMethod = () =\u003e {}; // linemod-prefix-with: export\nmodule.exports = { exportedMethod }; // linemod-remove\n```\n\nBecomes:\n\n```javascript\nexport const exportedMethod = () =\u003e {};\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoxpelli%2Flinemod","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvoxpelli%2Flinemod","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoxpelli%2Flinemod/lists"}