{"id":13739480,"url":"https://github.com/peteringram0/babel-plugin-console-source","last_synced_at":"2025-03-28T22:30:48.961Z","repository":{"id":56556767,"uuid":"141460845","full_name":"peteringram0/babel-plugin-console-source","owner":"peteringram0","description":"Add the file name and line numbers to all console logs.","archived":false,"fork":false,"pushed_at":"2020-10-31T13:10:54.000Z","size":13,"stargazers_count":38,"open_issues_count":2,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-21T07:41:30.126Z","etag":null,"topics":["babel","babel-plugin","console-log","line-numbers","logging"],"latest_commit_sha":null,"homepage":"","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/peteringram0.png","metadata":{"files":{"readme":"README.md","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}},"created_at":"2018-07-18T16:24:07.000Z","updated_at":"2025-03-05T01:29:31.000Z","dependencies_parsed_at":"2022-08-15T20:50:52.687Z","dependency_job_id":null,"html_url":"https://github.com/peteringram0/babel-plugin-console-source","commit_stats":null,"previous_names":["peteringram0/babel-console-source"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peteringram0%2Fbabel-plugin-console-source","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peteringram0%2Fbabel-plugin-console-source/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peteringram0%2Fbabel-plugin-console-source/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peteringram0%2Fbabel-plugin-console-source/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peteringram0","download_url":"https://codeload.github.com/peteringram0/babel-plugin-console-source/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246109608,"owners_count":20724904,"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":["babel","babel-plugin","console-log","line-numbers","logging"],"created_at":"2024-08-03T04:00:34.404Z","updated_at":"2025-03-28T22:30:48.713Z","avatar_url":"https://github.com/peteringram0.png","language":"JavaScript","funding_links":[],"categories":["Plugins"],"sub_categories":["General Plugins"],"readme":"# Babel-plugin-console-source\nPrepends file name and line numbers for each console command, based on the source files.\n\n````javascript\n// app.js\nclass App() {\n    constructor() {\n        console.log('test')\n    }\n}\n↓ ↓ ↓ ↓ ↓ ↓\nclass App() {\n    constructor() {\n        console.log('app.js (3:8)', 'test')\n    }\n}\n\n// test.js\nclass Test() {\n    constructor() {\n        console.log('test two')\n    }\n}\n↓ ↓ ↓ ↓ ↓ ↓\nclass Test() {\n    constructor() {\n        console.log('test.js (3:8)', 'test two')\n    }\n}\n````\n\n\n### Usage\n\n````bash\n$ yarn add babel-plugin-console-source -D\n````\n\n\n.babelrc\n````javascript\n{\n    \"plugins\": [\n        \n        // consoleSource // No options required\n        \n        // You can pass in the following options\n        [\"console-source\", {\n        \n            \"segments\": 1, // NOT REQUIRED\n            // 0 = full file path (Default)\n            // 1 = file name ONLY\n            // 2 = file name and last segment\n            \n            \"splitSegment\": '/' // How to split the path - NOT REQUIRED\n            // Default is / for Linux and OSX\n            // Windows users can use \"\\\\\" here if needed\n             \n        }]\n    ]\n}\n````\n\n### Notes\n\nNPM Install: https://www.npmjs.com/package/babel-plugin-console-source\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeteringram0%2Fbabel-plugin-console-source","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeteringram0%2Fbabel-plugin-console-source","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeteringram0%2Fbabel-plugin-console-source/lists"}