{"id":19580471,"url":"https://github.com/vinpac/sublime-simple-import","last_synced_at":"2025-04-27T08:32:18.868Z","repository":{"id":90021480,"uuid":"51279200","full_name":"vinpac/sublime-simple-import","owner":"vinpac","description":"A Sublime Text Plugin that helps you to import your modules.","archived":false,"fork":false,"pushed_at":"2020-08-24T19:48:47.000Z","size":5082,"stargazers_count":14,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-04T23:33:07.951Z","etag":null,"topics":["importer","javascript","python","scss","sublime","sublime-text"],"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/vinpac.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":"2016-02-08T04:29:49.000Z","updated_at":"2023-05-05T21:29:22.000Z","dependencies_parsed_at":"2023-05-31T01:45:51.770Z","dependency_job_id":null,"html_url":"https://github.com/vinpac/sublime-simple-import","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinpac%2Fsublime-simple-import","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinpac%2Fsublime-simple-import/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinpac%2Fsublime-simple-import/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinpac%2Fsublime-simple-import/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vinpac","download_url":"https://codeload.github.com/vinpac/sublime-simple-import/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251112549,"owners_count":21538162,"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":["importer","javascript","python","scss","sublime","sublime-text"],"created_at":"2024-11-11T07:26:30.055Z","updated_at":"2025-04-27T08:32:18.860Z","avatar_url":"https://github.com/vinpac.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Simple Import v1.1.1\n====================\n\n[![Join the chat at https://gitter.im/sublime-simple-import/Lobby](https://badges.gitter.im/sublime-simple-import/Lobby.svg)](https://gitter.im/sublime-simple-import/Lobby?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\n`Simple import` is a plugin for Sublime Text that imports your modules. Currently it works with Javascript and Python. If you need to import modules in other languages [create an Issue](https://github.com/vinpac/sublime-simple-import/issues).\n\n![example gif](https://raw.githubusercontent.com/vinpac/sublime-simple-import/master/assets/example.gif)\n\n\n## Examples\nNote: These examples are Javascript-only. Simple Import works with Scss and Python too at the moment.\n\nvisibilityActions.js\n```\nexport const SET_VISIBILITY_FILTER = 'SET_VISIBILITY_FILTER'\nexport const SHOW_ALL = 'SHOW_ALL'\nexport const SHOW_COMPLETED = 'SHOW_COMPLETED'\nexport const SHOW_ACTIVE = 'SHOW_ACTIVE'\n```\n\nVisibleTodoList.js\n```\n// SHOW_ALL *Ctrl+Alt+J*\nimport { SHOW_ALL } from '../actions/visibilityActions'\n\n// SHOW_COMPLETED *Ctrl+Alt+J*\nimport { SHOW_ALL, SHOW_COMPLETED } from '../actions/visibilityActions'\n\n// visibilityActions *Ctrl+Alt+J*\nimport visibilityActions, {\n    SHOW_ALL,\n    SHOW_COMPLETED,\n} from '../actions/visibilityActions'\n// It also breaks your imports by the smallest rule\n\n// Simple Import looks into your package.json\n// and find files and variables inside your dependencies's folders.\n// For example\n// connect *Ctrl+Alt+J*\nimport { connect } from 'redux';\n\n// combineReducers *Ctrl+Alt+J*\nimport { connect, combineReducers } from 'redux';\n\n// req react *Ctrl+Alt+J*\nconst react = require(\"react\")\n```\n\nInstallation\n-------------\n\nYou can find this plugin in Packages Control by the name of \"Simple Import\". You can also clone it in you packages folder.\n\n - Open the Command Palette and find `Browse Packages`.  Select it and the packages folder will open.\n - Clone this repository in this folder\n\t - On Terminal, clone this repository: `git clone https://github.com/vinpac/sublime-simple-import.git`\n\t - or Download this repository as `rar` and put the content inside the packages folder\n\n\n### Javascript\n\nJavascript, by default, will add suffix to decorators. For Example `@autobind` becomes `Import autobind from 'autobind-decorator';`. It can also look into your dependencies for exported values and even find submodules if the modules exports an object. For example in `draft-js`.\n\n```\nvar DraftPublic = {\n  Editor: DraftEditor,\n  // ...\n};\n\nmodule.exports = DraftPublic;\n```\n\nSI will look into this file and understand it exports an object with the key `Editor`. So, if you try to import Editor in your project. SI will add (or give the option) `import { Editor } from 'draft-js'`.\n\nDon't worry, it's all cached after the first usage by module version so, if you update your modules, SI will update this module's cached submodules and files.\n\n\n#### Settings \n\n**extensions**  (Array) : Extensions to match. Default: `[\".js\", \".jsx\"]`\n\n**remove_extensions**  (Array) : Remove extensions from path. Default: `[\".js\"]`\n\n**extra_extensions**  (Array) : Extensions to match, but SI will not look into these files for submodules. Default: `[\".png\", \".jpg\", \".jpeg\", \".svg\", \".json\", \".gif\", \".css\", \".scss\", \".less\"]`\n\n**ignore**  (Array) : Paths to be ignored when crawling for modules.\n\n**omit**  (Array) : Omited values. Default: `[]`\n    Example: `[\"react-redux.connect\"]` ignores `connect`  that `react-redux` exports.\n\n**dictionary** (Object) : Map of module values. For values that won't be found by default, like `immutable` module. Example:\n\n```\n\"dictionary\": {\n  \"modules\": {\n    \"cx\": \"classnames\"\n  },\n  \"modules_exports\": {\n    \"immutable\": [\n      \"Map\",\n      \"Set\",\n      \"Stack\",\n      \"List\",\n      \"Stack\"\n    ]\n  }\n}\n```\n\n**require_by_default**  (Boolean) : Prefer `require` than `import`. Default: `False`\n\n**add_semicolon**  (Boolean) : Add `;` at the end of the import. Default: `True`\n\n**es5**  (Boolean) : Will force `require_by_default`, `add_semicolon` and will use `var` instead of `const`. Default: False\n\n### SCSS\n\nCurrently, it finds your `.scss` files and imports them.\n\n#### Settings\n\n**extensions**  (Array) : Extensions to match. Default: `[\".scss\"]`\n\n**extra_extensions**  (Array) : Extensions of files to match and import as `url(\u003cpath\u003e)`. Default: `[\".jpg\", \".png\", \".gif\", \".svg\"]`\n\n**ignore**  (Array) : Paths to be ignored when crawling for modules.\n\n**single_quotes**  (Boolean) : Use single quotes instead of double. Default: `false`\n\n### Python\n\n#### Settings \n\n**extensions**  (Array) : Extensions to match. Default: `[\".py\"]`\n\n**remove_extensions**  (Array) : Remove extensions from path. Default: `[\".py\"]`\n\n**ignore**  (Array) : Paths to be ignored when crawling for modules.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvinpac%2Fsublime-simple-import","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvinpac%2Fsublime-simple-import","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvinpac%2Fsublime-simple-import/lists"}