{"id":13448309,"url":"https://github.com/julianburr/sublime-import-cost","last_synced_at":"2025-03-22T09:31:12.599Z","repository":{"id":94030456,"uuid":"107069938","full_name":"julianburr/sublime-import-cost","owner":"julianburr","description":"Sublime Text 3 plugin that shows the import costs of imported JS modules","archived":false,"fork":false,"pushed_at":"2017-12-24T02:50:31.000Z","size":712,"stargazers_count":21,"open_issues_count":4,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-28T14:27:19.468Z","etag":null,"topics":["import-cost","plugin","sublime-text-3","webpack"],"latest_commit_sha":null,"homepage":null,"language":"Python","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/julianburr.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":"2017-10-16T02:43:03.000Z","updated_at":"2021-10-07T15:02:09.000Z","dependencies_parsed_at":"2023-03-06T00:30:39.055Z","dependency_job_id":null,"html_url":"https://github.com/julianburr/sublime-import-cost","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julianburr%2Fsublime-import-cost","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julianburr%2Fsublime-import-cost/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julianburr%2Fsublime-import-cost/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julianburr%2Fsublime-import-cost/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/julianburr","download_url":"https://codeload.github.com/julianburr/sublime-import-cost/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244937751,"owners_count":20535124,"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":["import-cost","plugin","sublime-text-3","webpack"],"created_at":"2024-07-31T05:01:41.760Z","updated_at":"2025-03-22T09:31:12.569Z","avatar_url":"https://github.com/julianburr.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Sublime Plugin Import Cost\n\nSublime Text 3 plugin that shows the [import costs](https://github.com/wix/import-cost/) of imported JS modules.\n\n![Example GIF](./example.gif)\n\n## Install\n\nThe best way is to install the plugin via [Package Control](https://packagecontrol.io/), just search for `import cost`. Besides that, you also have to have [`node`](https://nodejs.org/en/) installed, as well as the npm package [`import-cost`](https://github.com/wix/import-cost):\n\n```bash\nnpm i -g import-cost\n```\n\n## Config\n\nTo change config options, open the menu `Sublime Text \u003e Preferences \u003e Package Settings \u003e Import Cost` after installing the plugin. The following options are available:\n\n```js\n{\n  // Check import costs of npm modules when saving a file\n  \"check_on_save\": true,\n\n  // Check import costs when opening a file\n  \"check_on_open\": true,\n\n  // File sizes for differnt warning levels in kb\n  \"min_size_warning\": 40,\n  \"min_size_error\": 100,\n\n  // Path to node binary\n  \"node_path\": \"/usr/local/bin/node\",\n\n  // File extensions that should be considered\n  \"extensions\": [ \"js\", \"jsx\" ],\n\n  // Show gzip size as well\n  \"show_gzip\": false\n}\n```\n\n## Shoutouts\n\nTo [wix](https://github.com/wix/import-cost/) for the awesome npm package, and to [@princemaple](https://github.com/princemaple) for contributing to make this plugin work on Windows as well 🎉\n\n## Todos\n\n - [x] ~~Add basic menus and settings~~\n - [x] ~~Add \"show gzip\" option~~\n - [x] ~~Make plugin available through plugin manager~~\n - [x] ~~Make plugin smarter to always find correct node_modules folder, no matter what folder is currently open in sublime~~\n - [ ] Add caching on python level (import-cost has caching itself, but we still have the expensive node bridge thing going on, which is very avoidable)\n - [x] ~~Windows support~~\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjulianburr%2Fsublime-import-cost","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjulianburr%2Fsublime-import-cost","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjulianburr%2Fsublime-import-cost/lists"}