├── spec ├── fixtures │ ├── dir │ │ ├── file1 │ │ ├── b │ │ ├── a-dir │ │ │ └── oh-git │ │ └── a │ ├── cson.cson │ ├── git │ │ ├── working-dir │ │ │ ├── a.txt │ │ │ ├── .gitignore │ │ │ └── git.git │ │ │ │ ├── HEAD │ │ │ │ ├── refs │ │ │ │ └── heads │ │ │ │ │ └── master │ │ │ │ ├── index │ │ │ │ ├── config │ │ │ │ └── objects │ │ │ │ ├── 16 │ │ │ │ └── 735fb793d7b038818219c4b8c6295346e20eef │ │ │ │ ├── 52 │ │ │ │ └── f56457b6fca045ce41bb9d32e6ca79d23192af │ │ │ │ ├── 65 │ │ │ │ └── a457425a679cbe9adf0d2741785d3ceabb44a7 │ │ │ │ ├── 66 │ │ │ │ └── dc9051da651c15d98d017a88658263cab28f02 │ │ │ │ ├── 06 │ │ │ │ └── 15f9a45968b3515e0a202530ef9f61aba26b6c │ │ │ │ ├── 5b │ │ │ │ └── 24ab4c3baadf534242b1acc220c8fa051b9b20 │ │ │ │ ├── 8a │ │ │ │ └── 9c86f1cb1f14b8f436eb91f4b052c8802ca99e │ │ │ │ ├── e6 │ │ │ │ └── 9de29bb2d1d6434b8b29ae775ad8c2e48c5391 │ │ │ │ ├── ec │ │ │ │ └── 5e386905ff2d36e291086a1207f2585aaa8920 │ │ │ │ ├── ef │ │ │ │ └── 046e9eecaa5255ea5e9817132d4001724d6ae1 │ │ │ │ ├── fe │ │ │ │ └── bde178cdf35e9df6279d87aa27590c6d92e354 │ │ │ │ └── ff │ │ │ │ └── c8218bd2240a0cb92f6f02548d45784428349b │ │ ├── ignore.git │ │ │ ├── info │ │ │ │ └── exclude │ │ │ ├── HEAD │ │ │ ├── refs │ │ │ │ └── heads │ │ │ │ │ └── master │ │ │ ├── index │ │ │ ├── config │ │ │ └── objects │ │ │ │ ├── 65 │ │ │ │ └── a457425a679cbe9adf0d2741785d3ceabb44a7 │ │ │ │ ├── e6 │ │ │ │ └── 9de29bb2d1d6434b8b29ae775ad8c2e48c5391 │ │ │ │ └── ef │ │ │ │ └── 046e9eecaa5255ea5e9817132d4001724d6ae1 │ │ └── master.git │ │ │ ├── HEAD │ │ │ ├── refs │ │ │ └── heads │ │ │ │ └── master │ │ │ ├── index │ │ │ ├── config │ │ │ └── objects │ │ │ ├── 65 │ │ │ └── a457425a679cbe9adf0d2741785d3ceabb44a7 │ │ │ ├── e6 │ │ │ └── 9de29bb2d1d6434b8b29ae775ad8c2e48c5391 │ │ │ └── ef │ │ │ └── 046e9eecaa5255ea5e9817132d4001724d6ae1 │ ├── sample.txt │ ├── packages │ │ ├── package-with-empty-menu │ │ │ ├── menus │ │ │ │ └── menu.cson │ │ │ └── package.json │ │ ├── package-with-empty-keymap │ │ │ ├── keymaps │ │ │ │ └── keymap.cson │ │ │ └── package.json │ │ ├── theme-with-invalid-styles │ │ │ ├── index.less │ │ │ └── package.json │ │ ├── package-with-incompatible-native-module │ │ │ ├── main.js │ │ │ ├── node_modules │ │ │ │ └── native-module │ │ │ │ │ ├── build │ │ │ │ │ └── Release │ │ │ │ │ │ └── native.node │ │ │ │ │ ├── main.js │ │ │ │ │ └── package.json │ │ │ └── package.json │ │ ├── theme-with-syntax-variables │ │ │ ├── styles │ │ │ │ └── editor.less │ │ │ └── package.json │ │ ├── package-with-invalid-styles │ │ │ ├── styles │ │ │ │ └── index.less │ │ │ └── package.json │ │ ├── package-with-styles │ │ │ └── styles │ │ │ │ ├── 4.css │ │ │ │ ├── 1.css │ │ │ │ ├── 3.test-context.css │ │ │ │ └── 2.less │ │ ├── package-with-broken-keymap │ │ │ └── keymaps │ │ │ │ └── broken.json │ │ ├── package-with-broken-package-json │ │ │ └── package.json │ │ ├── package-with-invalid-grammar │ │ │ ├── grammars │ │ │ │ └── grammar.json │ │ │ └── package.json │ │ ├── package-with-invalid-settings │ │ │ ├── settings │ │ │ │ └── settings.json │ │ │ └── package.json │ │ ├── package-with-no-activate │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── package-without-module │ │ │ └── package.cson │ │ ├── package-with-main │ │ │ ├── package.cson │ │ │ └── main-module.coffee │ │ ├── theme-with-index-css │ │ │ ├── package.json │ │ │ └── index.css │ │ ├── package-with-index │ │ │ └── index.coffee │ │ ├── package-with-serialize-error │ │ │ ├── package.cson │ │ │ └── index.coffee │ │ ├── theme-with-index-less │ │ │ ├── package.json │ │ │ └── index.less │ │ ├── package-with-menus-manifest │ │ │ ├── package.cson │ │ │ └── menus │ │ │ │ ├── menu-3.cson │ │ │ │ ├── menu-1.cson │ │ │ │ └── menu-2.cson │ │ ├── package-with-style-sheets-manifest │ │ │ ├── package.cson │ │ │ └── styles │ │ │ │ ├── 1.css │ │ │ │ ├── 3.css │ │ │ │ └── 2.less │ │ ├── package-with-stylesheets-manifest │ │ │ └── package.cson │ │ ├── package-with-keymaps-manifest │ │ │ ├── package.cson │ │ │ └── keymaps │ │ │ │ ├── keymap-3.cson │ │ │ │ ├── keymap-1.json │ │ │ │ └── keymap-2.cson │ │ ├── package-with-empty-activation-commands │ │ │ ├── index.coffee │ │ │ └── package.json │ │ ├── package-with-empty-activation-hooks │ │ │ ├── index.coffee │ │ │ └── package.json │ │ ├── package-with-keymaps │ │ │ └── keymaps │ │ │ │ ├── keymap-1.cson │ │ │ │ ├── keymap-2.cson │ │ │ │ └── keymap-3.cjson │ │ ├── wordcount │ │ │ └── package.json │ │ ├── sublime-tabs │ │ │ └── package.json │ │ ├── package-with-deactivate │ │ │ └── index.coffee │ │ ├── package-that-throws-an-exception │ │ │ └── index.coffee │ │ ├── theme-with-ui-variables │ │ │ ├── package.json │ │ │ └── styles │ │ │ │ ├── editor.less │ │ │ │ └── ui-variables.less │ │ ├── package-with-activation-commands │ │ │ ├── package.cson │ │ │ └── index.coffee │ │ ├── package-with-settings │ │ │ └── settings │ │ │ │ └── omg.cson │ │ ├── package-with-missing-consumed-services │ │ │ ├── index.coffee │ │ │ └── package.json │ │ ├── package-with-missing-provided-services │ │ │ ├── index.coffee │ │ │ └── package.json │ │ ├── package-with-rb-filetype │ │ │ ├── package.json │ │ │ └── grammars │ │ │ │ └── rb.cson │ │ ├── theme-with-incomplete-ui-variables │ │ │ ├── package.json │ │ │ └── styles │ │ │ │ ├── ui-variables.less │ │ │ │ └── editor.less │ │ ├── theme-without-package-file │ │ │ └── styles │ │ │ │ ├── b.css │ │ │ │ ├── c.less │ │ │ │ ├── a.css │ │ │ │ └── d.csv │ │ ├── package-with-invalid-context-menu │ │ │ ├── package.json │ │ │ └── menus │ │ │ │ └── menu.json │ │ ├── theme-with-package-file │ │ │ ├── package.json │ │ │ └── styles │ │ │ │ ├── last.css │ │ │ │ ├── first.css │ │ │ │ └── second.less │ │ ├── package-with-activation-hooks │ │ │ ├── index.coffee │ │ │ └── package.cson │ │ ├── package-with-different-directory-name │ │ │ └── package.json │ │ ├── package-with-invalid-url-package-json │ │ │ └── package.json │ │ ├── package-with-short-url-package-json │ │ │ └── package.json │ │ ├── package-that-throws-on-activate │ │ │ └── index.coffee │ │ ├── package-that-throws-on-deactivate │ │ │ └── index.coffee │ │ ├── package-with-config-defaults │ │ │ └── index.coffee │ │ ├── package-with-serialization │ │ │ └── index.coffee │ │ ├── package-with-deprecated-pane-item-method │ │ │ └── index.coffee │ │ ├── package-with-injection-selector │ │ │ └── grammars │ │ │ │ └── grammar.cson │ │ ├── package-with-menus │ │ │ └── menus │ │ │ │ ├── menu-2.cson │ │ │ │ ├── menu-1.cson │ │ │ │ └── menu-3.cson │ │ ├── package-with-consumed-services │ │ │ ├── index.coffee │ │ │ └── package.json │ │ ├── package-with-invalid-activation-commands │ │ │ └── package.json │ │ ├── package-with-grammars │ │ │ └── grammars │ │ │ │ ├── alot.cson │ │ │ │ └── alittle.cson │ │ ├── package-with-config-schema │ │ │ └── index.coffee │ │ └── package-with-provided-services │ │ │ ├── index.coffee │ │ │ └── package.json │ ├── module-cache │ │ └── file.json │ ├── script.js │ ├── shebang │ ├── typescript │ │ ├── invalid.ts │ │ └── valid.ts │ ├── babel │ │ ├── invalid.js │ │ ├── babel-comment.js │ │ ├── babel-double-quotes.js │ │ └── babel-single-quotes.js │ ├── task-handler-with-deprecations.coffee │ ├── script-with-deprecations.js │ ├── task-spec-handler.coffee │ ├── css.css │ ├── sample.less │ ├── sample-with-tabs.coffee │ ├── sample-with-tabs-and-leading-comment.coffee │ ├── sample-with-tabs-and-initial-comment.js │ ├── sample.js │ ├── coffee.coffee │ └── sample-with-comments.js ├── integration │ ├── fixtures │ │ └── atom-home │ │ │ └── config.cson │ └── helpers │ │ └── atom-launcher.sh ├── typescript-spec.coffee ├── atom-protocol-handler-spec.coffee ├── clipboard-spec.coffee ├── panel-spec.coffee ├── babel-spec.coffee ├── tokenized-line-spec.coffee ├── default-directory-searcher-spec.coffee ├── spec-bootstrap.coffee ├── spec-helper-platform.coffee ├── buffered-node-process-spec.coffee ├── space-pen-extensions-spec.coffee ├── command-installer-spec.coffee ├── jasmine-helper.coffee ├── spec-suite.coffee ├── deserializer-manager-spec.coffee ├── default-directory-provider-spec.coffee ├── workspace-element-spec.coffee ├── time-reporter.coffee ├── notification-manager-spec.coffee ├── panel-element-spec.coffee └── gutter-spec.coffee ├── .node-version ├── .python-version ├── docs ├── contributing.md ├── README.md ├── build-instructions │ ├── freebsd.md │ └── os-x.md └── contributing-to-packages.md ├── CHANGELOG.md ├── .coffeelintignore ├── dot-atom ├── .gitignore ├── packages │ └── README.md ├── init.coffee ├── snippets.cson ├── styles.less └── keymap.cson ├── resources ├── atom.png ├── mac │ ├── atom.icns │ ├── file.icns │ ├── helper-Info.plist │ └── speakeasy.pem ├── win │ ├── atom.ico │ ├── loading.gif │ ├── apm.sh │ ├── atom.js │ ├── atom.sh │ └── atom.cmd └── linux │ ├── icons │ ├── 16.png │ ├── 24.png │ ├── 32.png │ ├── 48.png │ ├── 64.png │ ├── 1024.png │ ├── 128.png │ ├── 256.png │ └── 512.png │ ├── atom.desktop.in │ ├── debian │ ├── lintian-overrides │ └── control.in │ └── redhat │ └── atom.spec.in ├── static ├── octicons.woff ├── images │ ├── octocat-spinner-128.gif │ └── transparent-background.gif ├── babelrc.json ├── links.less ├── icons.less ├── index.html ├── markdown.less ├── linux.less ├── popover-list.less ├── messages.less ├── text.less ├── workspace-view.less ├── select-list.less ├── sections.less ├── atom.less ├── bootstrap-overrides.less ├── syntax.less ├── variables │ ├── octicon-mixins.less │ └── syntax-variables.less ├── bootstrap.less ├── utilities.less ├── badges.less ├── panes.less └── buttons.less ├── apm ├── README.md └── package.json ├── script ├── build.cmd ├── clean.cmd ├── grunt.cmd ├── utils │ ├── compile-main-to-app │ ├── clean-open-with-menu │ ├── fix-author │ ├── run-grunt.js │ ├── clean-merged-branches │ ├── child-process-wrapper.js │ └── translate-crash-log-addresses.coffee ├── rpmbuild ├── bootstrap.cmd ├── grunt ├── cibuild-atom-rpm ├── copy-folder.cmd ├── test ├── cibuild-atom-linux ├── build ├── mkrpm ├── create-shortcut.cmd ├── set-version ├── mkdeb └── clean ├── src ├── subscriber-mixin.coffee ├── special-token-symbols.coffee ├── safe-clipboard.coffee ├── marker-observation-window.coffee ├── item-registry.coffee ├── window-bootstrap.coffee ├── replace-handler.coffee ├── custom-event-mixin.coffee ├── model.coffee ├── theme-package.coffee ├── scoped-properties.coffee ├── storage-folder.coffee ├── window.coffee ├── browser │ ├── context-menu.coffee │ ├── atom-protocol-handler.coffee │ └── auto-updater-win32.coffee ├── input-component.coffee ├── less-compile-cache.coffee ├── repository-status-handler.coffee ├── panel-element.coffee ├── scroll-view.coffee ├── coffee-script.js ├── gutter-component-helpers.coffee ├── scrollbar-corner-component.coffee ├── deprecated-packages.coffee ├── typescript.js ├── tiled-component.coffee ├── task-bootstrap.coffee ├── scope-descriptor.coffee ├── token.coffee ├── panel-container-element.coffee ├── clipboard.coffee ├── default-directory-provider.coffee ├── babel.js ├── scan-handler.coffee ├── panel-container.coffee ├── menu-helpers.coffee ├── overlay-manager.coffee ├── cursors-component.coffee ├── token-iterator.coffee ├── deserializer-manager.coffee ├── panel.coffee ├── keymap-extensions.coffee └── gutter.coffee ├── .gitignore ├── benchmark ├── benchmark-bootstrap.coffee └── browser-process-startup.coffee ├── .pairs ├── Dockerfile ├── .gitattributes ├── keymaps ├── emacs.cson └── base.cson ├── coffeelint.json ├── .travis.yml └── LICENSE.md /spec/fixtures/dir/file1: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.node-version: -------------------------------------------------------------------------------- 1 | v0.12.0 2 | -------------------------------------------------------------------------------- /.python-version: -------------------------------------------------------------------------------- 1 | 2.7.6 2 | -------------------------------------------------------------------------------- /spec/fixtures/cson.cson: -------------------------------------------------------------------------------- 1 | a: 4 2 | -------------------------------------------------------------------------------- /spec/fixtures/dir/b: -------------------------------------------------------------------------------- 1 | aaa ccc 2 | -------------------------------------------------------------------------------- /docs/contributing.md: -------------------------------------------------------------------------------- 1 | ../CONTRIBUTING.md -------------------------------------------------------------------------------- /spec/fixtures/dir/a-dir/oh-git: -------------------------------------------------------------------------------- 1 | bbb aaaa -------------------------------------------------------------------------------- /spec/fixtures/git/working-dir/a.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /spec/fixtures/sample.txt: -------------------------------------------------------------------------------- 1 | Some text. 2 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | See https://atom.io/releases 2 | -------------------------------------------------------------------------------- /spec/fixtures/git/ignore.git/info/exclude: -------------------------------------------------------------------------------- 1 | a.txt 2 | -------------------------------------------------------------------------------- /.coffeelintignore: -------------------------------------------------------------------------------- 1 | spec/fixtures 2 | benchmark/fixtures 3 | -------------------------------------------------------------------------------- /spec/fixtures/dir/a: -------------------------------------------------------------------------------- 1 | aaa bbb 2 | cc aa cc 3 | dollar$bill -------------------------------------------------------------------------------- /spec/fixtures/git/ignore.git/HEAD: -------------------------------------------------------------------------------- 1 | ref: refs/heads/master 2 | -------------------------------------------------------------------------------- /spec/fixtures/git/master.git/HEAD: -------------------------------------------------------------------------------- 1 | ref: refs/heads/master 2 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-empty-menu/menus/menu.cson: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /spec/fixtures/git/working-dir/.gitignore: -------------------------------------------------------------------------------- 1 | poop 2 | ignored.txt 3 | -------------------------------------------------------------------------------- /spec/fixtures/module-cache/file.json: -------------------------------------------------------------------------------- 1 | { 2 | "foo": "bar" 3 | } 4 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-empty-keymap/keymaps/keymap.cson: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /spec/fixtures/packages/theme-with-invalid-styles/index.less: -------------------------------------------------------------------------------- 1 | <> 2 | -------------------------------------------------------------------------------- /spec/fixtures/script.js: -------------------------------------------------------------------------------- 1 | process.stdout.write(process.argv[2]); 2 | -------------------------------------------------------------------------------- /spec/fixtures/git/working-dir/git.git/HEAD: -------------------------------------------------------------------------------- 1 | ref: refs/heads/master 2 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-incompatible-native-module/main.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /spec/fixtures/packages/theme-with-syntax-variables/styles/editor.less: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /spec/fixtures/shebang: -------------------------------------------------------------------------------- 1 | #!/usr/bin/ruby 2 | 3 | puts "America – fuck yeah!" -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-invalid-styles/styles/index.less: -------------------------------------------------------------------------------- 1 | { 2 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-styles/styles/4.css: -------------------------------------------------------------------------------- 1 | a { color: red } 2 | -------------------------------------------------------------------------------- /spec/fixtures/typescript/invalid.ts: -------------------------------------------------------------------------------- 1 | var foo = 123 123; // Syntax error 2 | -------------------------------------------------------------------------------- /spec/fixtures/typescript/valid.ts: -------------------------------------------------------------------------------- 1 | var inc = v => v + 1 2 | export = inc 3 | -------------------------------------------------------------------------------- /dot-atom/.gitignore: -------------------------------------------------------------------------------- 1 | storage 2 | compile-cache 3 | dev 4 | .npm 5 | .node-gyp 6 | -------------------------------------------------------------------------------- /spec/fixtures/babel/invalid.js: -------------------------------------------------------------------------------- 1 | 'use 6to6'; 2 | 3 | module.exports = v => v + 1 4 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-broken-keymap/keymaps/broken.json: -------------------------------------------------------------------------------- 1 | INVALID 2 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-broken-package-json/package.json: -------------------------------------------------------------------------------- 1 | INVALID 2 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-invalid-grammar/grammars/grammar.json: -------------------------------------------------------------------------------- 1 | >< 2 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-invalid-settings/settings/settings.json: -------------------------------------------------------------------------------- 1 | >< 2 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-no-activate/index.js: -------------------------------------------------------------------------------- 1 | module.exports = {} 2 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-without-module/package.cson: -------------------------------------------------------------------------------- 1 | "name": "perfect" 2 | -------------------------------------------------------------------------------- /resources/atom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/functions/atom/master/resources/atom.png -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-main/package.cson: -------------------------------------------------------------------------------- 1 | 'main': 'main-module.coffee' 2 | -------------------------------------------------------------------------------- /spec/fixtures/packages/theme-with-index-css/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "theme": "ui" 3 | } 4 | -------------------------------------------------------------------------------- /dot-atom/packages/README.md: -------------------------------------------------------------------------------- 1 | All packages in this directory will be automatically loaded 2 | -------------------------------------------------------------------------------- /spec/fixtures/babel/babel-comment.js: -------------------------------------------------------------------------------- 1 | /** @babel */ 2 | 3 | module.exports = v => v + 1 4 | -------------------------------------------------------------------------------- /spec/fixtures/git/ignore.git/refs/heads/master: -------------------------------------------------------------------------------- 1 | ef046e9eecaa5255ea5e9817132d4001724d6ae1 2 | -------------------------------------------------------------------------------- /spec/fixtures/git/master.git/refs/heads/master: -------------------------------------------------------------------------------- 1 | ef046e9eecaa5255ea5e9817132d4001724d6ae1 2 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-index/index.coffee: -------------------------------------------------------------------------------- 1 | module.exports = 2 | activate: -> 3 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-serialize-error/package.cson: -------------------------------------------------------------------------------- 1 | 'main': 'index.coffee' 2 | -------------------------------------------------------------------------------- /spec/fixtures/packages/theme-with-index-less/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "theme": "ui" 3 | } 4 | -------------------------------------------------------------------------------- /static/octicons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/functions/atom/master/static/octicons.woff -------------------------------------------------------------------------------- /resources/mac/atom.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/functions/atom/master/resources/mac/atom.icns -------------------------------------------------------------------------------- /resources/mac/file.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/functions/atom/master/resources/mac/file.icns -------------------------------------------------------------------------------- /resources/win/atom.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/functions/atom/master/resources/win/atom.ico -------------------------------------------------------------------------------- /spec/fixtures/babel/babel-double-quotes.js: -------------------------------------------------------------------------------- 1 | "use babel"; 2 | 3 | module.exports = v => v + 1 4 | -------------------------------------------------------------------------------- /spec/fixtures/babel/babel-single-quotes.js: -------------------------------------------------------------------------------- 1 | 'use babel'; 2 | 3 | module.exports = v => v + 1 4 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-main/main-module.coffee: -------------------------------------------------------------------------------- 1 | module.exports = 2 | activate: -> 3 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-menus-manifest/package.cson: -------------------------------------------------------------------------------- 1 | menus: ["menu-2", "menu-1"] 2 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-style-sheets-manifest/package.cson: -------------------------------------------------------------------------------- 1 | styleSheets: ['2', '1'] 2 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-stylesheets-manifest/package.cson: -------------------------------------------------------------------------------- 1 | styleSheets: ['2', '1'] 2 | -------------------------------------------------------------------------------- /resources/win/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/functions/atom/master/resources/win/loading.gif -------------------------------------------------------------------------------- /spec/fixtures/git/working-dir/git.git/refs/heads/master: -------------------------------------------------------------------------------- 1 | 8a9c86f1cb1f14b8f436eb91f4b052c8802ca99e 2 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-keymaps-manifest/package.cson: -------------------------------------------------------------------------------- 1 | keymaps: ["keymap-2", "keymap-1"] 2 | -------------------------------------------------------------------------------- /resources/linux/icons/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/functions/atom/master/resources/linux/icons/16.png -------------------------------------------------------------------------------- /resources/linux/icons/24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/functions/atom/master/resources/linux/icons/24.png -------------------------------------------------------------------------------- /resources/linux/icons/32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/functions/atom/master/resources/linux/icons/32.png -------------------------------------------------------------------------------- /resources/linux/icons/48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/functions/atom/master/resources/linux/icons/48.png -------------------------------------------------------------------------------- /resources/linux/icons/64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/functions/atom/master/resources/linux/icons/64.png -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-empty-activation-commands/index.coffee: -------------------------------------------------------------------------------- 1 | module.exports = activate: -> 2 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-empty-activation-hooks/index.coffee: -------------------------------------------------------------------------------- 1 | module.exports = activate: -> 2 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-keymaps/keymaps/keymap-1.cson: -------------------------------------------------------------------------------- 1 | ".test-1": 2 | "ctrl-z": "test-1" 3 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-keymaps/keymaps/keymap-2.cson: -------------------------------------------------------------------------------- 1 | ".test-2": 2 | "ctrl-z": "test-2" 3 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-keymaps/keymaps/keymap-3.cjson: -------------------------------------------------------------------------------- 1 | ".test-3": 2 | "ctrl-z": "test-3" 3 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-styles/styles/1.css: -------------------------------------------------------------------------------- 1 | #jasmine-content { 2 | font-size: 1px; 3 | } 4 | -------------------------------------------------------------------------------- /spec/fixtures/task-handler-with-deprecations.coffee: -------------------------------------------------------------------------------- 1 | {Git} = require 'atom' 2 | 3 | module.exports = -> 4 | -------------------------------------------------------------------------------- /resources/linux/icons/1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/functions/atom/master/resources/linux/icons/1024.png -------------------------------------------------------------------------------- /resources/linux/icons/128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/functions/atom/master/resources/linux/icons/128.png -------------------------------------------------------------------------------- /resources/linux/icons/256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/functions/atom/master/resources/linux/icons/256.png -------------------------------------------------------------------------------- /resources/linux/icons/512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/functions/atom/master/resources/linux/icons/512.png -------------------------------------------------------------------------------- /spec/fixtures/packages/theme-with-index-css/index.css: -------------------------------------------------------------------------------- 1 | atom-text-editor { 2 | padding-top: 1234px; 3 | } 4 | -------------------------------------------------------------------------------- /spec/fixtures/packages/wordcount/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "wordcount", 3 | "version": "2.0.9" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/script-with-deprecations.js: -------------------------------------------------------------------------------- 1 | require('fs').existsSync('hi'); 2 | process.stdout.write('hi'); 3 | -------------------------------------------------------------------------------- /spec/fixtures/task-spec-handler.coffee: -------------------------------------------------------------------------------- 1 | module.exports = -> 2 | emit("some-event", 1, 2, 3) 3 | 'hello' 4 | -------------------------------------------------------------------------------- /spec/fixtures/css.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-size: 1234px; 3 | width: 110%; 4 | font-weight: bold !important; 5 | } 6 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-incompatible-native-module/node_modules/native-module/build/Release/native.node: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-keymaps-manifest/keymaps/keymap-3.cson: -------------------------------------------------------------------------------- 1 | ".test-3": 2 | "ctrl-y": "keymap-3" 3 | -------------------------------------------------------------------------------- /spec/fixtures/packages/sublime-tabs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "sublime-tabs", 3 | "version": "1.0.0" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/git/ignore.git/index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/functions/atom/master/spec/fixtures/git/ignore.git/index -------------------------------------------------------------------------------- /spec/fixtures/git/master.git/index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/functions/atom/master/spec/fixtures/git/master.git/index -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-deactivate/index.coffee: -------------------------------------------------------------------------------- 1 | module.exports = 2 | activate: -> 3 | deactivate: -> 4 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-style-sheets-manifest/styles/1.css: -------------------------------------------------------------------------------- 1 | #jasmine-content { 2 | font-size: 1px; 3 | } 4 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-style-sheets-manifest/styles/3.css: -------------------------------------------------------------------------------- 1 | #jasmine-content { 2 | font-size: 3px; 3 | } 4 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-styles/styles/3.test-context.css: -------------------------------------------------------------------------------- 1 | #jasmine-content { 2 | font-size: 3px; 3 | } 4 | -------------------------------------------------------------------------------- /spec/fixtures/sample.less: -------------------------------------------------------------------------------- 1 | @color: #4D926F; 2 | 3 | #header { 4 | color: @color; 5 | } 6 | h2 { 7 | color: @color; 8 | } -------------------------------------------------------------------------------- /apm/README.md: -------------------------------------------------------------------------------- 1 | This folder is where [apm](https://github.com/atom/apm) is installed to so that 2 | it is bundled with Atom. 3 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-that-throws-an-exception/index.coffee: -------------------------------------------------------------------------------- 1 | throw new Error("This package throws an exception") 2 | -------------------------------------------------------------------------------- /static/images/octocat-spinner-128.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/functions/atom/master/static/images/octocat-spinner-128.gif -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-styles/styles/2.less: -------------------------------------------------------------------------------- 1 | @size: 2px; 2 | 3 | #jasmine-content { 4 | font-size: @size; 5 | } 6 | -------------------------------------------------------------------------------- /spec/fixtures/packages/theme-with-ui-variables/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "theme": "ui", 3 | "styleSheets": ["editor.less"] 4 | } 5 | -------------------------------------------------------------------------------- /static/images/transparent-background.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/functions/atom/master/static/images/transparent-background.gif -------------------------------------------------------------------------------- /script/build.cmd: -------------------------------------------------------------------------------- 1 | @IF EXIST "%~dp0\node.exe" ( 2 | "%~dp0\node.exe" "%~dp0\build" %* 3 | ) ELSE ( 4 | node "%~dp0\build" %* 5 | ) 6 | -------------------------------------------------------------------------------- /script/clean.cmd: -------------------------------------------------------------------------------- 1 | @IF EXIST "%~dp0\node.exe" ( 2 | "%~dp0\node.exe" "%~dp0\clean" %* 3 | ) ELSE ( 4 | node "%~dp0\clean" %* 5 | ) 6 | -------------------------------------------------------------------------------- /script/grunt.cmd: -------------------------------------------------------------------------------- 1 | @IF EXIST "%~dp0\node.exe" ( 2 | "%~dp0\node.exe" "%~dp0\grunt" %* 3 | ) ELSE ( 4 | node "%~dp0\grunt" %* 5 | ) 6 | -------------------------------------------------------------------------------- /script/utils/compile-main-to-app: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | coffee -c -o /Applications/Atom.app/Contents/Resources/app/src/ src/main.coffee 4 | -------------------------------------------------------------------------------- /spec/fixtures/git/working-dir/git.git/index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/functions/atom/master/spec/fixtures/git/working-dir/git.git/index -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-activation-commands/package.cson: -------------------------------------------------------------------------------- 1 | 'activationCommands': 2 | '.workspace': 'activation-command' 3 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-empty-menu/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-with-empty-menu", 3 | "version": "1.0.0" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-settings/settings/omg.cson: -------------------------------------------------------------------------------- 1 | '.source.omg': 2 | 'editor': 3 | 'increaseIndentPattern': '^a' 4 | -------------------------------------------------------------------------------- /spec/fixtures/packages/theme-with-invalid-styles/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "theme-with-invalid-styles", 3 | "theme": "ui" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/packages/theme-with-syntax-variables/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "theme": "syntax", 3 | "styleSheets": ["editor.less"] 4 | } 5 | -------------------------------------------------------------------------------- /script/rpmbuild: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | script/build 6 | script/grunt mkrpm publish-build --stack --no-color --install-dir /usr 7 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-empty-keymap/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-with-empty-keymap", 3 | "version": "1.0.0" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-keymaps-manifest/keymaps/keymap-1.json: -------------------------------------------------------------------------------- 1 | { 2 | ".test-1": { 3 | "ctrl-z": "keymap-1" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-keymaps-manifest/keymaps/keymap-2.cson: -------------------------------------------------------------------------------- 1 | ".test-1": 2 | "ctrl-z": "keymap-2" 3 | "ctrl-n": "keymap-2" 4 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-missing-consumed-services/index.coffee: -------------------------------------------------------------------------------- 1 | module.exports = 2 | activate: -> 3 | 4 | deactivate: -> 5 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-missing-provided-services/index.coffee: -------------------------------------------------------------------------------- 1 | module.exports = 2 | activate: -> 3 | 4 | deactivate: -> 5 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-no-activate/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-with-no-activate", 3 | "version": "1.0.0" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-rb-filetype/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-with-rb-filetype", 3 | "version": "1.0.0" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/packages/theme-with-incomplete-ui-variables/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "theme": "ui", 3 | "styleSheets": ["editor.less"] 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/packages/theme-with-index-less/index.less: -------------------------------------------------------------------------------- 1 | @padding: 4321px; 2 | 3 | atom-text-editor { 4 | padding-top: @padding; 5 | } 6 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-invalid-grammar/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-with-invalid-grammar", 3 | "version": "1.0.0" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-invalid-styles/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-with-invalid-styles", 3 | "version": "1.0.0" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-style-sheets-manifest/styles/2.less: -------------------------------------------------------------------------------- 1 | @size: 2px; 2 | 3 | #jasmine-content { 4 | font-size: @size; 5 | } 6 | -------------------------------------------------------------------------------- /spec/fixtures/packages/theme-without-package-file/styles/b.css: -------------------------------------------------------------------------------- 1 | atom-text-editor { 2 | padding-right: 20px; 3 | padding-bottom: 20px; 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/packages/theme-without-package-file/styles/c.less: -------------------------------------------------------------------------------- 1 | @number: 30px; 2 | 3 | atom-text-editor { 4 | padding-bottom: @number; 5 | } 6 | -------------------------------------------------------------------------------- /resources/win/apm.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | directory=$(dirname "$0") 4 | "$directory/../app/apm/bin/node.exe" "$directory/../app/apm/lib/cli.js" "$@" 5 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-invalid-settings/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-with-invalid-settings", 3 | "version": "1.0.0" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/sample-with-tabs.coffee: -------------------------------------------------------------------------------- 1 | # Econ 101 2 | if this.studyingEconomics 3 | buy() while supply > demand 4 | sell() until supply > demand 5 | -------------------------------------------------------------------------------- /script/bootstrap.cmd: -------------------------------------------------------------------------------- 1 | @IF EXIST "%~dp0\node.exe" ( 2 | "%~dp0\node.exe" "%~dp0\bootstrap" %* 3 | ) ELSE ( 4 | node "%~dp0\bootstrap" %* 5 | ) 6 | 7 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-invalid-context-menu/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-with-invalid-context-menu", 3 | "version": "1.0.0" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/packages/theme-with-package-file/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "theme": "ui", 3 | "styleSheets": ["first.css", "second.less", "last.css"] 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-activation-hooks/index.coffee: -------------------------------------------------------------------------------- 1 | module.exports = 2 | activateCallCount: 0 3 | 4 | activate: -> 5 | @activateCallCount++ 6 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-different-directory-name/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-with-a-totally-different-name", 3 | "version": "1.0.0" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-invalid-url-package-json/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-with-invalid-url-package-json", 3 | "repository": "foo" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-menus-manifest/menus/menu-3.cson: -------------------------------------------------------------------------------- 1 | 'context-menu': 2 | '.test-1': [ 3 | {label: 'Menu item 3', command: 'command-3'} 4 | ] 5 | -------------------------------------------------------------------------------- /spec/fixtures/git/ignore.git/config: -------------------------------------------------------------------------------- 1 | [core] 2 | repositoryformatversion = 0 3 | filemode = true 4 | bare = false 5 | logallrefupdates = true 6 | ignorecase = true 7 | -------------------------------------------------------------------------------- /spec/fixtures/git/master.git/config: -------------------------------------------------------------------------------- 1 | [core] 2 | repositoryformatversion = 0 3 | filemode = true 4 | bare = false 5 | logallrefupdates = true 6 | ignorecase = true 7 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-incompatible-native-module/node_modules/native-module/main.js: -------------------------------------------------------------------------------- 1 | throw new Error("this simulates a native module's failure to load") 2 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-incompatible-native-module/node_modules/native-module/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "native-module", 3 | "main": "./main.js" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-short-url-package-json/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-with-short-url-package-json", 3 | "repository": "example/repo" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/packages/theme-with-package-file/styles/last.css: -------------------------------------------------------------------------------- 1 | atom-text-editor { 2 | /* padding-top: 103px; 3 | padding-right: 103px;*/ 4 | padding-bottom: 103px; 5 | } -------------------------------------------------------------------------------- /spec/fixtures/packages/theme-without-package-file/styles/a.css: -------------------------------------------------------------------------------- 1 | atom-text-editor { 2 | padding-top: 10px; 3 | padding-right: 10px; 4 | padding-bottom: 10px; 5 | } 6 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-that-throws-on-activate/index.coffee: -------------------------------------------------------------------------------- 1 | module.exports = 2 | activate: -> throw new Error('Top that') 3 | deactivate: -> 4 | serialize: -> 5 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-that-throws-on-deactivate/index.coffee: -------------------------------------------------------------------------------- 1 | module.exports = 2 | activate: -> 3 | deactivate: -> throw new Error('Top that') 4 | serialize: -> 5 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-config-defaults/index.coffee: -------------------------------------------------------------------------------- 1 | module.exports = 2 | configDefaults: 3 | numbers: { one: 1, two: 2 } 4 | 5 | activate: -> # no-op 6 | -------------------------------------------------------------------------------- /spec/fixtures/packages/theme-without-package-file/styles/d.csv: -------------------------------------------------------------------------------- 1 | atom-text-editor { 2 | padding-top: 100px; 3 | padding-right: 100px; 4 | padding-bottom: 100px; 5 | } 6 | -------------------------------------------------------------------------------- /spec/fixtures/git/working-dir/git.git/config: -------------------------------------------------------------------------------- 1 | [core] 2 | repositoryformatversion = 0 3 | filemode = true 4 | bare = false 5 | logallrefupdates = true 6 | ignorecase = true 7 | -------------------------------------------------------------------------------- /spec/fixtures/sample-with-tabs-and-leading-comment.coffee: -------------------------------------------------------------------------------- 1 | # This is a comment 2 | if this.studyingEconomics 3 | buy() while supply > demand 4 | sell() until supply > demand 5 | -------------------------------------------------------------------------------- /spec/integration/fixtures/atom-home/config.cson: -------------------------------------------------------------------------------- 1 | "*": 2 | welcome: 3 | showOnStartup: false 4 | "exception-reporting": 5 | userId: "7c0a3c52-795c-5e20-5323-64efcf91f212" 6 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-empty-activation-hooks/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-with-empty-activation-hooks", 3 | "version": "0.1.0", 4 | "activationHooks": [] 5 | } 6 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-serialization/index.coffee: -------------------------------------------------------------------------------- 1 | module.exports = 2 | activate: ({@someNumber}) -> 3 | @someNumber ?= 1 4 | 5 | serialize: -> 6 | {@someNumber} 7 | -------------------------------------------------------------------------------- /spec/fixtures/packages/theme-with-package-file/styles/first.css: -------------------------------------------------------------------------------- 1 | atom-text-editor { 2 | padding-top: 101px; 3 | padding-right: 101px; 4 | padding-bottom: 101px; 5 | 6 | color: red; 7 | } -------------------------------------------------------------------------------- /static/babelrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "breakConfig": true, 3 | "sourceMap": "inline", 4 | "blacklist": ["es6.forOf", "useStrict"], 5 | "optional": ["asyncToGenerator"], 6 | "stage": 0 7 | } 8 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-deprecated-pane-item-method/index.coffee: -------------------------------------------------------------------------------- 1 | class TestItem 2 | getUri: -> "test" 3 | 4 | exports.activate = -> 5 | atom.workspace.addOpener -> new TestItem 6 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-incompatible-native-module/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-with-incompatible-native-module", 3 | "version": "1.0.0", 4 | "main": "./main.js" 5 | } 6 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-serialize-error/index.coffee: -------------------------------------------------------------------------------- 1 | module.exports = 2 | activate: -> 3 | 4 | deactivate: -> 5 | 6 | serialize: -> 7 | throw new Error("I'm no good at this.") 8 | -------------------------------------------------------------------------------- /src/subscriber-mixin.coffee: -------------------------------------------------------------------------------- 1 | {Subscriber} = require 'emissary' 2 | SubscriberMixin = componentDidUnmount: -> @unsubscribe() 3 | Subscriber.extend(SubscriberMixin) 4 | module.exports = SubscriberMixin 5 | -------------------------------------------------------------------------------- /script/grunt: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | var runGrunt = require('./utils/run-grunt.js'); 3 | 4 | // build/node_modules/.bin/grunt "$@" 5 | var args = process.argv.slice(2); 6 | runGrunt(args, process.exit); 7 | -------------------------------------------------------------------------------- /spec/fixtures/git/ignore.git/objects/65/a457425a679cbe9adf0d2741785d3ceabb44a7: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/functions/atom/master/spec/fixtures/git/ignore.git/objects/65/a457425a679cbe9adf0d2741785d3ceabb44a7 -------------------------------------------------------------------------------- /spec/fixtures/git/ignore.git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/functions/atom/master/spec/fixtures/git/ignore.git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 -------------------------------------------------------------------------------- /spec/fixtures/git/ignore.git/objects/ef/046e9eecaa5255ea5e9817132d4001724d6ae1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/functions/atom/master/spec/fixtures/git/ignore.git/objects/ef/046e9eecaa5255ea5e9817132d4001724d6ae1 -------------------------------------------------------------------------------- /spec/fixtures/git/master.git/objects/65/a457425a679cbe9adf0d2741785d3ceabb44a7: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/functions/atom/master/spec/fixtures/git/master.git/objects/65/a457425a679cbe9adf0d2741785d3ceabb44a7 -------------------------------------------------------------------------------- /spec/fixtures/git/master.git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/functions/atom/master/spec/fixtures/git/master.git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 -------------------------------------------------------------------------------- /spec/fixtures/git/master.git/objects/ef/046e9eecaa5255ea5e9817132d4001724d6ae1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/functions/atom/master/spec/fixtures/git/master.git/objects/ef/046e9eecaa5255ea5e9817132d4001724d6ae1 -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-injection-selector/grammars/grammar.cson: -------------------------------------------------------------------------------- 1 | 'name': 'test' 2 | 'scopeName': 'source.test' 3 | 'injectionSelector': 'comment' 4 | 'patterns': [{'include': 'source.sql'}] 5 | -------------------------------------------------------------------------------- /spec/fixtures/packages/theme-with-package-file/styles/second.less: -------------------------------------------------------------------------------- 1 | @number: 102px; 2 | 3 | atom-text-editor { 4 | /* padding-top: 102px;*/ 5 | padding-right: @number; 6 | padding-bottom: @number; 7 | } -------------------------------------------------------------------------------- /script/utils/clean-open-with-menu: -------------------------------------------------------------------------------- 1 | /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user 2 | killall Finder 3 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-activation-hooks/package.cson: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-with-activation-hooks", 3 | "version": "0.1.0", 4 | "activationHooks": ['language-fictitious:grammar-used'] 5 | } 6 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-menus/menus/menu-2.cson: -------------------------------------------------------------------------------- 1 | 'menu': [ 2 | { 'label': 'Last' } 3 | ] 4 | 5 | 'context-menu': 6 | '.test-1': [ 7 | {label: 'Menu item 2', command: 'command-2'} 8 | ] 9 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-menus/menus/menu-1.cson: -------------------------------------------------------------------------------- 1 | 'menu': [ 2 | {'label': 'Second to Last'} 3 | ] 4 | 5 | 'context-menu': 6 | '.test-1': [ 7 | {label: 'Menu item 1', command: 'command-1'} 8 | ] 9 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-empty-activation-commands/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-with-empty-activation-commands", 3 | "version": "0.1.0", 4 | "activationCommands": {"atom-workspace": []} 5 | } 6 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-menus-manifest/menus/menu-1.cson: -------------------------------------------------------------------------------- 1 | 'menu': [ 2 | { 'label': 'Last' } 3 | ] 4 | 5 | 'context-menu': 6 | '.test-1': [ 7 | {label: 'Menu item 1', command: 'command-1'} 8 | ] 9 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-menus/menus/menu-3.cson: -------------------------------------------------------------------------------- 1 | 'menu': [ 2 | { 'label': 'Second to Last' } 3 | ] 4 | 5 | 'context-menu': 6 | '.test-1': [ 7 | {label: 'Menu item 3', command: 'command-3'} 8 | ] 9 | -------------------------------------------------------------------------------- /src/special-token-symbols.coffee: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | SoftTab: Symbol('SoftTab') 3 | HardTab: Symbol('HardTab') 4 | PairedCharacter: Symbol('PairedCharacter') 5 | SoftWrapIndent: Symbol('SoftWrapIndent') 6 | } 7 | -------------------------------------------------------------------------------- /spec/fixtures/git/working-dir/git.git/objects/06/15f9a45968b3515e0a202530ef9f61aba26b6c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/functions/atom/master/spec/fixtures/git/working-dir/git.git/objects/06/15f9a45968b3515e0a202530ef9f61aba26b6c -------------------------------------------------------------------------------- /spec/fixtures/git/working-dir/git.git/objects/16/735fb793d7b038818219c4b8c6295346e20eef: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/functions/atom/master/spec/fixtures/git/working-dir/git.git/objects/16/735fb793d7b038818219c4b8c6295346e20eef -------------------------------------------------------------------------------- /spec/fixtures/git/working-dir/git.git/objects/52/f56457b6fca045ce41bb9d32e6ca79d23192af: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/functions/atom/master/spec/fixtures/git/working-dir/git.git/objects/52/f56457b6fca045ce41bb9d32e6ca79d23192af -------------------------------------------------------------------------------- /spec/fixtures/git/working-dir/git.git/objects/5b/24ab4c3baadf534242b1acc220c8fa051b9b20: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/functions/atom/master/spec/fixtures/git/working-dir/git.git/objects/5b/24ab4c3baadf534242b1acc220c8fa051b9b20 -------------------------------------------------------------------------------- /spec/fixtures/git/working-dir/git.git/objects/65/a457425a679cbe9adf0d2741785d3ceabb44a7: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/functions/atom/master/spec/fixtures/git/working-dir/git.git/objects/65/a457425a679cbe9adf0d2741785d3ceabb44a7 -------------------------------------------------------------------------------- /spec/fixtures/git/working-dir/git.git/objects/66/dc9051da651c15d98d017a88658263cab28f02: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/functions/atom/master/spec/fixtures/git/working-dir/git.git/objects/66/dc9051da651c15d98d017a88658263cab28f02 -------------------------------------------------------------------------------- /spec/fixtures/git/working-dir/git.git/objects/8a/9c86f1cb1f14b8f436eb91f4b052c8802ca99e: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/functions/atom/master/spec/fixtures/git/working-dir/git.git/objects/8a/9c86f1cb1f14b8f436eb91f4b052c8802ca99e -------------------------------------------------------------------------------- /spec/fixtures/git/working-dir/git.git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/functions/atom/master/spec/fixtures/git/working-dir/git.git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 -------------------------------------------------------------------------------- /spec/fixtures/git/working-dir/git.git/objects/ec/5e386905ff2d36e291086a1207f2585aaa8920: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/functions/atom/master/spec/fixtures/git/working-dir/git.git/objects/ec/5e386905ff2d36e291086a1207f2585aaa8920 -------------------------------------------------------------------------------- /spec/fixtures/git/working-dir/git.git/objects/ef/046e9eecaa5255ea5e9817132d4001724d6ae1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/functions/atom/master/spec/fixtures/git/working-dir/git.git/objects/ef/046e9eecaa5255ea5e9817132d4001724d6ae1 -------------------------------------------------------------------------------- /spec/fixtures/git/working-dir/git.git/objects/fe/bde178cdf35e9df6279d87aa27590c6d92e354: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/functions/atom/master/spec/fixtures/git/working-dir/git.git/objects/fe/bde178cdf35e9df6279d87aa27590c6d92e354 -------------------------------------------------------------------------------- /spec/fixtures/git/working-dir/git.git/objects/ff/c8218bd2240a0cb92f6f02548d45784428349b: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/functions/atom/master/spec/fixtures/git/working-dir/git.git/objects/ff/c8218bd2240a0cb92f6f02548d45784428349b -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-menus-manifest/menus/menu-2.cson: -------------------------------------------------------------------------------- 1 | 'menu': [ 2 | { 'label': 'Second to Last' } 3 | ] 4 | 5 | 'context-menu': 6 | '.test-1': [ 7 | {label: 'Menu item 2', command: 'command-2'} 8 | ] 9 | -------------------------------------------------------------------------------- /static/links.less: -------------------------------------------------------------------------------- 1 | @import "ui-variables"; 2 | 3 | a { 4 | cursor: pointer; 5 | color: @text-color-highlight; 6 | &:hover { 7 | color: @text-color-highlight; 8 | text-decoration: underline; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /spec/fixtures/packages/theme-with-incomplete-ui-variables/styles/ui-variables.less: -------------------------------------------------------------------------------- 1 | // This does not contain all of the ui-variables available. 2 | @app-background-color: #00f; // Changed 3 | @input-background-color: #f00; // Changed 4 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-invalid-context-menu/menus/menu.json: -------------------------------------------------------------------------------- 1 | { 2 | "context-menu": { 3 | "<>": [ 4 | { 5 | "label": "Hello", 6 | "command:": "world" 7 | } 8 | ] 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.swp 2 | *~ 3 | .DS_Store 4 | Thumbs.db 5 | .project 6 | .svn 7 | .nvm-version 8 | node_modules 9 | npm-debug.log 10 | debug.log 11 | /tags 12 | /atom-shell/ 13 | docs/output 14 | docs/includes 15 | spec/fixtures/evil-files/ 16 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-consumed-services/index.coffee: -------------------------------------------------------------------------------- 1 | module.exports = 2 | activate: -> 3 | 4 | deactivate: -> 5 | 6 | consumeFirstServiceV3: -> 7 | 8 | consumeFirstServiceV4: -> 9 | 10 | consumeSecondService: -> 11 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-rb-filetype/grammars/rb.cson: -------------------------------------------------------------------------------- 1 | 'name': 'Test Ruby' 2 | 'scopeName': 'test.rb' 3 | 'fileTypes': [ 4 | 'rb' 5 | ] 6 | 'patterns': [ 7 | { 8 | 'match': 'ruby' 9 | 'name': 'meta.class.ruby' 10 | } 11 | ] 12 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-invalid-activation-commands/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-with-invalid-activation-commands", 3 | "version": "1.0.0", 4 | "activationCommands": { 5 | "<>": [ 6 | "foo:bar" 7 | ] 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/safe-clipboard.coffee: -------------------------------------------------------------------------------- 1 | # Using clipboard in renderer process is not safe on Linux. 2 | module.exports = 3 | if process.platform is 'linux' and process.type is 'renderer' 4 | require('remote').require('clipboard') 5 | else 6 | require('clipboard') 7 | -------------------------------------------------------------------------------- /spec/fixtures/sample-with-tabs-and-initial-comment.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Look, this is a comment. Don't go making assumtions that I want soft tabs 3 | * because this block comment has leading spaces, Geez. 4 | */ 5 | 6 | if (beNice) { 7 | console.log('Thank you for being nice.'); 8 | } 9 | -------------------------------------------------------------------------------- /apm/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "atom-bundled-apm", 3 | "description": "Atom's bundled apm", 4 | "repository": { 5 | "type": "git", 6 | "url": "https://github.com/atom/atom.git" 7 | }, 8 | "dependencies": { 9 | "atom-package-manager": "1.0.2" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /static/icons.less: -------------------------------------------------------------------------------- 1 | @import "ui-variables"; 2 | 3 | .icon::before { 4 | margin-right: @component-icon-padding; 5 | } 6 | 7 | a.icon, 8 | button.icon { 9 | text-decoration: none; 10 | color: @text-color; 11 | &:hover{ 12 | color: @text-color-highlight; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /static/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /static/markdown.less: -------------------------------------------------------------------------------- 1 | .source.gfm { 2 | .markup.heading { 3 | font-weight: bold; 4 | } 5 | 6 | .bold { 7 | font-weight: bold; 8 | } 9 | 10 | .italic { 11 | font-style: italic; 12 | } 13 | 14 | .comment.quote { 15 | font-style: italic; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /spec/fixtures/packages/theme-with-ui-variables/styles/editor.less: -------------------------------------------------------------------------------- 1 | @import "ui-variables"; 2 | 3 | atom-text-editor { 4 | padding-top: @component-padding; 5 | padding-right: @component-padding; 6 | padding-bottom: @component-padding; 7 | 8 | color: @input-background-color; 9 | } 10 | -------------------------------------------------------------------------------- /static/linux.less: -------------------------------------------------------------------------------- 1 | ::-webkit-scrollbar-corner { 2 | background-color: transparent; 3 | } 4 | 5 | ::-webkit-scrollbar { 6 | width: 8px; 7 | height: 8px; 8 | } 9 | 10 | ::-webkit-scrollbar-thumb { 11 | -webkit-border-radius: 2px; 12 | background: rgba(150, 150, 150, .33); 13 | } 14 | -------------------------------------------------------------------------------- /static/popover-list.less: -------------------------------------------------------------------------------- 1 | .select-list.popover-list { 2 | width: 200px; 3 | min-width: 200px; 4 | margin-left: 0; 5 | position: relative; 6 | } 7 | 8 | .select-list.popover-list ol.list-group { 9 | position: relative; 10 | overflow-y: scroll; 11 | max-height: 200px; 12 | } 13 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-grammars/grammars/alot.cson: -------------------------------------------------------------------------------- 1 | 'fileTypes': ['alot', 'foobizbang'] 2 | 'name': 'Alot' 3 | 'scopeName': 'source.alot' 4 | 5 | 'patterns': [ 6 | { 7 | 'captures': 8 | '0': 9 | 'name': 'keyword.alot' 10 | 'match': 'alot' 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-grammars/grammars/alittle.cson: -------------------------------------------------------------------------------- 1 | 'fileTypes': ['alittle'] 2 | 'name': 'Alittle' 3 | 'scopeName': 'source.alittle' 4 | 5 | 'patterns': [ 6 | { 7 | 'captures': 8 | '0': 9 | 'name': 'keyword.alittle' 10 | 'match': 'alittle' 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-missing-consumed-services/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-with-missing-consumed-services", 3 | 4 | "consumedServices": { 5 | "service-1": { 6 | "versions": { 7 | ">=0.1": "consumeMissingService" 8 | } 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /resources/linux/atom.desktop.in: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Atom 3 | Comment=<%= description %> 4 | GenericName=Text Editor 5 | Exec=<%= executable %> %U 6 | Icon=<%= iconName %> 7 | Type=Application 8 | StartupNotify=true 9 | Categories=GNOME;GTK;Utility;TextEditor;Development; 10 | MimeType=text/plain; 11 | -------------------------------------------------------------------------------- /script/cibuild-atom-rpm: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | docker build -t atom-rpm . 6 | docker run \ 7 | --rm \ 8 | --env JANKY_SHA1="$JANKY_SHA1" \ 9 | --env JANKY_BRANCH="$JANKY_BRANCH" \ 10 | --env ATOM_ACCESS_TOKEN="$BUILD_ATOM_RPM_ACCESS_TOKEN" \ 11 | atom-rpm /atom/script/rpmbuild 12 | docker rmi atom-rpm 13 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-config-schema/index.coffee: -------------------------------------------------------------------------------- 1 | module.exports = 2 | config: 3 | numbers: 4 | type: 'object' 5 | properties: 6 | one: 7 | type: 'integer' 8 | default: 1 9 | two: 10 | type: 'integer' 11 | default: 2 12 | 13 | activate: -> # no-op 14 | -------------------------------------------------------------------------------- /script/copy-folder.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set USAGE=Usage: %0 source destination 4 | 5 | if [%1] == [] ( 6 | echo %USAGE% 7 | exit 1 8 | ) 9 | if [%2] == [] ( 10 | echo %USAGE% 11 | exit 2 12 | ) 13 | 14 | :: rm -rf %2 15 | if exist %2 rmdir %2 /s /q 16 | 17 | :: cp -rf %1 %2 18 | (robocopy %1 %2 /e) ^& IF %ERRORLEVEL% LEQ 1 exit 0 19 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-missing-provided-services/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-with-missing-provided-services", 3 | 4 | "providedServices": { 5 | "service-1": { 6 | "description": "The first service", 7 | "versions": { 8 | "0.2.9": "provideMissingService" 9 | } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /resources/linux/debian/lintian-overrides: -------------------------------------------------------------------------------- 1 | atom: arch-dependent-file-in-usr-share 2 | atom: changelog-file-missing-in-native-package 3 | atom: copyright-file-contains-full-apache-2-license 4 | atom: copyright-should-refer-to-common-license-file-for-apache-2 5 | atom: embedded-library 6 | atom: package-installs-python-bytecode 7 | atom: unstripped-binary-or-object 8 | -------------------------------------------------------------------------------- /script/utils/fix-author: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | usage() { 4 | echo "usage: $0 sha name email" 5 | exit 1 6 | } 7 | 8 | if [ ! $3 ]; then 9 | usage 10 | fi 11 | 12 | git filter-branch -f --env-filter " 13 | export GIT_AUTHOR_NAME='$2' 14 | export GIT_AUTHOR_EMAIL='$3' 15 | export GIT_COMMITTER_NAME='$2' 16 | export GIT_COMMITTER_EMAIL='$3' 17 | " -- $1..HEAD -------------------------------------------------------------------------------- /script/test: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | var safeExec = require('./utils/child-process-wrapper.js').safeExec; 3 | var runGrunt = require('./utils/run-grunt.js'); 4 | var path = require('path'); 5 | 6 | process.chdir(path.dirname(__dirname)); 7 | 8 | safeExec('node script/bootstrap', function() { 9 | runGrunt(["ci", "--stack", "--no-color"], process.exit); 10 | }); 11 | -------------------------------------------------------------------------------- /script/cibuild-atom-linux: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | export ATOM_ACCESS_TOKEN=$BUILD_ATOM_LINUX_ACCESS_TOKEN 6 | 7 | if [ -d /usr/local/share/nodenv ]; then 8 | export NODENV_ROOT=/usr/local/share/nodenv 9 | export PATH=/usr/local/share/nodenv/bin:/usr/local/share/nodenv/shims:$PATH 10 | export NODENV_VERSION="v0.10.21" 11 | fi 12 | 13 | script/cibuild 14 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-provided-services/index.coffee: -------------------------------------------------------------------------------- 1 | module.exports = 2 | activate: -> 3 | 4 | deactivate: -> 5 | 6 | provideFirstServiceV2: -> 7 | 'first-service-v2' 8 | 9 | provideFirstServiceV3: -> 10 | 'first-service-v3' 11 | 12 | provideFirstServiceV4: -> 13 | 'first-service-v4' 14 | 15 | provideSecondService: -> 16 | 'second-service' 17 | -------------------------------------------------------------------------------- /src/marker-observation-window.coffee: -------------------------------------------------------------------------------- 1 | module.exports = 2 | class MarkerObservationWindow 3 | constructor: (@displayBuffer, @bufferWindow) -> 4 | 5 | setScreenRange: (range) -> 6 | @bufferWindow.setRange(@displayBuffer.bufferRangeForScreenRange(range)) 7 | 8 | setBufferRange: (range) -> 9 | @bufferWindow.setRange(range) 10 | 11 | destroy: -> 12 | @bufferWindow.destroy() 13 | -------------------------------------------------------------------------------- /spec/fixtures/packages/theme-with-incomplete-ui-variables/styles/editor.less: -------------------------------------------------------------------------------- 1 | @import "ui-variables"; 2 | 3 | atom-text-editor { 4 | padding-top: @component-padding; 5 | padding-right: @component-padding; 6 | padding-bottom: @component-padding; 7 | 8 | color: @input-background-color; 9 | background-color: @background-color-info; // From the fallback variables, not overridden 10 | } 11 | -------------------------------------------------------------------------------- /resources/win/atom.js: -------------------------------------------------------------------------------- 1 | var path = require('path'); 2 | var spawn = require('child_process').spawn; 3 | 4 | var atomCommandPath = path.resolve(__dirname, '..', '..', 'atom.exe'); 5 | var arguments = process.argv.slice(2); 6 | arguments.unshift('--executed-from', process.cwd()); 7 | var options = {detached: true, stdio: 'ignore'}; 8 | spawn(atomCommandPath, arguments, options); 9 | process.exit(0); 10 | -------------------------------------------------------------------------------- /src/item-registry.coffee: -------------------------------------------------------------------------------- 1 | module.exports = 2 | class ItemRegistry 3 | constructor: -> 4 | @items = new WeakSet 5 | 6 | addItem: (item) -> 7 | if @hasItem(item) 8 | throw new Error("The workspace can only contain one instance of item #{item}") 9 | @items.add(item) 10 | 11 | removeItem: (item) -> 12 | @items.delete(item) 13 | 14 | hasItem: (item) -> 15 | @items.has(item) 16 | -------------------------------------------------------------------------------- /script/build: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | var cp = require('./utils/child-process-wrapper.js'); 3 | var runGrunt = require('./utils/run-grunt.js'); 4 | var path = require('path'); 5 | 6 | process.chdir(path.dirname(__dirname)); 7 | 8 | cp.safeExec('node script/bootstrap', function() { 9 | // build/node_modules/.bin/grunt "$@" 10 | var args = process.argv.slice(2); 11 | runGrunt(args, process.exit); 12 | }); 13 | -------------------------------------------------------------------------------- /benchmark/benchmark-bootstrap.coffee: -------------------------------------------------------------------------------- 1 | require '../src/window' 2 | Atom = require '../src/atom' 3 | window.atom = Atom.loadOrCreate('spec') 4 | atom.show() unless atom.getLoadSettings().exitWhenDone 5 | window.atom = atom 6 | 7 | {runSpecSuite} = require '../spec/jasmine-helper' 8 | 9 | atom.openDevTools() 10 | 11 | document.title = "Benchmark Suite" 12 | runSpecSuite('../benchmark/benchmark-suite', atom.getLoadSettings().logFile) 13 | -------------------------------------------------------------------------------- /spec/typescript-spec.coffee: -------------------------------------------------------------------------------- 1 | describe "TypeScript transpiler support", -> 2 | describe "when there is a .ts file", -> 3 | it "transpiles it using typescript", -> 4 | transpiled = require('./fixtures/typescript/valid.ts') 5 | expect(transpiled(3)).toBe 4 6 | 7 | describe "when the .ts file is invalid", -> 8 | it "does not transpile", -> 9 | expect(-> require('./fixtures/typescript/invalid.ts')).toThrow() 10 | -------------------------------------------------------------------------------- /dot-atom/init.coffee: -------------------------------------------------------------------------------- 1 | # Your init script 2 | # 3 | # Atom will evaluate this file each time a new window is opened. It is run 4 | # after packages are loaded/activated and after the previous editor state 5 | # has been restored. 6 | # 7 | # An example hack to log to the console when each text editor is saved. 8 | # 9 | # atom.workspace.observeTextEditors (editor) -> 10 | # editor.onDidSave -> 11 | # console.log "Saved! #{editor.getPath()}" 12 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-consumed-services/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-with-consumed-services", 3 | 4 | "consumedServices": { 5 | "service-1": { 6 | "versions": { 7 | ">=0.2 <=0.3.6": "consumeFirstServiceV3", 8 | "^0.4.1": "consumeFirstServiceV4" 9 | } 10 | }, 11 | "service-2": { 12 | "versions": { 13 | "0.2.1 || 0.2.2": "consumeSecondService" 14 | } 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /spec/fixtures/sample.js: -------------------------------------------------------------------------------- 1 | var quicksort = function () { 2 | var sort = function(items) { 3 | if (items.length <= 1) return items; 4 | var pivot = items.shift(), current, left = [], right = []; 5 | while(items.length > 0) { 6 | current = items.shift(); 7 | current < pivot ? left.push(current) : right.push(current); 8 | } 9 | return sort(left).concat(pivot).concat(sort(right)); 10 | }; 11 | 12 | return sort(Array.apply(this, arguments)); 13 | }; -------------------------------------------------------------------------------- /.pairs: -------------------------------------------------------------------------------- 1 | pairs: 2 | ns: Nathan Sobo; nathan 3 | cj: Corey Johnson; cj 4 | dg: David Graham; dgraham 5 | ks: Kevin Sawicki; kevin 6 | jc: Jerry Cheung; jerry 7 | bl: Brian Lopez; brian 8 | jp: Justin Palmer; justin 9 | gt: Garen Torikian; garen 10 | mc: Matt Colyer; mcolyer 11 | bo: Ben Ogle; benogle 12 | jr: Jason Rudolph; jasonrudolph 13 | jl: Jessica Lord; jlord 14 | dh: Daniel Hengeveld; danielh 15 | email: 16 | domain: github.com 17 | #global: true 18 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # VERSION: 0.1 2 | # DESCRIPTION: Image to build Atom and create a .rpm file 3 | 4 | # Base docker image 5 | FROM fedora:21 6 | 7 | # Install dependencies 8 | RUN yum install -y \ 9 | make \ 10 | gcc \ 11 | gcc-c++ \ 12 | glibc-devel \ 13 | git-core \ 14 | libgnome-keyring-devel \ 15 | rpmdevtools \ 16 | nodejs \ 17 | npm 18 | 19 | RUN npm install -g npm@1.4.28 --loglevel error 20 | 21 | ADD . /atom 22 | WORKDIR /atom 23 | -------------------------------------------------------------------------------- /src/window-bootstrap.coffee: -------------------------------------------------------------------------------- 1 | # Like sands through the hourglass, so are the days of our lives. 2 | require './window' 3 | 4 | Atom = require './atom' 5 | window.atom = Atom.loadOrCreate('editor') 6 | atom.initialize() 7 | atom.startEditorWindow() 8 | 9 | # Workaround for focus getting cleared upon window creation 10 | windowFocused = -> 11 | window.removeEventListener('focus', windowFocused) 12 | setTimeout (-> document.querySelector('atom-workspace').focus()), 0 13 | window.addEventListener('focus', windowFocused) 14 | -------------------------------------------------------------------------------- /resources/win/atom.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | while getopts ":fhtvw-:" opt; do 4 | case "$opt" in 5 | -) 6 | case "${OPTARG}" in 7 | foreground|help|test|version|wait) 8 | EXPECT_OUTPUT=1 9 | ;; 10 | esac 11 | ;; 12 | f|h|t|v|w) 13 | EXPECT_OUTPUT=1 14 | ;; 15 | esac 16 | done 17 | 18 | directory=$(dirname "$0") 19 | 20 | if [ $EXPECT_OUTPUT ]; then 21 | "$directory/../../atom.exe" "$@" 22 | else 23 | "$directory/../app/apm/bin/node.exe" "$directory/atom.js" "$@" 24 | fi 25 | -------------------------------------------------------------------------------- /spec/fixtures/coffee.coffee: -------------------------------------------------------------------------------- 1 | class quicksort 2 | sort: (items) -> 3 | return items if items.length <= 1 4 | 5 | pivot = items.shift() 6 | left = [] 7 | right = [] 8 | 9 | # Comment in the middle 10 | 11 | while items.length > 0 12 | current = items.shift() 13 | if current < pivot 14 | left.push(current) 15 | else 16 | right.push(current); 17 | 18 | sort(left).concat(pivot).concat(sort(right)) 19 | 20 | noop: -> 21 | # just a noop 22 | 23 | exports.modules = quicksort 24 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-activation-commands/index.coffee: -------------------------------------------------------------------------------- 1 | module.exports = 2 | activateCallCount: 0 3 | activationCommandCallCount: 0 4 | legacyActivationCommandCallCount: 0 5 | 6 | activate: -> 7 | @activateCallCount++ 8 | 9 | atom.commands.add 'atom-workspace', 'activation-command', => 10 | @activationCommandCallCount++ 11 | 12 | editorView = atom.views.getView(atom.workspace.getActiveTextEditor())?.__spacePenView 13 | editorView?.command 'activation-command', => 14 | @legacyActivationCommandCallCount++ 15 | -------------------------------------------------------------------------------- /script/mkrpm: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | SPEC_FILE="$1" 6 | DESKTOP_FILE="$2" 7 | BUILD_DIRECTORY="$3" 8 | 9 | RPM_BUILD_ROOT=~/rpmbuild 10 | ARCH=`uname -m` 11 | 12 | rpmdev-setuptree 13 | 14 | cp -r $BUILD_DIRECTORY/Atom $RPM_BUILD_ROOT/BUILD 15 | cp -r $BUILD_DIRECTORY/icons $RPM_BUILD_ROOT/BUILD 16 | cp $SPEC_FILE $RPM_BUILD_ROOT/SPECS 17 | cp ./atom.sh $RPM_BUILD_ROOT/BUILD 18 | cp $DESKTOP_FILE $RPM_BUILD_ROOT/BUILD 19 | 20 | rpmbuild -ba $SPEC_FILE 21 | cp $RPM_BUILD_ROOT/RPMS/$ARCH/atom-*.rpm $BUILD_DIRECTORY/rpm 22 | 23 | rm -rf $RPM_BUILD_ROOT 24 | -------------------------------------------------------------------------------- /src/replace-handler.coffee: -------------------------------------------------------------------------------- 1 | {PathReplacer} = require 'scandal' 2 | 3 | module.exports = (filePaths, regexSource, regexFlags, replacementText) -> 4 | callback = @async() 5 | 6 | replacer = new PathReplacer() 7 | regex = new RegExp(regexSource, regexFlags) 8 | 9 | replacer.on 'file-error', ({code, path, message}) -> 10 | emit('replace:file-error', {code, path, message}) 11 | 12 | replacer.on 'path-replaced', (result) -> 13 | emit('replace:path-replaced', result) 14 | 15 | replacer.replacePaths(regex, replacementText, filePaths, -> callback()) 16 | -------------------------------------------------------------------------------- /spec/fixtures/packages/package-with-provided-services/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-with-provided-services", 3 | 4 | "providedServices": { 5 | "service-1": { 6 | "description": "The first service", 7 | "versions": { 8 | "0.2.9": "provideFirstServiceV2", 9 | "0.3.1": "provideFirstServiceV3", 10 | "0.4.1": "provideFirstServiceV4" 11 | } 12 | }, 13 | "service-2": { 14 | "description": "The second service", 15 | "versions": { 16 | "0.2.1": "provideSecondService" 17 | } 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Specs depend on character counts, if we don't specify the line endings the 2 | # fixtures will vary depending on platform 3 | spec/fixtures/**/*.js text eol=lf 4 | spec/fixtures/**/*.coffee text eol=lf 5 | spec/fixtures/**/*.less text eol=lf 6 | spec/fixtures/**/*.css text eol=lf 7 | spec/fixtures/**/*.txt text eol=lf 8 | spec/fixtures/dir/**/* text eol=lf 9 | 10 | # Git 1.7 does not support **/* patterns 11 | spec/fixtures/css.css text eol=lf 12 | spec/fixtures/sample.js text eol=lf 13 | spec/fixtures/sample.less text eol=lf 14 | spec/fixtures/sample.txt text eol=lf 15 | -------------------------------------------------------------------------------- /spec/atom-protocol-handler-spec.coffee: -------------------------------------------------------------------------------- 1 | {$} = require '../src/space-pen-extensions' 2 | 3 | describe '"atom" protocol URL', -> 4 | it 'sends the file relative in the package as response', -> 5 | called = false 6 | callback = -> called = true 7 | $.ajax 8 | url: 'atom://async/package.json' 9 | success: callback 10 | # In old versions of jQuery, ajax calls to custom protocol would always 11 | # be treated as error eventhough the browser thinks it's a success 12 | # request. 13 | error: callback 14 | 15 | waitsFor 'request to be done', -> called is true 16 | -------------------------------------------------------------------------------- /script/create-shortcut.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set USAGE=Usage: %0 source name-on-desktop 4 | 5 | if [%1] == [] ( 6 | echo %USAGE% 7 | exit 1 8 | ) 9 | if [%2] == [] ( 10 | echo %USAGE% 11 | exit 2 12 | ) 13 | 14 | set SCRIPT="%TEMP%\%RANDOM%-%RANDOM%-%RANDOM%-%RANDOM%.vbs" 15 | 16 | echo Set oWS = WScript.CreateObject("WScript.Shell") >> %SCRIPT% 17 | echo sLinkFile = "%USERPROFILE%\Desktop\%2.lnk" >> %SCRIPT% 18 | echo Set oLink = oWS.CreateShortcut(sLinkFile) >> %SCRIPT% 19 | echo oLink.TargetPath = %1 >> %SCRIPT% 20 | echo oLink.Save >> %SCRIPT% 21 | 22 | cscript /nologo %SCRIPT% 23 | del %SCRIPT% 24 | -------------------------------------------------------------------------------- /src/custom-event-mixin.coffee: -------------------------------------------------------------------------------- 1 | module.exports = 2 | CustomEventMixin = 3 | componentWillMount: -> 4 | @customEventListeners = {} 5 | 6 | componentWillUnmount: -> 7 | for name, listeners in @customEventListeners 8 | for listener in listeners 9 | @getDOMNode().removeEventListener(name, listener) 10 | return 11 | 12 | addCustomEventListeners: (customEventListeners) -> 13 | for name, listener of customEventListeners 14 | @customEventListeners[name] ?= [] 15 | @customEventListeners[name].push(listener) 16 | @getDOMNode().addEventListener(name, listener) 17 | return 18 | -------------------------------------------------------------------------------- /resources/linux/debian/control.in: -------------------------------------------------------------------------------- 1 | Package: <%= name %> 2 | Version: <%= version %> 3 | Depends: git, gconf2, gconf-service, libgtk2.0-0, libudev0 | libudev1, libgcrypt11 | libgcrypt20, libnotify4, libxtst6, libnss3, python, gvfs-bin, xdg-utils, libcap2 4 | Recommends: lsb-release 5 | Suggests: libgnome-keyring0, gir1.2-gnomekeyring-1.0 6 | Section: <%= section %> 7 | Priority: optional 8 | Architecture: <%= arch %> 9 | Installed-Size: <%= installedSize %> 10 | Maintainer: <%= maintainer %> 11 | Description: <%= description %> 12 | Atom is a free and open source text editor that is modern, approachable, and hackable to the core. 13 | -------------------------------------------------------------------------------- /script/set-version: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | BUILT_PRODUCTS_DIR=$1 6 | VERSION=$2 7 | PLIST_PATH="$BUILT_PRODUCTS_DIR/Atom.app/Contents/Info.plist" 8 | HELPER_PLIST_PATH="$BUILT_PRODUCTS_DIR/Atom.app/Contents/Frameworks/Atom Helper.app/Contents/Info.plist" 9 | 10 | # Update version 11 | /usr/libexec/PlistBuddy -c "Set CFBundleShortVersionString $VERSION" "$PLIST_PATH" 12 | /usr/libexec/PlistBuddy -c "Set CFBundleVersion $VERSION" "$PLIST_PATH" 13 | /usr/libexec/PlistBuddy -c "Set CFBundleShortVersionString $VERSION" "$HELPER_PLIST_PATH" 14 | /usr/libexec/PlistBuddy -c "Set CFBundleVersion $VERSION" "$HELPER_PLIST_PATH" 15 | -------------------------------------------------------------------------------- /keymaps/emacs.cson: -------------------------------------------------------------------------------- 1 | 'atom-text-editor': 2 | 'alt-f': 'editor:move-to-end-of-word' 3 | 'alt-ctrl-f': 'editor:move-to-next-subword-boundary' 4 | 'alt-F': 'editor:select-to-end-of-word' 5 | 'alt-ctrl-F': 'editor:select-to-next-subword-boundary' 6 | 'alt-b': 'editor:move-to-beginning-of-word' 7 | 'alt-ctrl-b': 'editor:move-to-previous-subword-boundary' 8 | 'alt-B': 'editor:select-to-beginning-of-word' 9 | 'alt-ctrl-B': 'editor:select-to-previous-subword-boundary' 10 | 'alt-h': 'editor:delete-to-beginning-of-word' 11 | 'alt-ctrl-h': 'editor:delete-to-beginning-of-subword' 12 | 'alt-d': 'editor:delete-to-end-of-word' 13 | 'alt-ctrl-d': 'editor:delete-to-end-of-subword' 14 | -------------------------------------------------------------------------------- /spec/fixtures/sample-with-comments.js: -------------------------------------------------------------------------------- 1 | var quicksort = function () { 2 | /* 3 | this is a multiline comment 4 | it is, I promise 5 | */ 6 | var sort = function(items) { 7 | // This is a collection of 8 | // single line comments. 9 | // Wowza 10 | if (items.length <= 1) return items; 11 | var pivot = items.shift(), current, left = [], right = []; 12 | while(items.length > 0) { 13 | current = items.shift(); 14 | current < pivot ? left.push(current) : right.push(current); 15 | } 16 | return sort(left).concat(pivot).concat(sort(right)); 17 | }; 18 | // this is a single-line comment 19 | return sort(Array.apply(this, arguments)); 20 | }; -------------------------------------------------------------------------------- /spec/clipboard-spec.coffee: -------------------------------------------------------------------------------- 1 | describe "Clipboard", -> 2 | describe "write(text, metadata) and read()", -> 3 | it "writes and reads text to/from the native clipboard", -> 4 | expect(atom.clipboard.read()).toBe 'initial clipboard content' 5 | atom.clipboard.write('next') 6 | expect(atom.clipboard.read()).toBe 'next' 7 | 8 | it "returns metadata if the item on the native clipboard matches the last written item", -> 9 | atom.clipboard.write('next', {meta: 'data'}) 10 | expect(atom.clipboard.read()).toBe 'next' 11 | expect(atom.clipboard.readWithMetadata().text).toBe 'next' 12 | expect(atom.clipboard.readWithMetadata().metadata).toEqual {meta: 'data'} 13 | -------------------------------------------------------------------------------- /script/utils/run-grunt.js: -------------------------------------------------------------------------------- 1 | var cp = require('./child-process-wrapper.js'); 2 | var fs = require('fs'); 3 | var path = require('path'); 4 | 5 | module.exports = function(additionalArgs, callback) { 6 | var gruntPath = path.join('build', 'node_modules', '.bin', 'grunt') + (process.platform === 'win32' ? '.cmd' : ''); 7 | 8 | if (!fs.existsSync(gruntPath)) { 9 | console.error('Grunt command does not exist at: ' + gruntPath); 10 | console.error('Run script/bootstrap to install Grunt'); 11 | process.exit(1); 12 | } 13 | 14 | var args = ['--gruntfile', path.resolve('build', 'Gruntfile.coffee')]; 15 | args = args.concat(additionalArgs); 16 | cp.safeSpawn(gruntPath, args, callback); 17 | }; 18 | -------------------------------------------------------------------------------- /static/messages.less: -------------------------------------------------------------------------------- 1 | @import "ui-variables"; 2 | 3 | .info-messages, 4 | .error-messages { 5 | margin: 0; 6 | padding: 0; 7 | list-style: none; 8 | } 9 | 10 | .error-messages { 11 | color: @text-color-error; 12 | } 13 | 14 | ul.background-message { 15 | font-size: @font-size * 3; 16 | 17 | margin: 0; 18 | padding: 0; 19 | 20 | li { 21 | margin: 0; 22 | padding: 0; 23 | list-style: none; 24 | } 25 | 26 | &.centered { 27 | display: -webkit-flex; 28 | position: absolute; 29 | top: 0; 30 | left: 0; 31 | right: 0; 32 | bottom: 0; 33 | 34 | -webkit-align-items: center; 35 | text-align: center; 36 | 37 | li { 38 | width: 100%; 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /static/text.less: -------------------------------------------------------------------------------- 1 | @import "ui-variables"; 2 | 3 | .text-bits (@type) { 4 | @text-color-name: "text-color-@{type}"; 5 | @bg-color-name: "background-color-@{type}"; 6 | 7 | @text-color: @@text-color-name; 8 | @bg-color: @@bg-color-name; 9 | 10 | code { 11 | color: @text-color; 12 | background: fadeout(@bg-color, 80%); 13 | } 14 | 15 | a, a code { 16 | text-decoration: underline; 17 | color: darken(@text-color, 10%); 18 | 19 | &:hover { 20 | color: darken(@text-color, 15%); 21 | } 22 | } 23 | } 24 | 25 | .text-info { 26 | .text-bits(info); 27 | } 28 | 29 | .text-success { 30 | .text-bits(success); 31 | } 32 | 33 | .text-warning { 34 | .text-bits(warning); 35 | } 36 | 37 | .text-error { 38 | .text-bits(error); 39 | } 40 | -------------------------------------------------------------------------------- /coffeelint.json: -------------------------------------------------------------------------------- 1 | { 2 | "max_line_length": { 3 | "level": "ignore" 4 | }, 5 | "no_empty_param_list": { 6 | "level": "error" 7 | }, 8 | "arrow_spacing": { 9 | "level": "error" 10 | }, 11 | "no_interpolation_in_single_quotes": { 12 | "level": "error" 13 | }, 14 | "no_debugger": { 15 | "level": "error" 16 | }, 17 | "prefer_english_operator": { 18 | "level": "error" 19 | }, 20 | "colon_assignment_spacing": { 21 | "spacing": { 22 | "left": 0, 23 | "right": 1 24 | }, 25 | "level": "error" 26 | }, 27 | "braces_spacing": { 28 | "spaces": 0, 29 | "level": "error" 30 | }, 31 | "spacing_after_comma": { 32 | "level": "error" 33 | }, 34 | "no_stand_alone_at": { 35 | "level": "error" 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /static/workspace-view.less: -------------------------------------------------------------------------------- 1 | @import "ui-variables"; 2 | @import "octicon-mixins"; 3 | 4 | @font-face { .octicon-font(); } 5 | 6 | html { 7 | font-family: @font-family; 8 | font-size: @font-size; 9 | } 10 | 11 | html, 12 | body { 13 | width: 100%; 14 | height: 100%; 15 | overflow: hidden; 16 | } 17 | 18 | atom-workspace { 19 | display: block; 20 | height: 100%; 21 | overflow: hidden; 22 | position: relative; 23 | color: @text-color; 24 | background-color: @app-background-color; 25 | font-family: @font-family; 26 | 27 | atom-workspace-axis.horizontal { 28 | display: -webkit-flex; 29 | height: 100%; 30 | } 31 | 32 | atom-workspace-axis.vertical { 33 | display: -webkit-flex; 34 | -webkit-flex: 1; 35 | -webkit-flex-flow: column; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /dot-atom/snippets.cson: -------------------------------------------------------------------------------- 1 | # Your snippets 2 | # 3 | # Atom snippets allow you to enter a simple prefix in the editor and hit tab to 4 | # expand the prefix into a larger code block with templated values. 5 | # 6 | # You can create a new snippet in this file by typing "snip" and then hitting 7 | # tab. 8 | # 9 | # An example CoffeeScript snippet to expand log to console.log: 10 | # 11 | # '.source.coffee': 12 | # 'Console log': 13 | # 'prefix': 'log' 14 | # 'body': 'console.log $1' 15 | # 16 | # Each scope (e.g. '.source.coffee' above) can only be declared once. 17 | # 18 | # This file uses CoffeeScript Object Notation (CSON). 19 | # If you are unfamiliar with CSON, you can read more about it in the 20 | # Atom Flight Manual: 21 | # https://atom.io/docs/latest/using-atom-basic-customization#cson 22 | -------------------------------------------------------------------------------- /resources/win/atom.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | SET EXPECT_OUTPUT= 4 | 5 | FOR %%a IN (%*) DO ( 6 | IF /I "%%a"=="-f" SET EXPECT_OUTPUT=YES 7 | IF /I "%%a"=="--foreground" SET EXPECT_OUTPUT=YES 8 | IF /I "%%a"=="-h" SET EXPECT_OUTPUT=YES 9 | IF /I "%%a"=="--help" SET EXPECT_OUTPUT=YES 10 | IF /I "%%a"=="-t" SET EXPECT_OUTPUT=YES 11 | IF /I "%%a"=="--test" SET EXPECT_OUTPUT=YES 12 | IF /I "%%a"=="-v" SET EXPECT_OUTPUT=YES 13 | IF /I "%%a"=="--version" SET EXPECT_OUTPUT=YES 14 | IF /I "%%a"=="-w" SET EXPECT_OUTPUT=YES 15 | IF /I "%%a"=="--wait" SET EXPECT_OUTPUT=YES 16 | ) 17 | 18 | IF "%EXPECT_OUTPUT%"=="YES" ( 19 | "%~dp0\..\..\atom.exe" %* 20 | ) ELSE ( 21 | "%~dp0\..\app\apm\bin\node.exe" "%~dp0\atom.js" %* 22 | ) 23 | -------------------------------------------------------------------------------- /src/model.coffee: -------------------------------------------------------------------------------- 1 | Grim = require 'grim' 2 | if Grim.includeDeprecatedAPIs 3 | module.exports = require('theorist').Model 4 | return 5 | 6 | PropertyAccessors = require 'property-accessors' 7 | 8 | nextInstanceId = 1 9 | 10 | module.exports = 11 | class Model 12 | PropertyAccessors.includeInto(this) 13 | 14 | @resetNextInstanceId: -> nextInstanceId = 1 15 | 16 | alive: true 17 | 18 | constructor: (params) -> 19 | @assignId(params?.id) 20 | 21 | assignId: (id) -> 22 | @id ?= id ? nextInstanceId++ 23 | 24 | @::advisedAccessor 'id', 25 | set: (id) -> nextInstanceId = id + 1 if id >= nextInstanceId 26 | 27 | destroy: -> 28 | return unless @isAlive() 29 | @alive = false 30 | @destroyed?() 31 | 32 | isAlive: -> @alive 33 | 34 | isDestroyed: -> not @isAlive() 35 | -------------------------------------------------------------------------------- /spec/panel-spec.coffee: -------------------------------------------------------------------------------- 1 | Panel = require '../src/panel' 2 | 3 | describe "Panel", -> 4 | [panel] = [] 5 | 6 | class TestPanelItem 7 | constructior: -> 8 | 9 | beforeEach -> 10 | panel = new Panel(item: new TestPanelItem()) 11 | 12 | describe "changing panel visibility", -> 13 | it 'emits an event when visibility changes', -> 14 | panel.onDidChangeVisible spy = jasmine.createSpy() 15 | 16 | panel.hide() 17 | expect(panel.isVisible()).toBe false 18 | expect(spy).toHaveBeenCalledWith(false) 19 | spy.reset() 20 | 21 | panel.show() 22 | expect(panel.isVisible()).toBe true 23 | expect(spy).toHaveBeenCalledWith(true) 24 | 25 | panel.destroy() 26 | expect(panel.isVisible()).toBe false 27 | expect(spy).toHaveBeenCalledWith(false) 28 | -------------------------------------------------------------------------------- /src/theme-package.coffee: -------------------------------------------------------------------------------- 1 | Q = require 'q' 2 | Package = require './package' 3 | 4 | module.exports = 5 | class ThemePackage extends Package 6 | getType: -> 'theme' 7 | 8 | getStyleSheetPriority: -> 1 9 | 10 | enable: -> 11 | atom.config.unshiftAtKeyPath('core.themes', @name) 12 | 13 | disable: -> 14 | atom.config.removeAtKeyPath('core.themes', @name) 15 | 16 | load: -> 17 | @loadTime = 0 18 | this 19 | 20 | activate: -> 21 | return @activationDeferred.promise if @activationDeferred? 22 | 23 | @activationDeferred = Q.defer() 24 | @measure 'activateTime', => 25 | try 26 | @loadStylesheets() 27 | @activateNow() 28 | catch error 29 | @handleError("Failed to activate the #{@name} theme", error) 30 | 31 | @activationDeferred.promise 32 | -------------------------------------------------------------------------------- /src/scoped-properties.coffee: -------------------------------------------------------------------------------- 1 | CSON = require 'season' 2 | {CompositeDisposable} = require 'event-kit' 3 | 4 | module.exports = 5 | class ScopedProperties 6 | @load: (scopedPropertiesPath, callback) -> 7 | CSON.readFile scopedPropertiesPath, (error, scopedProperties={}) -> 8 | if error? 9 | callback(error) 10 | else 11 | callback(null, new ScopedProperties(scopedPropertiesPath, scopedProperties)) 12 | 13 | constructor: (@path, @scopedProperties) -> 14 | 15 | activate: -> 16 | for selector, properties of @scopedProperties 17 | atom.config.set(null, properties, scopeSelector: selector, source: @path) 18 | return 19 | 20 | deactivate: -> 21 | for selector of @scopedProperties 22 | atom.config.unset(null, scopeSelector: selector, source: @path) 23 | return 24 | -------------------------------------------------------------------------------- /static/select-list.less: -------------------------------------------------------------------------------- 1 | @import "ui-variables"; 2 | @import "octicon-mixins"; 3 | 4 | .select-list { 5 | .loading { 6 | .loading-message { 7 | .octicon(hourglass); 8 | 9 | &::before { 10 | font-size: 1.1em; 11 | width: 1.1em; 12 | height: 1.1em; 13 | margin-right: 5px; 14 | } 15 | } 16 | 17 | .badge { 18 | margin-left: 10px; 19 | } 20 | } 21 | 22 | ol.list-group { 23 | position: relative; 24 | overflow-y: auto; 25 | max-height: 312px; 26 | margin: @component-padding 0 0 0; 27 | padding: 0; 28 | 29 | li { 30 | display: block; 31 | 32 | .primary-line, 33 | .secondary-line { 34 | text-overflow: ellipsis; 35 | white-space: nowrap; 36 | overflow: hidden; 37 | } 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | git: 2 | depth: 10 3 | 4 | branches: 5 | only: 6 | - master 7 | 8 | env: 9 | global: 10 | - ATOM_ACCESS_TOKEN=da809a6077bb1b0aa7c5623f7b2d5f1fec2faae4 11 | - NODE_VERSION=0.12 12 | 13 | matrix: 14 | include: 15 | - os: linux 16 | - os: osx 17 | env: ATOM_SPECS_TASK=core 18 | - os: osx 19 | env: ATOM_SPECS_TASK=packages 20 | 21 | sudo: false 22 | 23 | install: 24 | - git clone https://github.com/creationix/nvm.git /tmp/.nvm 25 | - source /tmp/.nvm/nvm.sh 26 | - nvm install $NODE_VERSION 27 | - nvm use $NODE_VERSION 28 | 29 | script: script/cibuild 30 | 31 | notifications: 32 | email: 33 | on_success: never 34 | on_failure: change 35 | 36 | addons: 37 | apt: 38 | packages: 39 | - build-essential 40 | - git 41 | - libgnome-keyring-dev 42 | - fakeroot 43 | -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | # Atom Docs 2 | 3 |  4 | 5 | Most of the Atom user and developer documentation is contained in the [Atom Docs](https://github.com/atom/docs) repository. 6 | 7 | In this directory you can only find very specific build and API level documentation. Some of this may eventually move to the docs repository as well. 8 | 9 | ## Build documentation 10 | 11 | Instructions for building Atom on various platforms from source. 12 | 13 | * [OS X](build-instructions/os-x.md) 14 | * [Windows](build-instructions/windows.md) 15 | * [Linux](build-instructions/linux.md) 16 | * [FreeBSD](build-instructions/freebsd.md) 17 | 18 | ## Other documentation here 19 | 20 | * [apm REST API](apm-rest-api.md) 21 | * [Tips for contributing to packages](contributing-to-packages.md) 22 | -------------------------------------------------------------------------------- /src/storage-folder.coffee: -------------------------------------------------------------------------------- 1 | path = require "path" 2 | fs = require "fs-plus" 3 | 4 | module.exports = 5 | class StorageFolder 6 | constructor: (containingPath) -> 7 | @path = path.join(containingPath, "storage") 8 | 9 | store: (name, object) -> 10 | fs.writeFileSync(@pathForKey(name), JSON.stringify(object), 'utf8') 11 | 12 | load: (name) -> 13 | statePath = @pathForKey(name) 14 | try 15 | stateString = fs.readFileSync(statePath, 'utf8') 16 | catch error 17 | unless error.code is 'ENOENT' 18 | console.warn "Error reading state file: #{statePath}", error.stack, error 19 | return undefined 20 | 21 | try 22 | JSON.parse(stateString) 23 | catch error 24 | console.warn "Error parsing state file: #{statePath}", error.stack, error 25 | 26 | pathForKey: (name) -> path.join(@getPath(), name) 27 | getPath: -> @path 28 | -------------------------------------------------------------------------------- /docs/build-instructions/freebsd.md: -------------------------------------------------------------------------------- 1 | # FreeBSD 2 | 3 | FreeBSD -RELEASE 64-bit is the recommended platform. 4 | 5 | ## Requirements 6 | 7 | * FreeBSD 8 | * `pkg install node` 9 | * `pkg install npm` 10 | * `pkg install libgnome-keyring` 11 | * `npm config set python /usr/local/bin/python2 -g` to ensure that gyp uses Python 2 12 | 13 | ## Instructions 14 | 15 | ```sh 16 | git clone https://github.com/atom/atom 17 | cd atom 18 | script/build # Creates application at $TMPDIR/atom-build/Atom 19 | sudo script/grunt install # Installs command to /usr/local/bin/atom 20 | ``` 21 | 22 | ## Advanced Options 23 | 24 | ### Custom install directory 25 | 26 | ```sh 27 | sudo script/grunt install --install-dir /install/atom/here 28 | ``` 29 | 30 | ### Custom build directory 31 | 32 | ```sh 33 | script/build --build-dir /build/atom/here 34 | ``` 35 | 36 | ## Troubleshooting 37 | -------------------------------------------------------------------------------- /static/sections.less: -------------------------------------------------------------------------------- 1 | @import "ui-variables"; 2 | 3 | section, .section { 4 | position: relative; 5 | margin-top: 0; 6 | &:last-child { margin-bottom: 0; } 7 | 8 | &.bordered { 9 | margin: 0; 10 | padding: @component-padding*2 0; 11 | border-top: 1px solid @background-color-highlight; 12 | border-bottom: 1px solid @tool-panel-border-color; 13 | } 14 | 15 | .section-heading:first-child { 16 | margin-top: 0; 17 | font-weight: bold; 18 | color: @text-color-highlight; 19 | } 20 | } 21 | 22 | div > section:first-child, 23 | form > section:first-child, 24 | div > .section:first-child, 25 | form > .section:first-child { 26 | border-top: none; 27 | padding-top: 0; 28 | } 29 | div > section:last-child, 30 | form > section:last-child, 31 | div > .section:last-child, 32 | form > .section:last-child { 33 | border-bottom: none; 34 | padding-bottom: 0; 35 | } 36 | -------------------------------------------------------------------------------- /static/atom.less: -------------------------------------------------------------------------------- 1 | // Import from the syntax theme's variables with a fallback to ./variables/syntax-variables.less 2 | @import "./variables/syntax-variables"; 3 | @import "syntax-variables"; 4 | 5 | // Import from the ui theme's variables with a fallback to ./variables/ui-variables.less 6 | @import "./variables/ui-variables"; 7 | @import "ui-variables"; 8 | 9 | @import "octicon-utf-codes"; 10 | @import "octicon-mixins"; 11 | 12 | @import "workspace-view"; 13 | @import "bootstrap-overrides"; 14 | @import "badges"; 15 | @import "buttons"; 16 | @import "icons"; 17 | @import "links"; 18 | @import "panes"; 19 | @import "panels"; 20 | @import "sections"; 21 | @import "lists"; 22 | @import "popover-list"; 23 | @import "messages"; 24 | @import "markdown"; 25 | @import "text-editor-light"; 26 | @import "select-list"; 27 | @import "syntax"; 28 | @import "text"; 29 | @import "utilities"; 30 | @import "octicons"; 31 | -------------------------------------------------------------------------------- /dot-atom/styles.less: -------------------------------------------------------------------------------- 1 | /* 2 | * Your Stylesheet 3 | * 4 | * This stylesheet is loaded when Atom starts up and is reloaded automatically 5 | * when it is changed and saved. 6 | * 7 | * Add your own CSS or Less to fully customize Atom. 8 | * If you are unfamiliar with Less, you can read more about it here: 9 | * http://lesscss.org 10 | */ 11 | 12 | 13 | /* 14 | * Examples 15 | * (To see them, uncomment and save) 16 | */ 17 | 18 | // style the background color of the tree view 19 | .tree-view { 20 | // background-color: whitesmoke; 21 | } 22 | 23 | // style the background and foreground colors on the atom-text-editor-element itself 24 | atom-text-editor { 25 | // color: white; 26 | // background-color: hsl(180, 24%, 12%); 27 | } 28 | 29 | // To style other content in the text editor's shadow DOM, use the ::shadow expression 30 | atom-text-editor::shadow .cursor { 31 | // border-color: red; 32 | } 33 | -------------------------------------------------------------------------------- /spec/babel-spec.coffee: -------------------------------------------------------------------------------- 1 | describe "Babel transpiler support", -> 2 | describe 'when a .js file starts with /** @babel */;', -> 3 | it "transpiles it using babel", -> 4 | transpiled = require('./fixtures/babel/babel-comment.js') 5 | expect(transpiled(3)).toBe 4 6 | 7 | describe "when a .js file starts with 'use babel';", -> 8 | it "transpiles it using babel", -> 9 | transpiled = require('./fixtures/babel/babel-single-quotes.js') 10 | expect(transpiled(3)).toBe 4 11 | 12 | describe 'when a .js file starts with "use babel";', -> 13 | it "transpiles it using babel", -> 14 | transpiled = require('./fixtures/babel/babel-double-quotes.js') 15 | expect(transpiled(3)).toBe 4 16 | 17 | describe "when a .js file does not start with 'use babel';", -> 18 | it "does not transpile it using babel", -> 19 | expect(-> require('./fixtures/babel/invalid.js')).toThrow() 20 | -------------------------------------------------------------------------------- /spec/tokenized-line-spec.coffee: -------------------------------------------------------------------------------- 1 | describe "TokenizedLine", -> 2 | editor = null 3 | 4 | beforeEach -> 5 | waitsForPromise -> atom.packages.activatePackage('language-coffee-script') 6 | 7 | describe "::isOnlyWhitespace()", -> 8 | beforeEach -> 9 | waitsForPromise -> 10 | atom.project.open('coffee.coffee').then (o) -> editor = o 11 | 12 | it "returns true when the line is only whitespace", -> 13 | expect(editor.tokenizedLineForScreenRow(3).isOnlyWhitespace()).toBe true 14 | expect(editor.tokenizedLineForScreenRow(7).isOnlyWhitespace()).toBe true 15 | expect(editor.tokenizedLineForScreenRow(23).isOnlyWhitespace()).toBe true 16 | 17 | it "returns false when the line is not only whitespace", -> 18 | expect(editor.tokenizedLineForScreenRow(0).isOnlyWhitespace()).toBe false 19 | expect(editor.tokenizedLineForScreenRow(2).isOnlyWhitespace()).toBe false 20 | -------------------------------------------------------------------------------- /static/bootstrap-overrides.less: -------------------------------------------------------------------------------- 1 | @import "ui-variables"; 2 | 3 | .nav { 4 | > li > a { 5 | border-radius: @component-border-radius; 6 | } 7 | > li > a:hover { 8 | background-color: @background-color-highlight; 9 | } 10 | 11 | &.nav-pills > li.active > a { 12 | background-color: @background-color-selected; 13 | } 14 | } 15 | 16 | h1, 17 | h2, 18 | h3, 19 | h4, 20 | h5, 21 | h6 { 22 | font-family: inherit; // inherit from themes 23 | } 24 | 25 | body { 26 | font-family: inherit; // inherit from html 27 | font-size: inherit; // inherit from html 28 | } 29 | 30 | // Latest Bootstrap specifies the font properties again instead of inheriting 31 | .tooltip { 32 | font-family: @font-family; 33 | font-size: @font-size; 34 | } 35 | 36 | // disable some styling, will be styled in themes 37 | kbd { 38 | color: inherit; 39 | background-color: none; 40 | box-shadow: none; 41 | } 42 | -------------------------------------------------------------------------------- /static/syntax.less: -------------------------------------------------------------------------------- 1 | @import "syntax-variables"; 2 | 3 | atom-text-editor { 4 | .lines { 5 | .markup { 6 | &.git-commit { 7 | &.changed { 8 | color: @syntax-color-modified; 9 | } 10 | 11 | &.deleted { 12 | color: @syntax-color-removed; 13 | } 14 | 15 | &.inserted { 16 | color: @syntax-color-added; 17 | } 18 | } 19 | } 20 | } 21 | } 22 | 23 | .define-selection-flash-color-if-not-defined() { @syntax-selection-flash-color: rgba(100, 255, 100, 0.7); } 24 | .define-selection-flash-color-if-not-defined(); 25 | 26 | @-webkit-keyframes flash { 27 | from { background-color: @syntax-selection-flash-color; } 28 | to { background-color: null; } 29 | } 30 | 31 | atom-text-editor .flash.selection .region { 32 | -webkit-animation-name: flash; 33 | -webkit-animation-duration: .5s; 34 | -webkit-animation-iteration-count: 1; 35 | } 36 | -------------------------------------------------------------------------------- /static/variables/octicon-mixins.less: -------------------------------------------------------------------------------- 1 | .icon-size(@size) { 2 | font-size: @size; 3 | width: @size; 4 | height: @size; 5 | } 6 | 7 | .icon(@size, @display: inline-block) { 8 | font-family: 'Octicons Regular'; 9 | font-weight: normal; 10 | font-style: normal; 11 | display: @display; 12 | line-height: 1; 13 | -webkit-font-smoothing: antialiased; 14 | text-decoration: none; 15 | 16 | .icon-size(@size); 17 | } 18 | 19 | .octicon(@name, @size: 16px) { 20 | @import "octicon-utf-codes.less"; 21 | &::before { 22 | .icon(@size); 23 | content: @@name 24 | } 25 | } 26 | 27 | .mega-octicon(@name, @size: 32px) { 28 | @import "octicon-utf-codes.less"; 29 | &::before { 30 | .icon(@size); 31 | content: @@name 32 | } 33 | } 34 | 35 | .octicon-font() { 36 | font-family: 'Octicons Regular'; 37 | src: url("octicons.woff") format("woff"); 38 | font-weight: normal; 39 | font-style: normal; 40 | } 41 | 42 | -------------------------------------------------------------------------------- /spec/default-directory-searcher-spec.coffee: -------------------------------------------------------------------------------- 1 | DefaultDirectorySearcher = require "../src/default-directory-searcher" 2 | Task = require "../src/task" 3 | path = require "path" 4 | 5 | describe "DefaultDirectorySearcher", -> 6 | [searcher, dirPath] = [] 7 | 8 | beforeEach -> 9 | dirPath = path.resolve(__dirname, 'fixtures', 'dir') 10 | searcher = new DefaultDirectorySearcher 11 | 12 | it "terminates the task after running a search", -> 13 | options = 14 | ignoreCase: false 15 | includeHidden: false 16 | excludeVcsIgnores: true 17 | inclusions: [] 18 | globalExclusions: ['a-dir'] 19 | didMatch: -> 20 | didError: -> 21 | didSearchPaths: -> 22 | searchPromise = searcher.search([{getPath: -> dirPath}], /abcdefg/, options) 23 | spyOn(Task::, 'terminate').andCallThrough() 24 | 25 | waitsForPromise -> searchPromise 26 | 27 | runs -> 28 | expect(Task::terminate).toHaveBeenCalled() 29 | -------------------------------------------------------------------------------- /src/window.coffee: -------------------------------------------------------------------------------- 1 | # Public: Measure how long a function takes to run. 2 | # 3 | # description - A {String} description that will be logged to the console when 4 | # the function completes. 5 | # fn - A {Function} to measure the duration of. 6 | # 7 | # Returns the value returned by the given function. 8 | window.measure = (description, fn) -> 9 | start = Date.now() 10 | value = fn() 11 | result = Date.now() - start 12 | console.log description, result 13 | value 14 | 15 | # Public: Create a dev tools profile for a function. 16 | # 17 | # description - A {String} description that will be available in the Profiles 18 | # tab of the dev tools. 19 | # fn - A {Function} to profile. 20 | # 21 | # Returns the value returned by the given function. 22 | window.profile = (description, fn) -> 23 | measure description, -> 24 | console.profile(description) 25 | value = fn() 26 | console.profileEnd(description) 27 | value 28 | -------------------------------------------------------------------------------- /src/browser/context-menu.coffee: -------------------------------------------------------------------------------- 1 | Menu = require 'menu' 2 | 3 | module.exports = 4 | class ContextMenu 5 | constructor: (template, @atomWindow) -> 6 | template = @createClickHandlers(template) 7 | menu = Menu.buildFromTemplate(template) 8 | menu.popup(@atomWindow.browserWindow) 9 | 10 | # It's necessary to build the event handlers in this process, otherwise 11 | # closures are dragged across processes and failed to be garbage collected 12 | # appropriately. 13 | createClickHandlers: (template) -> 14 | for item in template 15 | if item.command 16 | item.commandDetail ?= {} 17 | item.commandDetail.contextCommand = true 18 | item.commandDetail.atomWindow = @atomWindow 19 | do (item) => 20 | item.click = => 21 | global.atomApplication.sendCommandToWindow(item.command, @atomWindow, item.commandDetail) 22 | else if item.submenu 23 | @createClickHandlers(item.submenu) 24 | item 25 | -------------------------------------------------------------------------------- /docs/build-instructions/os-x.md: -------------------------------------------------------------------------------- 1 | # OS X 2 | 3 | ## Requirements 4 | 5 | * OS X 10.8 or later 6 | * [node.js](http://nodejs.org/download/) (0.10.x or 0.12.x) or [io.js](https://iojs.org) (1.x) 7 | * Command Line Tools for [Xcode](https://developer.apple.com/xcode/downloads/) (run `xcode-select --install` to install) 8 | 9 | ## Instructions 10 | 11 | ```sh 12 | git clone https://github.com/atom/atom.git 13 | cd atom 14 | script/build # Creates application at /Applications/Atom.app 15 | ``` 16 | 17 | ### `script/build` Options 18 | * `--install-dir` - The full path to the final built application (must include `.app` in the path), e.g. `script/build --install-dir /Users/username/full/path/to/Atom.app` 19 | * `--build-dir` - Build the application in this directory. 20 | * `--verbose` - Verbose mode. A lot more information output. 21 | 22 | ## Troubleshooting 23 | 24 | ### OSX build error reports in atom/atom 25 | * Use [this search](https://github.com/atom/atom/search?q=label%3Abuild-error+label%3Aos-x&type=Issues) to get a list of reports about build errors on OSX. 26 | -------------------------------------------------------------------------------- /resources/mac/helper-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 |