{"id":20852964,"url":"https://github.com/julianpoemp/codejar-linenumbers","last_synced_at":"2025-05-12T05:31:02.071Z","repository":{"id":184810683,"uuid":"672166580","full_name":"julianpoemp/codejar-linenumbers","owner":"julianpoemp","description":"Small repository that enables linenumbers on CodeJar code editor with \u003e= v4.","archived":false,"fork":false,"pushed_at":"2024-09-19T22:08:48.000Z","size":320,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-21T11:08:06.401Z","etag":null,"topics":["code-editor","codejar","plugin"],"latest_commit_sha":null,"homepage":"https://codepen.io/julianpoemp/full/jOjgQzG","language":"TypeScript","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/julianpoemp.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2023-07-29T06:21:55.000Z","updated_at":"2025-03-30T10:09:45.000Z","dependencies_parsed_at":"2024-09-18T18:20:42.252Z","dependency_job_id":"8ee98001-e6b7-4aa5-874d-662507df8474","html_url":"https://github.com/julianpoemp/codejar-linenumbers","commit_stats":{"total_commits":18,"total_committers":2,"mean_commits":9.0,"dds":0.05555555555555558,"last_synced_commit":"5206b8f6ec942ce0557030dd894e92ae1e29195a"},"previous_names":["julianpoemp/codejar-linenumbers"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julianpoemp%2Fcodejar-linenumbers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julianpoemp%2Fcodejar-linenumbers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julianpoemp%2Fcodejar-linenumbers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julianpoemp%2Fcodejar-linenumbers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/julianpoemp","download_url":"https://codeload.github.com/julianpoemp/codejar-linenumbers/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252013398,"owners_count":21680371,"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-editor","codejar","plugin"],"created_at":"2024-11-18T03:19:23.713Z","updated_at":"2025-05-12T05:30:57.312Z","avatar_url":"https://github.com/julianpoemp.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# codejar-linenumbers\n\nThird party package that enables line numbers on [CodeJar](https://github.com/antonmedv/codejar) code editor for version \u003e= 4. It's already used by [ngx-codejar](https://github.com/julianpoemp/ngx-codejar) - an Angular wrapper for Codejar.\n\n## Demo\n\nhttps://codepen.io/julianpoemp/full/jOjgQzG\n\n## Background\n\nCodeJar 4 dropped the line numbers feature. This package returns it.\n\n## Installation \n\n### Via NPM\n\n1. Make sure you have CodeJar \u003e= 4.0.0 installed.\n2. Install codejar-linenumbers\n    ````\n    npm install --save codejar-linenumbers\n    ````\n3. If you don't want to use ESM you can import this library using the IFFEE build:\n\n````HTML\n\u003c!-- place the CSS file after the HighlightJS/PrismJS stylesheets --\u003e\n\u003clink rel=\"stylesheet\" href=\"\u003cnode_modules_dir\u003e/codejar-linenumbers/js/codejar-linenumbers.css\"/\u003e\n\u003cscript type=\"application/javascript\" src=\"\u003cnode_modules_dir\u003e/codejar-linenumbers/js/codejar-linenumbers.min.js\"\u003e\u003c/script\u003e\n````\n\n4. If you want to use this library with ESM or Typescript, don't forget to load the `codejar-linenumbers.css` file into your app.\n### Via CDN\n\n#### IFFEE (no module)\n\n````HTML\n\u003c!-- place the CSS file after the HighlightJS/PrismJS stylesheets --\u003e\n\u003clink rel=\"stylesheet\" href=\"https://unpkg.com/codejar-linenumbers/js/codejar-linenumbers.css\"/\u003e\n\u003cscript type=\"application/javascript\" src=\"https://unpkg.com/codejar-linenumbers/js/codejar-linenumbers.min.js\"\u003e\u003c/script\u003e\n````\n\n#### ESM\n\n````HTML\n\u003c!-- place the CSS file after the HighlightJS/PrismJS stylesheets --\u003e\n\u003clink rel=\"stylesheet\" href=\"https://unpkg.com/codejar-linenumbers/es/codejar-linenumbers.css\"/\u003e\n\u003cscript type=\"application/javascript\" src=\"https://unpkg.com/codejar-linenumbers/es/index.js\"\u003e\u003c/script\u003e\n````\n\n\n## Use\n\n### Typescript\n\n````Typescript\nimport {CodeJar} from 'codejar';\nimport {withLineNumbers} from \"codejar-linenumbers\";\n\nconst jar = CodeJar(editor, withLineNumbers(highlight), {tab: '\\t'});\n````\n\n### Javascript\n\n### ESM\nFor static HTML see example here: https://codepen.io/julianpoemp/pen/jOjgQzG .\n\n### Vanilla JS\nMake sure that the `codejar-linenumbers/js/codejar-linenumbers.min.js` file was loaded.\n\n````Javascript\nvar jar = CodeJar(editor, CodeJar.withLineNumbers(highlight), {tab: '\\t'});\n````\n\n## Issues\nPlease make sure that the issue is related to linenumbers only. For issues related to CodeJar please create issues [here](https://github.com/antonmedv/codejar/issues).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjulianpoemp%2Fcodejar-linenumbers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjulianpoemp%2Fcodejar-linenumbers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjulianpoemp%2Fcodejar-linenumbers/lists"}