Merge remote-tracking branch 'origin/master' into mkt-url-based-command-dispatch

This commit is contained in:
Michelle Tilley
2017-09-18 16:49:12 -07:00
506 changed files with 42536 additions and 34609 deletions

24
.github/stale.yml vendored Normal file
View File

@@ -0,0 +1,24 @@
# Configuration for probot-stale - https://github.com/probot/stale
# Number of days of inactivity before an Issue or Pull Request becomes stale
daysUntilStale: 365
# Number of days of inactivity before a stale Issue or Pull Request is closed
daysUntilClose: 14
# Issues or Pull Requests with these labels will never be considered stale
exemptLabels:
- regression
- security
- triaged
# Label to use when marking as stale
staleLabel: stale
# Comment to post when marking as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when removing the stale label. Set to `false` to disable
unmarkComment: false
# Comment to post when closing a stale Issue or Pull Request. Set to `false` to disable
closeComment: false
# Limit to only `issues` or `pulls`
only: issues

2
.gitignore vendored
View File

@@ -10,9 +10,9 @@ npm-debug.log
debug.log
/tags
/atom-shell/
/electron/
/out/
docs/output
docs/includes
spec/fixtures/evil-files/
out/
/electron/

3
.npmrc
View File

@@ -1,3 +0,0 @@
cache = ~/.atom/.npm
runtime = electron
disturl = https://atom.io/download/atom-shell

View File

@@ -1 +1 @@
2.7.6
2.7.13

View File

@@ -3,41 +3,40 @@ git:
branches:
only:
- master
env:
global:
- ATOM_ACCESS_TOKEN=da809a6077bb1b0aa7c5623f7b2d5f1fec2faae4
compiler: clang
- master
- /^[0-9.]+-releases$/
matrix:
include:
- os: linux
env: NODE_VERSION=0.12
- os: linux
env: NODE_VERSION=4
- os: osx
env: ATOM_SPECS_TASK=core NODE_VERSION=0.12
- os: osx
env: ATOM_SPECS_TASK=packages NODE_VERSION=0.12
dist: trusty
env: NODE_VERSION=6.9.4 DISPLAY=:99.0 CC=clang CXX=clang++ npm_config_clang=1
sudo: false
sudo: required
before_install:
- "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16"
install:
- git clone https://github.com/creationix/nvm.git /tmp/.nvm
- source /tmp/.nvm/nvm.sh
- nvm install $NODE_VERSION
- nvm use $NODE_VERSION
- nvm use --delete-prefix $NODE_VERSION
- npm install -g npm@5.3.0
- script/build --create-debian-package --create-rpm-package --compress-artifacts
script: script/cibuild
script:
- script/lint
- script/test
cache:
directories:
- electron
- node_modules
- build/node_modules
- apm/node_modules
- $HOME/.atom/compile-cache
- script/node_modules
- ~/.atom/compile-cache
- ~/.atom/snapshot-cache
notifications:
email:
@@ -45,9 +44,19 @@ notifications:
on_failure: change
addons:
artifacts:
paths:
- out/atom-amd64.deb
- out/atom.x86_64.rpm
- out/atom-amd64.tar.gz
target_paths: travis-artifacts/$TRAVIS_BUILD_ID
apt:
packages:
- build-essential
- git
- libgnome-keyring-dev
- clang-3.3
- fakeroot
- git
- libsecret-1-dev
- rpm
- libx11-dev
- libxkbfile-dev

View File

@@ -2,14 +2,17 @@
:+1::tada: First off, thanks for taking the time to contribute! :tada::+1:
The following is a set of guidelines for contributing to Atom and its packages, which are hosted in the [Atom Organization](https://github.com/atom) on GitHub.
These are just guidelines, not rules, use your best judgment and feel free to propose changes to this document in a pull request.
The following is a set of guidelines for contributing to Atom and its packages, which are hosted in the [Atom Organization](https://github.com/atom) on GitHub. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.
#### Table Of Contents
[Code of Conduct](#code-of-conduct)
[I don't want to read this whole thing, I just have a question!!!](#i-dont-want-to-read-this-whole-thing-i-just-have-a-question)
[What should I know before I get started?](#what-should-i-know-before-i-get-started)
* [Code of Conduct](#code-of-conduct)
* [Atom and Packages](#atom-and-packages)
* [Atom Design Decisions](#design-decisions)
[How Can I Contribute?](#how-can-i-contribute)
* [Reporting Bugs](#reporting-bugs)
@@ -19,6 +22,7 @@ These are just guidelines, not rules, use your best judgment and feel free to pr
[Styleguides](#styleguides)
* [Git Commit Messages](#git-commit-messages)
* [JavaScript Styleguide](#javascript-styleguide)
* [CoffeeScript Styleguide](#coffeescript-styleguide)
* [Specs Styleguide](#specs-styleguide)
* [Documentation Styleguide](#documentation-styleguide)
@@ -26,23 +30,38 @@ These are just guidelines, not rules, use your best judgment and feel free to pr
[Additional Notes](#additional-notes)
* [Issue and Pull Request Labels](#issue-and-pull-request-labels)
## Code of Conduct
This project and everyone participating in it is governed by the [Atom Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to [atom@github.com](mailto:atom@github.com).
## I don't want to read this whole thing I just have a question!!!
> **Note:** [Please don't file an issue to ask a question.](http://blog.atom.io/2016/04/19/managing-the-deluge-of-atom-issues.html) You'll get faster results by using the resources below.
We have an official message board with a detailed FAQ and where the community chimes in with helpful advice if you have questions.
* [Discuss, the official Atom and Electron message board](https://discuss.atom.io)
* [Atom FAQ](https://discuss.atom.io/c/faq)
If chat is more your speed, you can join the Atom and Electron Slack team:
* [Join the Atom and Electron Slack Team](http://atom-slack.herokuapp.com/)
* Even though Slack is a chat service, sometimes it takes several hours for community members to respond — please be patient!
* Use the `#atom` channel for general questions or discussion about Atom
* Use the `#electron` channel for questions about Electron
* Use the `#packages` channel for questions or discussion about writing or contributing to Atom packages (both core and community)
* Use the `#ui` channel for questions and discussion about Atom UI and themes
* There are many other channels available, check the channel list
## What should I know before I get started?
### Code of Conduct
This project adheres to the Contributor Covenant [code of conduct](CODE_OF_CONDUCT.md).
By participating, you are expected to uphold this code.
Please report unacceptable behavior to [atom@github.com](mailto:atom@github.com).
### Atom and Packages
Atom is a large open source projectit's made up of over [200 repositories](https://github.com/atom).
When you initially consider contributing to Atom, you might be unsure about which of those 200 repositories implements the functionality you want to change or report a bug for.
This section should help you with that.
Atom is a large open source project — it's made up of over [200 repositories](https://github.com/atom). When you initially consider contributing to Atom, you might be unsure about which of those 200 repositories implements the functionality you want to change or report a bug for. This section should help you with that.
Atom is intentionally very modular.
Nearly every non-editor UI element you interact with comes from a package, even fundamental things like tabs and the status-bar.
These packages are packages in the same way that packages in the [package store](https://atom.io/packages) are packages, with one difference: they are bundled into the [default distribution](https://github.com/atom/atom/blob/10b8de6fc499a7def9b072739486e68530d67ab4/package.json#L58).
Atom is intentionally very modular. Nearly every non-editor UI element you interact with comes from a package, even fundamental things like tabs and the status-bar. These packages are packages in the same way that packages in the [Atom package repository](https://atom.io/packages) are packages, with one difference: they are bundled into the [default distribution](https://github.com/atom/atom/blob/10b8de6fc499a7def9b072739486e68530d67ab4/package.json#L58).
<a id="atom-packages-image"/>
![atom-packages](https://cloud.githubusercontent.com/assets/69169/10472281/84fc9792-71d3-11e5-9fd1-19da717df079.png)
@@ -50,7 +69,7 @@ To get a sense for the packages that are bundled with Atom, you can go to Settin
Here's a list of the big ones:
* [atom/atom](https://github.com/atom/atom) - Atom Core! The core editor component is responsible for basic text editing (e.g. cursors, selections, scrolling), text indentation, wrapping, and folding, text rendering, editor rendering, file system operations (e.g. saving), and installation and auto-updating. You should also use this repository for feedback related to the [core API](https://atom.io/docs/api/latest) and for large, overarching design proposals.
* [atom/atom](https://github.com/atom/atom) - Atom Core! The core editor component is responsible for basic text editing (e.g. cursors, selections, scrolling), text indentation, wrapping, and folding, text rendering, editor rendering, file system operations (e.g. saving), and installation and auto-updating. You should also use this repository for feedback related to the [Atom API](https://atom.io/docs/api/latest) and for large, overarching design proposals.
* [tree-view](https://github.com/atom/tree-view) - file and directory listing on the left of the UI.
* [fuzzy-finder](https://github.com/atom/fuzzy-finder) - the quick file opener.
* [find-and-replace](https://github.com/atom/find-and-replace) - all search and replace functionality.
@@ -66,11 +85,27 @@ Here's a list of the big ones:
* [apm](https://github.com/atom/apm) - the `apm` command line tool (Atom Package Manager). You should use this repository for any contributions related to the `apm` tool and to publishing packages.
* [atom.io](https://github.com/atom/atom.io) - the repository for feedback on the [Atom.io website](https://atom.io) and the [Atom.io package API](https://github.com/atom/atom/blob/master/docs/apm-rest-api.md) used by [apm](https://github.com/atom/apm).
There are many more, but this list should be a good starting point.
For more information on how to work with Atom's official packages, see [Contributing to Atom Packages](https://github.com/atom/atom/blob/master/docs/contributing-to-packages.md).
There are many more, but this list should be a good starting point. For more information on how to work with Atom's official packages, see [Contributing to Atom Packages](http://flight-manual.atom.io/hacking-atom/sections/contributing-to-official-atom-packages/).
Also, because Atom is so extensible, it's possible that a feature you've become accustomed to in Atom or an issue you're encountering aren't coming from a bundled package at all, but rather a [community package](https://atom.io/packages) you've installed.
Each community package has its own repository too, and you should be able to find it in Settings > Packages for the packages you installed and contribute there.
Also, because Atom is so extensible, it's possible that a feature you've become accustomed to in Atom or an issue you're encountering isn't coming from a bundled package at all, but rather a [community package](https://atom.io/packages) you've installed. Each community package has its own repository too, the [Atom FAQ](https://discuss.atom.io/c/faq) has instructions on how to [contact the maintainers of any Atom community package or theme.](https://discuss.atom.io/t/i-have-a-question-about-a-specific-atom-community-package-where-is-the-best-place-to-ask-it/25581)
#### Package Conventions
There are a few conventions that have developed over time around packages:
* Packages that add one or more syntax highlighting grammars are named `language-[language-name]`
* Language packages can add other things besides just a grammar. Many offer commonly-used snippets. Try not to add too much though.
* Theme packages are split into two categories: UI and Syntax themes
* UI themes are named `[theme-name]-ui`
* Syntax themes are named `[theme-name]-syntax`
* Often themes that are designed to work together are given the same root name, for example: `one-dark-ui` and `one-dark-syntax`
* UI themes style everything outside of the editor pane &mdash; all of the green areas in the [packages image above](#atom-packages-image)
* Syntax themes style just the items inside the editor pane, mostly syntax highlighting
* Packages that add [autocomplete providers](https://github.com/atom/autocomplete-plus/wiki/Autocomplete-Providers) are named `autocomplete-[what-they-autocomplete]` &mdash; ex: [autocomplete-css](https://github.com/atom/autocomplete-css)
### Design Decisions
When we make a significant decision in how we maintain the project and what we can or cannot support, we will document it in the [atom/design-decisions repository](https://github.com/atom/design-decisions). If you have a question around how we do things, check to see if it is documented there. If it is *not* documented there, please open a new topic on [Discuss, the official Atom message board](https://discuss.atom.io) and ask your question.
## How Can I Contribute?
@@ -78,18 +113,20 @@ Each community package has its own repository too, and you should be able to fin
This section guides you through submitting a bug report for Atom. Following these guidelines helps maintainers and the community understand your report :pencil:, reproduce the behavior :computer: :computer:, and find related reports :mag_right:.
Before creating bug reports, please check [this list](#before-submitting-a-bug-report) as you might find out that you don't need to create one. When you are creating a bug report, please [include as many details as possible](#how-do-i-submit-a-good-bug-report). If you'd like, you can use [this template](#template-for-submitting-bug-reports) to structure the information.
Before creating bug reports, please check [this list](#before-submitting-a-bug-report) as you might find out that you don't need to create one. When you are creating a bug report, please [include as many details as possible](#how-do-i-submit-a-good-bug-report). Fill out [the required template](ISSUE_TEMPLATE.md), the information it asks for helps us resolve issues faster.
> **Note:** If you find a **Closed** issue that seems like it is the same thing that you're experiencing, open a new issue and include a link to the original issue in the body of your new one.
#### Before Submitting A Bug Report
* **Check the [debugging guide](http://flight-manual.atom.io/hacking-atom/sections/debugging/).** You might be able to find the cause of the problem and fix things yourself. Most importantly, check if you can reproduce the problem [in the latest version of Atom](http://flight-manual.atom.io/hacking-atom/sections/debugging/#update-to-the-latest-version), if the problem happens when you run Atom in [safe mode](http://flight-manual.atom.io/hacking-atom/sections/debugging/#check-if-the-problem-shows-up-in-safe-mode), and if you can get the desired behavior by changing [Atom's or packages' config settings](http://flight-manual.atom.io/hacking-atom/sections/debugging/#check-atom-and-package-settings).
* **Check the [FAQs on the forum](https://discuss.atom.io/c/faq)** for a list of common questions and problems.
* **Determine [which repository the problem should be reported in](#atom-and-packages)**.
* **Perform a [cursory search](https://github.com/issues?q=+is%3Aissue+user%3Aatom)** to see if the problem has already been reported. If it has, add a comment to the existing issue instead of opening a new one.
* **Perform a [cursory search](https://github.com/issues?q=+is%3Aissue+user%3Aatom)** to see if the problem has already been reported. If it has **and the issue is still open**, add a comment to the existing issue instead of opening a new one.
#### How Do I Submit A (Good) Bug Report?
Bugs are tracked as [GitHub issues](https://guides.github.com/features/issues/). After you've determined [which repository](#atom-and-packages) your bug is related to, create an issue on that repository and provide the following information.
Bugs are tracked as [GitHub issues](https://guides.github.com/features/issues/). After you've determined [which repository](#atom-and-packages) your bug is related to, create an issue on that repository and provide the following information by filling in [the template](ISSUE_TEMPLATE.md).
Explain the problem and include additional details to help maintainers reproduce the problem:
@@ -98,10 +135,10 @@ Explain the problem and include additional details to help maintainers reproduce
* **Provide specific examples to demonstrate the steps**. Include links to files or GitHub projects, or copy/pasteable snippets, which you use in those examples. If you're providing snippets in the issue, use [Markdown code blocks](https://help.github.com/articles/markdown-basics/#multiple-lines).
* **Describe the behavior you observed after following the steps** and point out what exactly is the problem with that behavior.
* **Explain which behavior you expected to see instead and why.**
* **Include screenshots and animated GIFs** which show you following the described steps and clearly demonstrate the problem. If you use the keyboard while following the steps, **record the GIF with the [Keybinding Resolver](https://github.com/atom/keybinding-resolver) shown**. You can use [this tool](http://www.cockos.com/licecap/) to record GIFs on OSX and Windows, and [this tool](https://github.com/colinkeenan/silentcast) or [this tool](https://github.com/GNOME/byzanz) on Linux.
* **If you're reporting that Atom crashed**, include a crash report with a stack trace from the operating system. On OSX, the crash report will be available in `Console.app` under "Diagnostic and usage information" > "User diagnostic reports". Include the crash report in the issue in a [code block](https://help.github.com/articles/markdown-basics/#multiple-lines), a [file attachment](https://help.github.com/articles/file-attachments-on-issues-and-pull-requests/), or put it in a [gist](https://gist.github.com/) and provide link to that gist.
* **If the problem is related to performance**, include a [CPU profile capture and a screenshot](http://flight-manual.atom.io/hacking-atom/sections/debugging/#diagnose-performance-problems-with-the-dev-tools-cpu-profiler) with your report.
* **If the Chrome's developer tools pane is shown without you triggering it**, that normally means that an exception was thrown. The Console tab will include an entry for the exception. Expand the exception so that the stack trace is visible, and provide the full exception and stack trace in a [code blocks](https://help.github.com/articles/markdown-basics/#multiple-lines) and as a screenshot.
* **Include screenshots and animated GIFs** which show you following the described steps and clearly demonstrate the problem. If you use the keyboard while following the steps, **record the GIF with the [Keybinding Resolver](https://github.com/atom/keybinding-resolver) shown**. You can use [this tool](http://www.cockos.com/licecap/) to record GIFs on macOS and Windows, and [this tool](https://github.com/colinkeenan/silentcast) or [this tool](https://github.com/GNOME/byzanz) on Linux.
* **If you're reporting that Atom crashed**, include a crash report with a stack trace from the operating system. On macOS, the crash report will be available in `Console.app` under "Diagnostic and usage information" > "User diagnostic reports". Include the crash report in the issue in a [code block](https://help.github.com/articles/markdown-basics/#multiple-lines), a [file attachment](https://help.github.com/articles/file-attachments-on-issues-and-pull-requests/), or put it in a [gist](https://gist.github.com/) and provide link to that gist.
* **If the problem is related to performance or memory**, include a [CPU profile capture](http://flight-manual.atom.io/hacking-atom/sections/debugging/#diagnose-runtime-performance) with your report.
* **If Chrome's developer tools pane is shown without you triggering it**, that normally means that you have a syntax error in one of your themes or in your `styles.less`. Try running in [Safe Mode](http://flight-manual.atom.io/hacking-atom/sections/debugging/#using-safe-mode) and using a different theme or comment out the contents of your `styles.less` to see if that fixes the problem.
* **If the problem wasn't triggered by a specific action**, describe what you were doing before the problem happened and share more information using the guidelines below.
Provide more context by answering these questions:
@@ -122,47 +159,11 @@ Include details about your configuration and environment:
* **Are you using Atom with multiple monitors?** If so, can you reproduce the problem when you use a single monitor?
* **Which keyboard layout are you using?** Are you using a US layout or some other layout?
#### Template For Submitting Bug Reports
[Short description of problem here]
**Reproduction Steps:**
1. [First Step]
2. [Second Step]
3. [Other Steps...]
**Expected behavior:**
[Describe expected behavior here]
**Observed behavior:**
[Describe observed behavior here]
**Screenshots and GIFs**
![Screenshots and GIFs which follow reproduction steps to demonstrate the problem](url)
**Atom version:** [Enter Atom version here]
**OS and version:** [Enter OS name and version here]
**Installed packages:**
[List of installed packages here]
**Additional information:**
* Problem can be reproduced in safe mode: [Yes/No]
* Problem started happening recently, didn't happen in an older version of Atom: [Yes/No]
* Problem can be reliably reproduced, doesn't happen randomly: [Yes/No]
* Problem happens with all files and projects, not only some files or projects: [Yes/No]
### Suggesting Enhancements
This section guides you through submitting an enhancement suggestion for Atom, including completely new features and minor improvements to existing functionality. Following these guidelines helps maintainers and the community understand your suggestion :pencil: and find related suggestions :mag_right:.
Before creating enhancement suggestions, please check [this list](#before-submitting-an-enhancement-suggestion) as you might find out that you don't need to create one. When you are creating an enhancement suggestion, please [include as many details as possible](#how-do-i-submit-a-good-enhancement-suggestion). If you'd like, you can use [this template](#template-for-submitting-enhancement-suggestions) to structure the information.
Before creating enhancement suggestions, please check [this list](#before-submitting-an-enhancement-suggestion) as you might find out that you don't need to create one. When you are creating an enhancement suggestion, please [include as many details as possible](#how-do-i-submit-a-good-enhancement-suggestion). Fill in [the template](ISSUE_TEMPLATE.md), including the steps that you imagine you would take if the feature you're requesting existed.
#### Before Submitting An Enhancement Suggestion
@@ -173,45 +174,18 @@ Before creating enhancement suggestions, please check [this list](#before-submit
#### How Do I Submit A (Good) Enhancement Suggestion?
Enhancement suggestions are tracked as [GitHub issues](https://guides.github.com/features/issues/). After you've determined [which repository](#atom-and-packages) your enhancement suggestions is related to, create an issue on that repository and provide the following information:
Enhancement suggestions are tracked as [GitHub issues](https://guides.github.com/features/issues/). After you've determined [which repository](#atom-and-packages) your enhancement suggestion is related to, create an issue on that repository and provide the following information:
* **Use a clear and descriptive title** for the issue to identify the suggestion.
* **Provide a step-by-step description of the suggested enhancement** in as many details as possible.
* **Provide specific examples to demonstrate the steps**. Include copy/pasteable snippets which you use in those examples, as [Markdown code blocks](https://help.github.com/articles/markdown-basics/#multiple-lines).
* **Describe the current behavior** and **explain which behavior you expected to see instead** and why.
* **Include screenshots and animated GIFs** which help you demonstrate the steps or point out the part of Atom which the suggestion is related to. You can use [this tool](http://www.cockos.com/licecap/) to record GIFs on OSX and Windows, and [this tool](https://github.com/colinkeenan/silentcast) or [this tool](https://github.com/GNOME/byzanz) on Linux.
* **Include screenshots and animated GIFs** which help you demonstrate the steps or point out the part of Atom which the suggestion is related to. You can use [this tool](http://www.cockos.com/licecap/) to record GIFs on macOS and Windows, and [this tool](https://github.com/colinkeenan/silentcast) or [this tool](https://github.com/GNOME/byzanz) on Linux.
* **Explain why this enhancement would be useful** to most Atom users and isn't something that can or should be implemented as a [community package](#atom-and-packages).
* **List some other text editors or applications where this enhancement exists.**
* **Specify which version of Atom you're using.** You can get the exact version by running `atom -v` in your terminal, or by starting Atom and running the `Application: About` command from the [Command Palette](https://github.com/atom/command-palette).
* **Specify the name and version of the OS you're using.**
#### Template For Submitting Enhancement Suggestions
[Short description of suggestion]
**Steps which explain the enhancement**
1. [First Step]
2. [Second Step]
3. [Other Steps...]
**Current and suggested behavior**
[Describe current and suggested behavior here]
**Why would the enhancement be useful to most users**
[Explain why the enhancement would be useful to most users]
[List some other text editors or applications where this enhancement exists]
**Screenshots and GIFs**
![Screenshots and GIFs which demonstrate the steps or part of Atom the enhancement suggestion is related to](url)
**Atom Version:** [Enter Atom version here]
**OS and Version:** [Enter OS name and version here]
### Your First Code Contribution
Unsure where to begin contributing to Atom? You can start by looking through these `beginner` and `help-wanted` issues:
@@ -223,31 +197,36 @@ Both issue lists are sorted by total number of comments. While not perfect, numb
If you want to read about using Atom or developing packages in Atom, the [Atom Flight Manual](http://flight-manual.atom.io) is free and available online. You can find the source to the manual in [atom/flight-manual.atom.io](https://github.com/atom/flight-manual.atom.io).
#### Local development
All packages can be developed locally, by checking out the corresponding repository and registering the package to Atom with `apm`:
```
$ git clone url-to-git-repository
$ cd path-to-package/
$ apm link -d
$ atom -d .
```
By running Atom with the `-d` flag, you signal it to run with development packages installed. `apm link` makes sure that your local repository is loaded by Atom.
### Pull Requests
* Fill in [the required template](PULL_REQUEST_TEMPLATE.md)
* Do not include issue numbers in the PR title
* Include screenshots and animated GIFs in your pull request whenever possible.
* Follow the [CoffeeScript](#coffeescript-styleguide),
[JavaScript](https://github.com/styleguide/javascript),
and [CSS](https://github.com/styleguide/css) styleguides.
* Include thoughtfully-worded, well-structured
[Jasmine](http://jasmine.github.io/) specs in the `./spec` folder. Run them using `apm test`. See the [Specs Styleguide](#specs-styleguide) below.
* Document new code based on the
[Documentation Styleguide](#documentation-styleguide)
* End files with a newline.
* Follow the [JavaScript](#javascript-styleguide) and [CoffeeScript](#coffeescript-styleguide) styleguides.
* Include thoughtfully-worded, well-structured [Jasmine](http://jasmine.github.io/) specs in the `./spec` folder. Run them using `atom --test spec`. See the [Specs Styleguide](#specs-styleguide) below.
* Document new code based on the [Documentation Styleguide](#documentation-styleguide)
* End all files with a newline
* [Avoid platform-dependent code](http://flight-manual.atom.io/hacking-atom/sections/cross-platform-compatibility/)
* Place requires in the following order:
* Built in Node Modules (such as `path`)
* Built in Atom and Atom Shell Modules (such as `atom`, `shell`)
* Built in Atom and Electron Modules (such as `atom`, `remote`)
* Local Modules (using relative paths)
* Place class properties in the following order:
* Class methods and properties (methods starting with a `@`)
* Class methods and properties (methods starting with a `@` in CoffeeScript or `static` in JavaScript)
* Instance methods and properties
* Avoid platform-dependent code:
* Use `require('fs-plus').getHomeDirectory()` to get the home directory.
* Use `path.join()` to concatenate filenames.
* Use `os.tmpdir()` rather than `/tmp` when you need to reference the
temporary directory.
* Using a plain `return` when returning explicitly at the end of a function.
* Not `return null`, `return undefined`, `null`, or `undefined`
## Styleguides
@@ -256,7 +235,7 @@ If you want to read about using Atom or developing packages in Atom, the [Atom F
* Use the present tense ("Add feature" not "Added feature")
* Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
* Limit the first line to 72 characters or less
* Reference issues and pull requests liberally
* Reference issues and pull requests liberally after the first line
* When only changing documentation, include `[ci skip]` in the commit description
* Consider starting the commit message with an applicable emoji:
* :art: `:art:` when improving the format/structure of the code
@@ -264,7 +243,7 @@ If you want to read about using Atom or developing packages in Atom, the [Atom F
* :non-potable_water: `:non-potable_water:` when plugging memory leaks
* :memo: `:memo:` when writing docs
* :penguin: `:penguin:` when fixing something on Linux
* :apple: `:apple:` when fixing something on Mac OS
* :apple: `:apple:` when fixing something on macOS
* :checkered_flag: `:checkered_flag:` when fixing something on Windows
* :bug: `:bug:` when fixing a bug
* :fire: `:fire:` when removing code or files
@@ -275,6 +254,25 @@ If you want to read about using Atom or developing packages in Atom, the [Atom F
* :arrow_down: `:arrow_down:` when downgrading dependencies
* :shirt: `:shirt:` when removing linter warnings
### JavaScript Styleguide
All JavaScript must adhere to [JavaScript Standard Style](http://standardjs.com/).
* Prefer the object spread operator (`{...anotherObj}`) to `Object.assign()`
* Inline `export`s with expressions whenever possible
```js
// Use this:
export default class ClassName {
}
// Instead of:
class ClassName {
}
export default ClassName
```
### CoffeeScript Styleguide
* Set parameter defaults without spaces around the equal sign
@@ -300,10 +298,9 @@ If you want to read about using Atom or developing packages in Atom, the [Atom F
### Specs Styleguide
- Include thoughtfully-worded, well-structured
[Jasmine](http://jasmine.github.io/) specs in the `./spec` folder.
- treat `describe` as a noun or situation.
- treat `it` as a statement about state or how an operation changes state.
- Include thoughtfully-worded, well-structured [Jasmine](http://jasmine.github.io/) specs in the `./spec` folder.
- Treat `describe` as a noun or situation.
- Treat `it` as a statement about state or how an operation changes state.
#### Example
@@ -377,7 +374,7 @@ Please open an issue on `atom/atom` if you have suggestions for new labels, and
| --- | --- | --- | --- |
| `windows` | [search][search-atom-repo-label-windows] | [search][search-atom-org-label-windows] | Related to Atom running on Windows. |
| `linux` | [search][search-atom-repo-label-linux] | [search][search-atom-org-label-linux] | Related to Atom running on Linux. |
| `mac` | [search][search-atom-repo-label-mac] | [search][search-atom-org-label-mac] | Related to Atom running on OSX. |
| `mac` | [search][search-atom-repo-label-mac] | [search][search-atom-org-label-mac] | Related to Atom running on macOS. |
| `documentation` | [search][search-atom-repo-label-documentation] | [search][search-atom-org-label-documentation] | Related to any type of documentation (e.g. [API documentation](https://atom.io/docs/api/latest/) and the [flight manual](http://flight-manual.atom.io/)). |
| `performance` | [search][search-atom-repo-label-performance] | [search][search-atom-org-label-performance] | Related to performance. |
| `security` | [search][search-atom-repo-label-security] | [search][search-atom-org-label-security] | Related to security. |
@@ -404,12 +401,6 @@ Please open an issue on `atom/atom` if you have suggestions for new labels, and
| `deprecation-help` | [search][search-atom-repo-label-deprecation-help] | [search][search-atom-org-label-deprecation-help] | Issues for helping package authors remove usage of deprecated APIs in packages. |
| `electron` | [search][search-atom-repo-label-electron] | [search][search-atom-org-label-electron] | Issues that require changes to [Electron](https://electron.atom.io) to fix or implement. |
#### Core Team Project Management
| Label name | `atom/atom` :mag_right: | `atom`org :mag_right: | Description |
| --- | --- | --- | --- |
| `atom` | [search][search-atom-repo-label-atom] | [search][search-atom-org-label-atom] | Topics discussed for prioritization at the next meeting of Atom core team members. |
#### Pull Request Labels
| Label name | `atom/atom` :mag_right: | `atom`org :mag_right: | Description
@@ -496,8 +487,6 @@ Please open an issue on `atom/atom` if you have suggestions for new labels, and
[search-atom-org-label-deprecation-help]: https://github.com/issues?q=is%3Aopen+is%3Aissue+user%3Aatom+label%3Adeprecation-help
[search-atom-repo-label-electron]: https://github.com/issues?q=is%3Aissue+repo%3Aatom%2Fatom+is%3Aopen+label%3Aelectron
[search-atom-org-label-electron]: https://github.com/issues?q=is%3Aopen+is%3Aissue+user%3Aatom+label%3Aelectron
[search-atom-repo-label-atom]: https://github.com/issues?q=is%3Aopen+is%3Aissue+repo%3Aatom%2Fatom+label%3Aatom
[search-atom-org-label-atom]: https://github.com/issues?q=is%3Aopen+is%3Aissue+user%3Aatom+label%3Aatom
[search-atom-repo-label-work-in-progress]: https://github.com/pulls?q=is%3Aopen+is%3Apr+repo%3Aatom%2Fatom+label%3Awork-in-progress
[search-atom-org-label-work-in-progress]: https://github.com/pulls?q=is%3Aopen+is%3Apr+user%3Aatom+label%3Awork-in-progress
[search-atom-repo-label-needs-review]: https://github.com/pulls?q=is%3Aopen+is%3Apr+repo%3Aatom%2Fatom+label%3Aneeds-review
@@ -510,4 +499,4 @@ Please open an issue on `atom/atom` if you have suggestions for new labels, and
[search-atom-org-label-needs-testing]: https://github.com/pulls?q=is%3Aopen+is%3Apr+user%3Aatom+label%3Aneeds-testing
[beginner]:https://github.com/issues?utf8=%E2%9C%93&q=is%3Aopen+is%3Aissue+label%3Abeginner+label%3Ahelp-wanted+user%3Aatom+sort%3Acomments-desc
[help-wanted]:https://github.com/issues?q=is%3Aopen+is%3Aissue+label%3Ahelp-wanted+user%3Aatom+sort%3Acomments-desc
[help-wanted]:https://github.com/issues?q=is%3Aopen+is%3Aissue+label%3Ahelp-wanted+user%3Aatom+sort%3Acomments-desc+-label%3Abeginner

View File

@@ -2,7 +2,7 @@
# DESCRIPTION: Image to build Atom and create a .rpm file
# Base docker image
FROM fedora:21
FROM nodesource/fedora21:4.2.6
# Install dependencies
RUN yum install -y \
@@ -11,12 +11,10 @@ RUN yum install -y \
gcc-c++ \
glibc-devel \
git-core \
libgnome-keyring-devel \
rpmdevtools \
nodejs \
npm
libsecret-devel \
rpmdevtools
RUN npm install -g npm@1.4.28 --loglevel error
RUN npm install -g npm --loglevel error
ADD . /atom
WORKDIR /atom

View File

@@ -1,17 +1,23 @@
<!--
Have you read Atom's Code of Conduct? By filing an Issue, you are expected to comply with it, including treating everyone with respect: https://github.com/atom/atom/blob/master/CODE_OF_CONDUCT.md
Do you want to ask a question? Are you looking for support? The Atom message board is the best place for getting support: https://discuss.atom.io
-->
### Prerequisites
* [ ] Can you reproduce the problem in [safe mode](http://flight-manual.atom.io/hacking-atom/sections/debugging/#check-if-the-problem-shows-up-in-safe-mode)?
* [ ] Are you running the [latest version of Atom](http://flight-manual.atom.io/hacking-atom/sections/debugging/#update-to-the-latest-version)?
* [ ] Did you check the [debugging guide](http://flight-manual.atom.io/hacking-atom/sections/debugging/)?
* [ ] Did you check the [FAQs on Discuss](https://discuss.atom.io/c/faq)?
* [ ] Are you reporting to the [correct repository](https://github.com/atom/atom/blob/master/CONTRIBUTING.md#atom-and-packages)?
* [ ] Did you [perform a cursory search](https://github.com/issues?q=is%3Aissue+user%3Aatom+-repo%3Aatom%2Felectron) to see if your bug or enhancement is already reported?
For more information on how to write a good [bug report](https://github.com/atom/atom/blob/master/CONTRIBUTING.md#how-do-i-submit-a-good-bug-report) or [enhancement request](https://github.com/atom/atom/blob/master/CONTRIBUTING.md#how-do-i-submit-a-good-enhancement-suggestion), see the `CONTRIBUTING` guide.
* [ ] Put an X between the brackets on this line if you have done all of the following:
* Reproduced the problem in Safe Mode: http://flight-manual.atom.io/hacking-atom/sections/debugging/#using-safe-mode
* Followed all applicable steps in the debugging guide: http://flight-manual.atom.io/hacking-atom/sections/debugging/
* Checked the FAQs on the message board for common solutions: https://discuss.atom.io/c/faq
* Checked that your issue isn't already filed: https://github.com/issues?utf8=✓&q=is%3Aissue+user%3Aatom
* Checked that there is not already an Atom package that provides the described functionality: https://atom.io/packages
### Description
[Description of the bug or feature]
[Description of the issue]
### Steps to Reproduce
@@ -19,10 +25,16 @@ For more information on how to write a good [bug report](https://github.com/atom
2. [Second Step]
3. [and so on...]
**Expected behavior:** [What you expected to happen]
**Expected behavior:** [What you expect to happen]
**Actual behavior:** [What actually happened]
**Actual behavior:** [What actually happens]
**Reproduces how often:** [What percentage of the time does it reproduce?]
### Versions
You can get this information from executing `atom --version` and `apm --version` at the command line. Also, please include the OS and what version of the OS you're running.
You can get this information from copy and pasting the output of `atom --version` and `apm --version` from the command line. Also, please include the OS and what version of the OS you're running.
### Additional Information
Any additional information, configuration or data that might be necessary to reproduce the issue.

View File

@@ -1,4 +1,4 @@
Copyright (c) 2016 GitHub Inc.
Copyright (c) 2011-2017 GitHub Inc.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the

32
PULL_REQUEST_TEMPLATE.md Normal file
View File

@@ -0,0 +1,32 @@
### Requirements
* Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
* All new code requires tests to ensure against regressions
### Description of the Change
<!--
We must be able to understand the design of your change from this description. If we can't get a good idea of what the code will be doing from the description here, the pull request may be closed at the maintainers' discretion. Keep in mind that the maintainer reviewing this PR may not be familiar with or have worked with the code here recently, so please walk us through the concepts.
-->
### Alternate Designs
<!-- Explain what other alternates were considered and why the proposed version was selected -->
### Why Should This Be In Core?
<!-- Explain why this functionality should be in atom/atom as opposed to a package -->
### Benefits
<!-- What benefits will be realized by the code change? -->
### Possible Drawbacks
<!-- What are the possible side-effects or negative impacts of the code change? -->
### Applicable Issues
<!-- Enter any applicable Issues here -->

View File

@@ -1,8 +1,8 @@
![Atom](https://cloud.githubusercontent.com/assets/72919/2874231/3af1db48-d3dd-11e3-98dc-6066f8bc766f.png)
[![Build Status](https://travis-ci.org/atom/atom.svg?branch=master)](https://travis-ci.org/atom/atom) [![Build status](https://ci.appveyor.com/api/projects/status/1tkktwh654w07eim?svg=true)](https://ci.appveyor.com/project/Atom/atom)
[![macOS Build Status](https://circleci.com/gh/atom/atom/tree/master.svg?style=shield)](https://circleci.com/gh/atom/atom) [![Linux Build Status](https://travis-ci.org/atom/atom.svg?branch=master)](https://travis-ci.org/atom/atom) [![Windows Build Status](https://ci.appveyor.com/api/projects/status/1tkktwh654w07eim?svg=true)](https://ci.appveyor.com/project/Atom/atom)
[![Dependency Status](https://david-dm.org/atom/atom.svg)](https://david-dm.org/atom/atom)
[![Join the Atom Community on Slack](http://atom-slack.herokuapp.com/badge.svg)](http://atom-slack.herokuapp.com/)
[![Join the Atom Community on Slack](https://atom-slack.herokuapp.com/badge.svg)](https://atom-slack.herokuapp.com)
Atom is a hackable text editor for the 21st century, built on [Electron](https://github.com/atom/electron), and based on everything we love about our favorite editors. We designed it to be deeply customizable, but still approachable using the default configuration.
@@ -16,16 +16,16 @@ By participating, you are expected to uphold this code. Please report unacceptab
## Documentation
If you want to read about using Atom or developing packages in Atom, the [Atom Flight Manual](http://flight-manual.atom.io) is free and available online. You can find the source to the manual in [atom/flight-manual.atom.io](https://github.com/atom/flight-manual.atom.io).
If you want to read about using Atom or developing packages in Atom, the [Atom Flight Manual](https://flight-manual.atom.io) is free and available online. You can find the source to the manual in [atom/flight-manual.atom.io](https://github.com/atom/flight-manual.atom.io).
The [API reference](https://atom.io/docs/api) for developing packages is also documented on Atom.io.
## Installing
### Prerequisites
- [Git](https://git-scm.com/)
- [Git](https://git-scm.com)
### OS X
### macOS
Download the latest [Atom release](https://github.com/atom/atom/releases/latest).
@@ -33,19 +33,18 @@ Atom will automatically update when a new release is available.
### Windows
Download the latest [AtomSetup.exe installer](https://github.com/atom/atom/releases/latest).
Download the latest [Atom installer](https://github.com/atom/atom/releases/latest). AtomSetup.exe is 32-bit, AtomSetup-x64.exe for 64-bit systems.
Atom will automatically update when a new release is available.
You can also download an `atom-windows.zip` file from the [releases page](https://github.com/atom/atom/releases/latest).
You can also download `atom-windows.zip` (32-bit) or `atom-x64-windows.zip` (64-bit) from the [releases page](https://github.com/atom/atom/releases/latest).
The `.zip` version will not automatically update.
Using [chocolatey](https://chocolatey.org/)? Run `cinst Atom` to install
the latest version of Atom.
Using [Chocolatey](https://chocolatey.org)? Run `cinst Atom` to install the latest version of Atom.
### Debian Linux (Ubuntu)
### Debian based (Debian, Ubuntu, Linux Mint)
Currently only a 64-bit version is available.
Atom is only available for 64-bit Linux systems.
1. Download `atom-amd64.deb` from the [Atom releases page](https://github.com/atom/atom/releases/latest).
2. Run `sudo dpkg --install atom-amd64.deb` on the downloaded package.
@@ -54,23 +53,12 @@ Currently only a 64-bit version is available.
The Linux version does not currently automatically update so you will need to
repeat these steps to upgrade to future releases.
### Red Hat Linux (Fedora 21 and under, CentOS, Red Hat)
### RPM based (Red Hat, openSUSE, Fedora, CentOS)
Currently only a 64-bit version is available.
Atom is only available for 64-bit Linux systems.
1. Download `atom.x86_64.rpm` from the [Atom releases page](https://github.com/atom/atom/releases/latest).
2. Run `sudo yum localinstall atom.x86_64.rpm` on the downloaded package.
3. Launch Atom using the installed `atom` command.
The Linux version does not currently automatically update so you will need to
repeat these steps to upgrade to future releases.
### Fedora 22+
Currently only a 64-bit version is available.
1. Download `atom.x86_64.rpm` from the [Atom releases page](https://github.com/atom/atom/releases/latest).
2. Run `sudo dnf install ./atom.x86_64.rpm` on the downloaded package.
2. Run `sudo rpm -i atom.x86_64.rpm` on the downloaded package.
3. Launch Atom using the installed `atom` command.
The Linux version does not currently automatically update so you will need to
@@ -83,8 +71,7 @@ An archive is available for people who don't want to install `atom` as root.
This version enables you to install multiple Atom versions in parallel. It has been built on Ubuntu 64-bit,
but should be compatible with other Linux distributions.
1. Install dependencies (on Ubuntu): `sudo apt install git gconf2 gconf-service libgtk2.0-0 libudev1 libgcrypt20
libnotify4 libxtst6 libnss3 python gvfs-bin xdg-utils libcap2`
1. Install dependencies (on Ubuntu): `sudo apt install git gconf2 gconf-service libgtk2.0-0 libudev1 libgcrypt20 libnotify4 libxtst6 libnss3 python gvfs-bin xdg-utils libcap2`
2. Download `atom-amd64.tar.gz` from the [Atom releases page](https://github.com/atom/atom/releases/latest).
3. Run `tar xf atom-amd64.tar.gz` in the directory where you want to extract the Atom folder.
4. Launch Atom using the installed `atom` command from the newly extracted directory.
@@ -94,7 +81,13 @@ repeat these steps to upgrade to future releases.
## Building
* [Linux](docs/build-instructions/linux.md)
* [OS X](docs/build-instructions/os-x.md)
* [FreeBSD](docs/build-instructions/freebsd.md)
* [Windows](docs/build-instructions/windows.md)
* [Linux](./docs/build-instructions/linux.md)
* [macOS](./docs/build-instructions/macOS.md)
* [FreeBSD](./docs/build-instructions/freebsd.md)
* [Windows](./docs/build-instructions/windows.md)
## License
[MIT](https://github.com/atom/atom/blob/master/LICENSE.md)
When using the Atom or other GitHub logos, be sure to follow the [GitHub logo guidelines](https://github.com/logos).

11
SUPPORT.md Normal file
View File

@@ -0,0 +1,11 @@
# Atom Support
If you're looking for support for Atom there are a lot of options, check out:
* User Documentation &mdash; [The Atom Flight Manual](http://flight-manual.atom.io)
* Developer Documentation &mdash; [Atom API Documentation](https://atom.io/docs/api/latest)
* FAQ &mdash; [The Atom FAQ on Discuss](https://discuss.atom.io/c/faq)
* Message Board &mdash; [Discuss, the official Atom and Electron message board](https://discuss.atom.io)
* Chat &mdash; [Join the Atom Slack team](http://atom-slack.herokuapp.com/)
On Discuss and in the Atom Slack team, there are a bunch of helpful community members that should be willing to point you in the right direction.

View File

@@ -1 +0,0 @@
cache = ~/.atom/.npm

View File

@@ -6,6 +6,6 @@
"url": "https://github.com/atom/atom.git"
},
"dependencies": {
"atom-package-manager": "1.10.0"
"atom-package-manager": "1.18.7"
}
}

View File

@@ -1,42 +1,90 @@
version: "{build}"
image: Visual Studio 2015
branches:
only:
- master
version: "{build}"
skip_tags: true
clone_folder: c:\projects\atom
clone_depth: 10
branches:
only:
- master
- /^[0-9.]+-releases$/
platform:
- x64
- x86
environment:
global:
ATOM_DEV_RESOURCE_PATH: c:\projects\atom
ATOM_ACCESS_TOKEN:
secure: Q7vxmSq0bVCLTTRPzXw5ZhPTe7XYhWxX0tQV6neEkddTH6pZkOYNmSCG6VnMX2f+
TEST_JUNIT_XML_ROOT: c:\projects\junit-test-results
NODE_VERSION: 6.9.4
matrix:
- NODE_VERSION: 0.10.35
- TASK: test
- TASK: installer
matrix:
fast_finish: true
exclude:
- platform: x86
TASK: test
install:
- IF NOT EXIST %TEST_JUNIT_XML_ROOT% MKDIR %TEST_JUNIT_XML_ROOT%
- SET PATH=C:\Program Files\Atom\resources\cli;%PATH%
- ps: Install-Product node $env:NODE_VERSION $env:PLATFORM
- npm install -g npm@5.3.0
build_script:
- cd %APPVEYOR_BUILD_FOLDER%
- C:\projects\atom\script\cibuild.cmd
- CD %APPVEYOR_BUILD_FOLDER%
- IF NOT EXIST C:\tmp MKDIR C:\tmp
- SET SQUIRREL_TEMP=C:\tmp
- IF [%TASK%]==[installer] (
IF [%APPVEYOR_REPO_BRANCH:~-9%]==[-releases] (
script\build.cmd --code-sign --compress-artifacts --create-windows-installer
) ELSE (
ECHO Skipping installer and Atom build on non-release branch
)
) ELSE (
ECHO Skipping installer build on non-installer build matrix row &&
script\build.cmd --code-sign --compress-artifacts
)
test_script:
- IF [%TASK%]==[test] (
script\lint.cmd &&
script\test.cmd
) ELSE (
ECHO Skipping tests on installer build matrix row
)
test: off
deploy: off
artifacts:
- path: out\**\AtomSetup.exe
- path: out\AtomSetup.exe
name: AtomSetup.exe
- path: out\**\AtomSetup.msi
name: AtomSetup.msi
- path: out\atom-windows.zip
name: atom-windows.zip
- path: out\RELEASES
name: RELEASES
- path: out\atom-*-delta.nupkg
name: atom-delta.nupkg
- path: out\atom-*-full.nupkg
name: atom-full.nupkg
cache:
- '%APPVEYOR_BUILD_FOLDER%\electron'
- '%USERPROFILE%\.atom\.apm'
- '%USERPROFILE%\.atom\.node-gyp\.atom'
- '%USERPROFILE%\.atom\.npm'
- '%USERPROFILE%\.atom\compile-cache'
on_finish:
- ps: |
$wc = New-Object 'System.Net.WebClient'
$endpoint = "https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)"
Write-Output "Searching for JUnit XML output beneath $($env:TEST_JUNIT_XML_ROOT)"
Get-ChildItem -Path $env:TEST_JUNIT_XML_ROOT -Recurse -File -Name -Include "*.xml" | ForEach-Object {
$full = "$($env:TEST_JUNIT_XML_ROOT)\$($_)"
Write-Output "Uploading JUnit XML file $($full)"
$wc.UploadFile($endpoint, $full)
}

38
atom.sh
View File

@@ -15,6 +15,8 @@ else
BETA_VERSION=
fi
export ATOM_DISABLE_SHELLING_OUT_FOR_ENVIRONMENT=true
while getopts ":wtfvh-:" opt; do
case "$opt" in
-)
@@ -26,9 +28,12 @@ while getopts ":wtfvh-:" opt; do
REDIRECT_STDERR=1
EXPECT_OUTPUT=1
;;
foreground|test)
foreground|benchmark|benchmark-test|test)
EXPECT_OUTPUT=1
;;
enable-electron-logging)
export ELECTRON_ENABLE_LOGGING=1
;;
esac
;;
w)
@@ -48,37 +53,46 @@ if [ $REDIRECT_STDERR ]; then
exec 2> /dev/null
fi
if [ $EXPECT_OUTPUT ]; then
export ELECTRON_ENABLE_LOGGING=1
fi
if [ $OS == 'Mac' ]; then
if [ -n "$BETA_VERSION" ]; then
ATOM_APP_NAME="Atom Beta.app"
if [ -L "$0" ]; then
SCRIPT="$(readlink "$0")"
else
ATOM_APP_NAME="Atom.app"
SCRIPT="$0"
fi
ATOM_APP="$(dirname "$(dirname "$(dirname "$(dirname "$SCRIPT")")")")"
if [ "$ATOM_APP" == . ]; then
unset ATOM_APP
else
ATOM_PATH="$(dirname "$ATOM_APP")"
ATOM_APP_NAME="$(basename "$ATOM_APP")"
fi
if [ -n "$BETA_VERSION" ]; then
ATOM_EXECUTABLE_NAME="Atom Beta"
else
ATOM_EXECUTABLE_NAME="Atom"
fi
if [ -z "${ATOM_PATH}" ]; then
# If ATOM_PATH isnt set, check /Applications and then ~/Applications for Atom.app
# If ATOM_PATH isn't set, check /Applications and then ~/Applications for Atom.app
if [ -x "/Applications/$ATOM_APP_NAME" ]; then
ATOM_PATH="/Applications"
elif [ -x "$HOME/Applications/$ATOM_APP_NAME" ]; then
ATOM_PATH="$HOME/Applications"
else
# We havent found an Atom.app, use spotlight to search for Atom
# We haven't found an Atom.app, use spotlight to search for Atom
ATOM_PATH="$(mdfind "kMDItemCFBundleIdentifier == 'com.github.atom'" | grep -v ShipIt | head -1 | xargs -0 dirname)"
# Exit if Atom can't be found
if [ ! -x "$ATOM_PATH/$ATOM_APP_NAME" ]; then
echo "Cannot locate Atom.app, it is usually located in /Applications. Set the ATOM_PATH environment variable to the directory containing Atom.app."
echo "Cannot locate ${ATOM_APP_NAME}, it is usually located in /Applications. Set the ATOM_PATH environment variable to the directory containing ${ATOM_APP_NAME}."
exit 1
fi
fi
fi
if [ $EXPECT_OUTPUT ]; then
"$ATOM_PATH/$ATOM_APP_NAME/Contents/MacOS/Atom" --executed-from="$(pwd)" --pid=$$ "$@"
"$ATOM_PATH/$ATOM_APP_NAME/Contents/MacOS/$ATOM_EXECUTABLE_NAME" --executed-from="$(pwd)" --pid=$$ "$@"
exit $?
else
open -a "$ATOM_PATH/$ATOM_APP_NAME" -n --args --executed-from="$(pwd)" --pid=$$ --path-environment="$PATH" "$@"

View File

@@ -0,0 +1,73 @@
/** @babel */
import Chart from 'chart.js'
import glob from 'glob'
import fs from 'fs-plus'
import path from 'path'
export default async function ({test, benchmarkPaths}) {
document.body.style.backgroundColor = '#ffffff'
document.body.style.overflow = 'auto'
let paths = []
for (const benchmarkPath of benchmarkPaths) {
if (fs.isDirectorySync(benchmarkPath)) {
paths = paths.concat(glob.sync(path.join(benchmarkPath, '**', '*.bench.js')))
} else {
paths.push(benchmarkPath)
}
}
while (paths.length > 0) {
const benchmark = require(paths.shift())({test})
let results
if (benchmark instanceof Promise) {
results = await benchmark
} else {
results = benchmark
}
const dataByBenchmarkName = {}
for (const {name, duration, x} of results) {
dataByBenchmarkName[name] = dataByBenchmarkName[name] || {points: []}
dataByBenchmarkName[name].points.push({x, y: duration})
}
const benchmarkContainer = document.createElement('div')
document.body.appendChild(benchmarkContainer)
for (const key in dataByBenchmarkName) {
const data = dataByBenchmarkName[key]
if (data.points.length > 1) {
const canvas = document.createElement('canvas')
benchmarkContainer.appendChild(canvas)
const chart = new Chart(canvas, {
type: 'line',
data: {
datasets: [{label: key, fill: false, data: data.points}]
},
options: {
showLines: false,
scales: {xAxes: [{type: 'linear', position: 'bottom'}]}
}
})
const textualOutput = `${key}:\n\n` + data.points.map((p) => `${p.x}\t${p.y}`).join('\n')
console.log(textualOutput)
} else {
const title = document.createElement('h2')
title.textContent = key
benchmarkContainer.appendChild(title)
const duration = document.createElement('p')
duration.textContent = `${data.points[0].y}ms`
benchmarkContainer.appendChild(duration)
const textualOutput = `${key}: ${data.points[0].y}`
console.log(textualOutput)
}
await global.atom.reset()
}
}
return 0
}

View File

@@ -0,0 +1,89 @@
/** @babel */
import {TextEditor, TextBuffer} from 'atom'
const MIN_SIZE_IN_KB = 0 * 1024
const MAX_SIZE_IN_KB = 10 * 1024
const SIZE_STEP_IN_KB = 1024
const LINE_TEXT = 'Lorem ipsum dolor sit amet\n'
const TEXT = LINE_TEXT.repeat(Math.ceil(MAX_SIZE_IN_KB * 1024 / LINE_TEXT.length))
export default async function ({test}) {
const data = []
document.body.appendChild(atom.workspace.getElement())
atom.packages.loadPackages()
await atom.packages.activate()
for (let pane of atom.workspace.getPanes()) {
pane.destroy()
}
for (let sizeInKB = MIN_SIZE_IN_KB; sizeInKB < MAX_SIZE_IN_KB; sizeInKB += SIZE_STEP_IN_KB) {
const text = TEXT.slice(0, sizeInKB * 1024)
console.log(text.length / 1024)
let t0 = window.performance.now()
const buffer = new TextBuffer({text})
const editor = new TextEditor({buffer, autoHeight: false, largeFileMode: true})
atom.workspace.getActivePane().activateItem(editor)
let t1 = window.performance.now()
data.push({
name: 'Opening a large file',
x: sizeInKB,
duration: t1 - t0
})
const tickDurations = []
for (let i = 0; i < 20; i++) {
await timeout(50)
t0 = window.performance.now()
await timeout(0)
t1 = window.performance.now()
tickDurations[i] = t1 - t0
}
data.push({
name: 'Max time event loop was blocked after opening a large file',
x: sizeInKB,
duration: Math.max(...tickDurations)
})
t0 = window.performance.now()
editor.setCursorScreenPosition(editor.element.screenPositionForPixelPosition({
top: 100,
left: 30
}))
t1 = window.performance.now()
data.push({
name: 'Clicking the editor after opening a large file',
x: sizeInKB,
duration: t1 - t0
})
t0 = window.performance.now()
editor.element.setScrollTop(editor.element.getScrollTop() + 100)
t1 = window.performance.now()
data.push({
name: 'Scrolling down after opening a large file',
x: sizeInKB,
duration: t1 - t0
})
editor.destroy()
buffer.destroy()
await timeout(10000)
}
atom.workspace.getElement().remove()
return data
}
function timeout (duration) {
return new Promise((resolve) => setTimeout(resolve, duration))
}

View File

@@ -0,0 +1,97 @@
/** @babel */
import path from 'path'
import fs from 'fs'
import {TextEditor, TextBuffer} from 'atom'
const SIZES_IN_KB = [
512,
1024,
2048
]
const REPEATED_TEXT = fs.readFileSync(path.join(__dirname, '..', 'spec', 'fixtures', 'sample.js'), 'utf8').replace(/\n/g, '')
const TEXT = REPEATED_TEXT.repeat(Math.ceil(SIZES_IN_KB[SIZES_IN_KB.length - 1] * 1024 / REPEATED_TEXT.length))
export default async function ({test}) {
const data = []
const workspaceElement = atom.workspace.getElement()
document.body.appendChild(workspaceElement)
atom.packages.loadPackages()
await atom.packages.activate()
console.log(atom.getLoadSettings().resourcePath);
for (let pane of atom.workspace.getPanes()) {
pane.destroy()
}
for (const sizeInKB of SIZES_IN_KB) {
const text = TEXT.slice(0, sizeInKB * 1024)
console.log(text.length / 1024)
let t0 = window.performance.now()
const buffer = new TextBuffer({text})
const editor = new TextEditor({buffer, autoHeight: false, largeFileMode: true})
editor.setGrammar(atom.grammars.grammarForScopeName('source.js'))
atom.workspace.getActivePane().activateItem(editor)
let t1 = window.performance.now()
data.push({
name: 'Opening a large single-line file',
x: sizeInKB,
duration: t1 - t0
})
const tickDurations = []
for (let i = 0; i < 20; i++) {
await timeout(50)
t0 = window.performance.now()
await timeout(0)
t1 = window.performance.now()
tickDurations[i] = t1 - t0
}
data.push({
name: 'Max time event loop was blocked after opening a large single-line file',
x: sizeInKB,
duration: Math.max(...tickDurations)
})
t0 = window.performance.now()
editor.setCursorScreenPosition(editor.element.screenPositionForPixelPosition({
top: 100,
left: 30
}))
t1 = window.performance.now()
data.push({
name: 'Clicking the editor after opening a large single-line file',
x: sizeInKB,
duration: t1 - t0
})
t0 = window.performance.now()
editor.element.setScrollTop(editor.element.getScrollTop() + 100)
t1 = window.performance.now()
data.push({
name: 'Scrolling down after opening a large single-line file',
x: sizeInKB,
duration: t1 - t0
})
editor.destroy()
buffer.destroy()
await timeout(10000)
}
workspaceElement.remove()
return data
}
function timeout (duration) {
return new Promise((resolve) => setTimeout(resolve, duration))
}

View File

@@ -1 +0,0 @@
cache = ~/.atom/.npm

View File

@@ -1,324 +0,0 @@
fs = require 'fs'
path = require 'path'
os = require 'os'
glob = require 'glob'
usesBabel = require './lib/uses-babel'
babelOptions = require '../static/babelrc'
# Add support for obselete APIs of vm module so we can make some third-party
# modules work under node v0.11.x.
require 'vm-compatibility-layer'
_ = require 'underscore-plus'
packageJson = require '../package.json'
module.exports = (grunt) ->
require('time-grunt')(grunt)
grunt.loadNpmTasks('grunt-babel')
grunt.loadNpmTasks('grunt-coffeelint')
grunt.loadNpmTasks('grunt-lesslint')
grunt.loadNpmTasks('grunt-standard')
grunt.loadNpmTasks('grunt-cson')
grunt.loadNpmTasks('grunt-contrib-csslint')
grunt.loadNpmTasks('grunt-contrib-coffee')
grunt.loadNpmTasks('grunt-contrib-less')
grunt.loadNpmTasks('grunt-shell')
grunt.loadNpmTasks('grunt-download-electron')
grunt.loadNpmTasks('grunt-electron-installer')
grunt.loadNpmTasks('grunt-peg')
grunt.loadTasks('tasks')
# This allows all subsequent paths to the relative to the root of the repo
grunt.file.setBase(path.resolve('..'))
# Options
[defaultChannel, releaseBranch] = getDefaultChannelAndReleaseBranch(packageJson.version)
installDir = grunt.option('install-dir')
buildDir = path.resolve(grunt.option('build-dir') ? 'out')
channel = grunt.option('channel') ? defaultChannel
metadata = packageJson
appName = packageJson.productName
appFileName = packageJson.name
apmFileName = 'apm'
if channel is 'beta'
appName += ' Beta'
appFileName += '-beta'
apmFileName += '-beta'
appName += '.app' if process.platform is 'darwin'
shellAppDir = path.join(buildDir, appName)
symbolsDir = path.join(buildDir, 'Atom.breakpad.syms')
if process.platform is 'win32'
homeDir = process.env.USERPROFILE
contentsDir = shellAppDir
appDir = path.join(shellAppDir, 'resources', 'app')
installDir ?= path.join(process.env.LOCALAPPDATA, appName, 'app-dev')
killCommand = 'taskkill /F /IM atom.exe'
else if process.platform is 'darwin'
homeDir = process.env.HOME
contentsDir = path.join(shellAppDir, 'Contents')
appDir = path.join(contentsDir, 'Resources', 'app')
installDir ?= path.join('/Applications', appName)
killCommand = 'pkill -9 Atom'
else
homeDir = process.env.HOME
contentsDir = shellAppDir
appDir = path.join(shellAppDir, 'resources', 'app')
installDir ?= process.env.INSTALL_PREFIX ? '/usr/local'
killCommand ='pkill -9 atom'
installDir = path.resolve(installDir)
electronDownloadDir = path.join(homeDir, '.atom', 'electron')
coffeeConfig =
glob_to_multiple:
expand: true
src: [
'src/**/*.coffee'
'spec/*.coffee'
'!spec/*-spec.coffee'
'exports/**/*.coffee'
'static/**/*.coffee'
]
dest: appDir
ext: '.js'
babelConfig =
options: babelOptions
dist:
files: []
lessConfig =
options:
paths: [
'static/variables'
'static'
]
glob_to_multiple:
expand: true
src: [
'static/**/*.less'
]
dest: appDir
ext: '.css'
prebuildLessConfig =
options:
cachePath: path.join(homeDir, '.atom', 'compile-cache', 'prebuild-less', require('less-cache/package.json').version)
src: [
'static/**/*.less'
]
csonConfig =
options:
rootObject: true
cachePath: path.join(homeDir, '.atom', 'compile-cache', 'grunt-cson')
glob_to_multiple:
expand: true
src: [
'menus/*.cson'
'keymaps/*.cson'
'static/**/*.cson'
]
dest: appDir
ext: '.json'
pegConfig =
glob_to_multiple:
expand: true
src: ['src/**/*.pegjs']
dest: appDir
ext: '.js'
for jsFile in glob.sync("src/**/*.js")
if usesBabel(jsFile)
babelConfig.dist.files.push({
src: [jsFile]
dest: path.join(appDir, jsFile)
})
for child in fs.readdirSync('node_modules') when child isnt '.bin'
directory = path.join('node_modules', child)
metadataPath = path.join(directory, 'package.json')
continue unless grunt.file.isFile(metadataPath)
{engines, theme} = grunt.file.readJSON(metadataPath)
if engines?.atom?
coffeeConfig.glob_to_multiple.src.push("#{directory}/**/*.coffee")
coffeeConfig.glob_to_multiple.src.push("!#{directory}/spec/**/*.coffee")
lessConfig.glob_to_multiple.src.push("#{directory}/**/*.less")
lessConfig.glob_to_multiple.src.push("!#{directory}/spec/**/*.less")
unless theme
prebuildLessConfig.src.push("#{directory}/**/*.less")
prebuildLessConfig.src.push("!#{directory}/spec/**/*.less")
csonConfig.glob_to_multiple.src.push("#{directory}/**/*.cson")
csonConfig.glob_to_multiple.src.push("!#{directory}/spec/**/*.cson")
pegConfig.glob_to_multiple.src.push("#{directory}/lib/*.pegjs")
for jsFile in glob.sync("#{directory}/lib/**/*.js")
if usesBabel(jsFile)
babelConfig.dist.files.push({
src: [jsFile]
dest: path.join(appDir, jsFile)
})
windowsInstallerConfig =
grunt.initConfig
pkg: grunt.file.readJSON('package.json')
atom: {
appName, channel, metadata, releaseBranch,
appFileName, apmFileName,
appDir, buildDir, contentsDir, installDir, shellAppDir, symbolsDir,
}
docsOutputDir: 'docs/output'
babel: babelConfig
coffee: coffeeConfig
less: lessConfig
'prebuild-less': prebuildLessConfig
cson: csonConfig
peg: pegConfig
coffeelint:
options:
configFile: 'coffeelint.json'
src: [
'dot-atom/**/*.coffee'
'exports/**/*.coffee'
'src/**/*.coffee'
]
build: [
'build/tasks/**/*.coffee'
'build/Gruntfile.coffee'
]
test: [
'spec/*.coffee'
]
standard:
src: [
'src/**/*.js'
'static/*.js'
]
csslint:
options:
'adjoining-classes': false
'duplicate-background-images': false
'box-model': false
'box-sizing': false
'bulletproof-font-face': false
'compatible-vendor-prefixes': false
'display-property-grouping': false
'fallback-colors': false
'font-sizes': false
'gradients': false
'ids': false
'important': false
'known-properties': false
'outline-none': false
'overqualified-elements': false
'qualified-headings': false
'unique-headings': false
'universal-selector': false
'vendor-prefix': false
src: [
'static/**/*.css'
]
lesslint:
src: [
'static/**/*.less'
]
'download-electron':
version: packageJson.electronVersion
outputDir: 'electron'
downloadDir: electronDownloadDir
rebuild: true # rebuild native modules after electron is updated
token: process.env.ATOM_ACCESS_TOKEN ? 'da809a6077bb1b0aa7c5623f7b2d5f1fec2faae4'
'create-windows-installer':
installer:
appDirectory: shellAppDir
outputDirectory: path.join(buildDir, 'installer')
authors: 'GitHub Inc.'
loadingGif: path.resolve(__dirname, '..', 'resources', 'win', 'loading.gif')
iconUrl: "https://raw.githubusercontent.com/atom/atom/master/resources/app-icons/#{channel}/atom.ico"
setupIcon: path.resolve(__dirname, '..', 'resources', 'app-icons', channel, 'atom.ico')
remoteReleases: "https://atom.io/api/updates?version=#{metadata.version}"
shell:
'kill-atom':
command: killCommand
options:
stdout: false
stderr: false
failOnError: false
grunt.registerTask('compile', ['babel', 'coffee', 'prebuild-less', 'cson', 'peg'])
grunt.registerTask('lint', ['standard', 'coffeelint', 'csslint', 'lesslint'])
grunt.registerTask('test', ['shell:kill-atom', 'run-specs'])
ciTasks = []
ciTasks.push('output-disk-space') unless process.env.CI
ciTasks.push('download-electron')
ciTasks.push('download-electron-chromedriver')
ciTasks.push('build')
ciTasks.push('fingerprint')
ciTasks.push('dump-symbols') if process.platform is 'darwin'
ciTasks.push('set-version', 'check-licenses', 'lint', 'generate-asar')
ciTasks.push('mkdeb') if process.platform is 'linux'
ciTasks.push('mktar') if process.platform is 'linux'
ciTasks.push('test') if process.platform is 'darwin'
ciTasks.push('codesign:app') if process.platform is 'darwin' and not process.env.CI
if process.platform is 'win32'
ciTasks.push('codesign:exe') if process.env.JANKY_SIGNTOOL
ciTasks.push('codesign:installer-deferred') if not process.env.JANKY_SIGNTOOL
ciTasks.push('create-windows-installer:installer')
ciTasks.push('codesign:installer') if process.env.JANKY_SIGNTOOL
ciTasks.push('codesign:cleanup')
ciTasks.push('publish-build') unless process.env.CI
grunt.registerTask('ci', ciTasks)
defaultTasks = ['download-electron', 'download-electron-chromedriver', 'build', 'set-version', 'generate-asar']
unless process.platform is 'linux' or grunt.option('no-install')
defaultTasks.push 'install'
grunt.registerTask('default', defaultTasks)
grunt.registerTask('build-and-sign', ['download-electron', 'download-electron-chromedriver', 'build', 'set-version', 'generate-asar', 'codesign:app', 'install'])
getDefaultChannelAndReleaseBranch = (version) ->
if version.match(/dev/) or isBuildingPR()
channel = 'dev'
releaseBranch = null
else
if version.match(/beta/)
channel = 'beta'
else
channel = 'stable'
minorVersion = version.match(/^\d\.\d/)[0]
releaseBranch = "#{minorVersion}-releases"
[channel, releaseBranch]
isBuildingPR = ->
process.env.APPVEYOR_PULL_REQUEST_NUMBER? or process.env.TRAVIS_PULL_REQUEST?

View File

@@ -1,10 +0,0 @@
# Atom Build
This folder contains the grunt configuration and tasks to build Atom.
It was moved from the root of the repository so that any native modules used
would be compiled against node's v8 headers since anything stored in
`node_modules` at the root of the repo is compiled against atom's v8 headers.
New build dependencies should be added to the `package.json` file located in
this folder.

Binary file not shown.

View File

@@ -1,50 +0,0 @@
# VERSION: 0.1
# DESCRIPTION: Create the atom editor in a container
# AUTHOR: Jessica Frazelle <jessie@docker.com>
# COMMENTS:
# This file describes how to build the atom editor
# in a container with all dependencies installed.
# Tested on Debian Jessie.
# USAGE:
# # Download atom Dockerfile
# wget https://raw.githubusercontent.com/atom/atom/master/Dockerfile
#
# # Build atom image
# docker build -t atom .
#
# docker run -v /tmp/.X11-unix:/tmp/.X11-unix \
# -e DISPLAY=unix$DISPLAY atom
#
DOCKER-VERSION 1.3
# Base docker image
FROM debian:jessie
MAINTAINER Jessica Frazelle <jessie@docker.com>
# Install dependencies
RUN apt-get update && apt-get install -y \
build-essential \
ca-certificates \
curl \
git \
libasound2 \
libgconf-2-4 \
libgnome-keyring-dev \
libgtk2.0-0 \
libnss3 \
libxtst6 \
--no-install-recommends
# install node
RUN curl -sL https://deb.nodesource.com/setup | bash -
RUN apt-get install -y nodejs
# clone atom
RUN git clone https://github.com/atom/atom /src
WORKDIR /src
RUN git fetch && git checkout $(git describe --tags `git rev-list --tags --max-count=1`)
RUN script/build && script/grunt install
# Autorun atom
CMD /usr/local/bin/atom --foreground --log-file /var/log/atom.log && tail -f /var/log/atom.log

View File

@@ -1,19 +0,0 @@
fs = require 'fs'
BABEL_PREFIXES = [
"'use babel'"
'"use babel"'
'/** @babel */'
'/* @flow */'
]
PREFIX_LENGTH = Math.max(BABEL_PREFIXES.map((prefix) -> prefix.length)...)
buffer = Buffer(PREFIX_LENGTH)
module.exports = (filename) ->
file = fs.openSync(filename, 'r')
fs.readSync(file, buffer, 0, PREFIX_LENGTH)
fs.closeSync(file)
BABEL_PREFIXES.some (prefix) ->
prefix is buffer.toString('utf8', 0, prefix.length)

View File

@@ -1,49 +0,0 @@
{
"name": "atom-build",
"description": "Atom build",
"repository": {
"type": "git",
"url": "https://github.com/atom/atom.git"
},
"dependencies": {
"asar": "^0.8.0",
"async": "~0.2.9",
"aws-sdk": "^2.2.18",
"babel-eslint": "^5.0.0-beta6",
"donna": "^1.0.13",
"escope": "~3.3.0",
"formidable": "~1.0.14",
"fs-plus": "2.x",
"github-releases": "~0.3.1",
"glob": "^5.0.14",
"grunt": "~0.4.1",
"grunt-babel": "^5.0.1",
"grunt-cli": "~0.1.9",
"grunt-coffeelint": "git+https://github.com/atom/grunt-coffeelint.git#cfb99aa99811d52687969532bd5a98011ed95bfe",
"grunt-contrib-coffee": "~0.12.0",
"grunt-contrib-csslint": "~0.2.0",
"grunt-contrib-less": "~0.8.0",
"grunt-cson": "0.16.0",
"grunt-download-electron": "^2.1.1",
"grunt-electron-installer": "1.2.2",
"grunt-lesslint": "0.17.0",
"grunt-peg": "~1.1.0",
"grunt-shell": "~0.3.1",
"grunt-standard": "^2.0.0",
"legal-eagle": "~0.13.0",
"minidump": "~0.9",
"npm": "2.13.3",
"rcedit": "~0.3.0",
"request": "~2.27.0",
"rimraf": "~2.2.2",
"runas": "^3.1",
"standard": "^5.4.1",
"tello": "1.0.5",
"temp": "~0.8.1",
"time-grunt": "1.2.2",
"underscore-plus": "1.x",
"unzip": "~0.1.9",
"vm-compatibility-layer": "~0.1.0",
"webdriverio": "^2.4.5"
}
}

View File

@@ -1,197 +0,0 @@
fs = require 'fs'
path = require 'path'
_ = require 'underscore-plus'
module.exports = (grunt) ->
{cp, isAtomPackage, mkdir, rm} = require('./task-helpers')(grunt)
grunt.registerTask 'build', 'Build the application', ->
shellAppDir = grunt.config.get('atom.shellAppDir')
buildDir = grunt.config.get('atom.buildDir')
appDir = grunt.config.get('atom.appDir')
rm shellAppDir
rm path.join(buildDir, 'installer')
mkdir path.dirname(buildDir)
if process.platform is 'darwin'
cp 'electron/Electron.app', shellAppDir, filter: /default_app/
fs.renameSync path.join(shellAppDir, 'Contents', 'MacOS', 'Electron'), path.join(shellAppDir, 'Contents', 'MacOS', 'Atom')
fs.renameSync path.join(shellAppDir, 'Contents', 'Frameworks', 'Electron Helper.app'), path.join(shellAppDir, 'Contents', 'Frameworks', 'Atom Helper.app')
fs.renameSync path.join(shellAppDir, 'Contents', 'Frameworks', 'Atom Helper.app', 'Contents', 'MacOS', 'Electron Helper'), path.join(shellAppDir, 'Contents', 'Frameworks', 'Atom Helper.app', 'Contents', 'MacOS', 'Atom Helper')
else
cp 'electron', shellAppDir, filter: /default_app/
if process.platform is 'win32'
fs.renameSync path.join(shellAppDir, 'electron.exe'), path.join(shellAppDir, 'atom.exe')
else
fs.renameSync path.join(shellAppDir, 'electron'), path.join(shellAppDir, 'atom')
mkdir appDir
if process.platform isnt 'win32'
cp 'atom.sh', path.resolve(appDir, '..', 'new-app', 'atom.sh')
cp 'package.json', path.join(appDir, 'package.json')
packageNames = []
packageDirectories = []
nonPackageDirectories = [
'dot-atom'
'vendor'
]
{devDependencies} = grunt.file.readJSON('package.json')
for child in fs.readdirSync('node_modules')
directory = path.join('node_modules', child)
if isAtomPackage(directory)
packageDirectories.push(directory)
packageNames.push(child)
else
nonPackageDirectories.push(directory)
# Put any paths here that shouldn't end up in the built Atom.app
# so that it doesn't becomes larger than it needs to be.
ignoredPaths = [
path.join('git-utils', 'deps')
path.join('ohnogit', 'node_modules', 'nodegit', 'vendor')
path.join('ohnogit', 'node_modules', 'nodegit', 'node_modules', 'node-pre-gyp')
path.join('ohnogit', 'node_modules', 'nodegit', 'node_modules', '.bin')
path.join('oniguruma', 'deps')
path.join('less', 'dist')
path.join('bootstrap', 'docs')
path.join('bootstrap', 'dist')
path.join('bootstrap', 'fonts')
path.join('bootstrap', '_config.yml')
path.join('bootstrap', '_includes')
path.join('bootstrap', '_layouts')
path.join('npm', 'doc')
path.join('npm', 'html')
path.join('npm', 'man')
path.join('npm', 'node_modules', '.bin', 'beep')
path.join('npm', 'node_modules', '.bin', 'clear')
path.join('npm', 'node_modules', '.bin', 'starwars')
path.join('pegjs', 'examples')
path.join('get-parameter-names', 'node_modules', 'testla')
path.join('get-parameter-names', 'node_modules', '.bin', 'testla')
path.join('jasmine-reporters', 'ext')
path.join('jasmine-node', 'node_modules', 'gaze')
path.join('jasmine-node', 'spec')
path.join('node_modules', 'nan')
path.join('node_modules', 'native-mate')
path.join('build', 'binding.Makefile')
path.join('build', 'config.gypi')
path.join('build', 'gyp-mac-tool')
path.join('build', 'Makefile')
path.join('build', 'Release', 'obj.target')
path.join('build', 'Release', 'obj')
path.join('build', 'Release', '.deps')
path.join('vendor', 'apm')
# These are only require in dev mode when the grammar isn't precompiled
path.join('snippets', 'node_modules', 'loophole')
path.join('snippets', 'node_modules', 'pegjs')
path.join('snippets', 'node_modules', '.bin', 'pegjs')
'.DS_Store'
'.jshintrc'
'.npmignore'
'.pairs'
'.travis.yml'
'appveyor.yml'
'.idea'
'.editorconfig'
'.lint'
'.lintignore'
'.eslintrc'
'.jshintignore'
'coffeelint.json'
'.coffeelintignore'
'.gitattributes'
'.gitkeep'
]
packageNames.forEach (packageName) -> ignoredPaths.push(path.join(packageName, 'spec'))
ignoredPaths = ignoredPaths.map (ignoredPath) -> _.escapeRegExp(ignoredPath)
# Add .* to avoid matching hunspell_dictionaries.
ignoredPaths.push "#{_.escapeRegExp(path.join('spellchecker', 'vendor', 'hunspell') + path.sep)}.*"
ignoredPaths.push "#{_.escapeRegExp(path.join('build', 'Release') + path.sep)}.*\\.pdb"
# Ignore *.cc and *.h files from native modules
ignoredPaths.push "#{_.escapeRegExp(path.join('ctags', 'src') + path.sep)}.*\\.(cc|h)*"
ignoredPaths.push "#{_.escapeRegExp(path.join('git-utils', 'src') + path.sep)}.*\\.(cc|h)*"
ignoredPaths.push "#{_.escapeRegExp(path.join('ohnogit', 'node_modules', 'nodegit', 'src') + path.sep)}.*\\.(cc|h)?"
ignoredPaths.push "#{_.escapeRegExp(path.join('ohnogit', 'node_modules', 'nodegit', 'generate') + path.sep)}.*\\.(cc|h)?"
ignoredPaths.push "#{_.escapeRegExp(path.join('ohnogit', 'node_modules', 'nodegit', 'include') + path.sep)}.*\\.(cc|h)?"
ignoredPaths.push "#{_.escapeRegExp(path.join('keytar', 'src') + path.sep)}.*\\.(cc|h)*"
ignoredPaths.push "#{_.escapeRegExp(path.join('nslog', 'src') + path.sep)}.*\\.(cc|h)*"
ignoredPaths.push "#{_.escapeRegExp(path.join('oniguruma', 'src') + path.sep)}.*\\.(cc|h)*"
ignoredPaths.push "#{_.escapeRegExp(path.join('pathwatcher', 'src') + path.sep)}.*\\.(cc|h)*"
ignoredPaths.push "#{_.escapeRegExp(path.join('runas', 'src') + path.sep)}.*\\.(cc|h)*"
ignoredPaths.push "#{_.escapeRegExp(path.join('scrollbar-style', 'src') + path.sep)}.*\\.(cc|h)*"
ignoredPaths.push "#{_.escapeRegExp(path.join('spellchecker', 'src') + path.sep)}.*\\.(cc|h)*"
ignoredPaths.push "#{_.escapeRegExp(path.join('cached-run-in-this-context', 'src') + path.sep)}.*\\.(cc|h)?"
ignoredPaths.push "#{_.escapeRegExp(path.join('keyboard-layout', 'src') + path.sep)}.*\\.(cc|h|mm)*"
# Ignore build files
ignoredPaths.push "#{_.escapeRegExp(path.sep)}binding\\.gyp$"
ignoredPaths.push "#{_.escapeRegExp(path.sep)}.+\\.target.mk$"
ignoredPaths.push "#{_.escapeRegExp(path.sep)}linker\\.lock$"
ignoredPaths.push "#{_.escapeRegExp(path.join('build', 'Release') + path.sep)}.+\\.node\\.dSYM"
# Hunspell dictionaries are only not needed on OS X.
if process.platform is 'darwin'
ignoredPaths.push path.join('spellchecker', 'vendor', 'hunspell_dictionaries')
ignoredPaths = ignoredPaths.map (ignoredPath) -> "(#{ignoredPath})"
testFolderPattern = new RegExp("#{_.escapeRegExp(path.sep)}_*te?sts?_*#{_.escapeRegExp(path.sep)}")
exampleFolderPattern = new RegExp("#{_.escapeRegExp(path.sep)}examples?#{_.escapeRegExp(path.sep)}")
nodeModulesFilter = new RegExp(ignoredPaths.join('|'))
filterNodeModule = (pathToCopy) ->
pathToCopy = path.resolve(pathToCopy)
nodeModulesFilter.test(pathToCopy) or testFolderPattern.test(pathToCopy) or exampleFolderPattern.test(pathToCopy)
packageFilter = new RegExp("(#{ignoredPaths.join('|')})|(.+\\.(cson|coffee)$)")
filterPackage = (pathToCopy) ->
pathToCopy = path.resolve(pathToCopy)
packageFilter.test(pathToCopy) or testFolderPattern.test(pathToCopy) or exampleFolderPattern.test(pathToCopy)
for directory in nonPackageDirectories
cp directory, path.join(appDir, directory), filter: filterNodeModule
for directory in packageDirectories
cp directory, path.join(appDir, directory), filter: filterPackage
cp 'src', path.join(appDir, 'src'), filter: /.+\.(cson|coffee)$/
cp 'static', path.join(appDir, 'static')
cp path.join('apm', 'node_modules', 'atom-package-manager'), path.resolve(appDir, '..', 'new-app', 'apm'), filter: filterNodeModule
if process.platform isnt 'win32'
fs.symlinkSync(path.join('..', '..', 'bin', 'apm'), path.resolve(appDir, '..', 'new-app', 'apm', 'node_modules', '.bin', 'apm'))
channel = grunt.config.get('atom.channel')
cp path.join('resources', 'app-icons', channel, 'png', '1024.png'), path.join(appDir, 'resources', 'atom.png')
if process.platform is 'darwin'
cp path.join('resources', 'app-icons', channel, 'atom.icns'), path.resolve(appDir, '..', 'atom.icns')
cp path.join('resources', 'mac', 'file.icns'), path.resolve(appDir, '..', 'file.icns')
cp path.join('resources', 'mac', 'speakeasy.pem'), path.resolve(appDir, '..', 'speakeasy.pem')
if process.platform is 'win32'
cp path.join('resources', 'win', 'atom.cmd'), path.join(shellAppDir, 'resources', 'cli', 'atom.cmd')
cp path.join('resources', 'win', 'atom.sh'), path.join(shellAppDir, 'resources', 'cli', 'atom.sh')
cp path.join('resources', 'win', 'atom.js'), path.join(shellAppDir, 'resources', 'cli', 'atom.js')
cp path.join('resources', 'win', 'apm.cmd'), path.join(shellAppDir, 'resources', 'cli', 'apm.cmd')
cp path.join('resources', 'win', 'apm.sh'), path.join(shellAppDir, 'resources', 'cli', 'apm.sh')
if process.platform is 'linux'
cp path.join('resources', 'app-icons', channel, 'png'), path.join(buildDir, 'icons')
dependencies = ['compile', 'generate-license:save', 'generate-module-cache', 'compile-packages-slug']
dependencies.push('copy-info-plist') if process.platform is 'darwin'
dependencies.push('set-exe-icon') if process.platform is 'win32'
grunt.task.run(dependencies...)

View File

@@ -1,27 +0,0 @@
module.exports = (grunt) ->
grunt.registerTask 'check-licenses', 'Report the licenses of all dependencies', ->
legalEagle = require 'legal-eagle'
{size, keys} = require 'underscore-plus'
done = @async()
options =
path: process.cwd()
omitPermissive: true
overrides: require './license-overrides'
legalEagle options, (err, summary) ->
if err?
console.error(err)
process.exit 1
for key of summary
delete summary[key] if key.match /^atom@/
if size(summary)
console.error "Found dependencies without permissive licenses:"
for name in keys(summary).sort()
console.error "#{name}"
console.error " License: #{summary[name].license}"
console.error " Repository: #{summary[name].repository}"
process.exit 1
done()

View File

@@ -1,22 +0,0 @@
path = require 'path'
os = require 'os'
module.exports = (grunt) ->
{rm} = require('./task-helpers')(grunt)
grunt.registerTask 'partial-clean', 'Delete some of the build files', ->
tmpdir = os.tmpdir()
rm grunt.config.get('atom.buildDir')
rm require('../src/coffee-cache').cacheDir
rm require('../src/less-compile-cache').cacheDir
rm path.join(tmpdir, 'atom-cached-atom-shells')
rm 'atom-shell'
rm 'electron'
grunt.registerTask 'clean', 'Delete all the build files', ->
homeDir = process.env[if process.platform is 'win32' then 'USERPROFILE' else 'HOME']
rm 'node_modules'
rm path.join(homeDir, '.atom', '.node-gyp')
grunt.task.run('partial-clean')

View File

@@ -1,89 +0,0 @@
path = require 'path'
fs = require 'fs'
request = require 'request'
module.exports = (grunt) ->
{spawn} = require('./task-helpers')(grunt)
# Mac OS X code signing
grunt.registerTask 'codesign:app', 'CodeSign Atom.app', ->
done = @async()
unlockKeychain (error) ->
return done(error) if error?
args = ['--deep', '--force', '--verbose', '--sign', 'Developer ID Application: GitHub', grunt.config.get('atom.shellAppDir')]
spawn {cmd: 'codesign', args: args}, (error) -> done(error)
unlockKeychain = (callback) ->
return callback() unless process.env.XCODE_KEYCHAIN
{XCODE_KEYCHAIN_PASSWORD, XCODE_KEYCHAIN} = process.env
args = ['unlock-keychain', '-p', XCODE_KEYCHAIN_PASSWORD, XCODE_KEYCHAIN]
spawn {cmd: 'security', args: args}, (error) -> callback(error)
# Windows code signing
grunt.registerTask 'codesign:exe', 'CodeSign Windows binaries', ->
done = @async()
atomExePath = path.join(grunt.config.get('atom.shellAppDir'), 'atom.exe')
signWindowsExecutable atomExePath, (error) ->
return done(error) if error?
updateExePath = path.resolve(__dirname, '..', 'node_modules', 'grunt-electron-installer', 'vendor', 'Update.exe')
signWindowsExecutable updateExePath, (error) -> done(error)
grunt.registerTask 'codesign:installer', 'CodeSign Windows installer (AtomSetup.exe)', ->
done = @async()
atomSetupExePath = path.resolve(grunt.config.get('atom.buildDir'), 'installer', 'AtomSetup.exe')
signWindowsExecutable atomSetupExePath, (error) -> done(error)
grunt.registerTask 'codesign:installer-deferred', 'Obtain cert and configure installer to perform CodeSign', ->
done = @async()
getCertificate (file, password) ->
grunt.config('create-windows-installer.installer.certificateFile', file)
grunt.config('create-windows-installer.installer.certificatePassword', password)
grunt.log.ok('Certificate ready for create-windows-installer task')
done()
grunt.registerTask 'codesign:cleanup', 'Clean up any temporary or downloaded files used for CodeSign', ->
try fs.unlinkSync(downloadedCertificateFile) catch e then return
downloadedCertificateFile = path.resolve(__dirname, 'DownloadedCertFile.p12')
signWindowsExecutable = (exeToSign, callback) ->
if process.env.JANKY_SIGNTOOL
signUsingJanky exeToSign, callback
else
signUsingWindowsSDK exeToSign, callback
signUsingJanky = (exeToSign, callback) ->
grunt.log.ok("Signing #{exeToSign} using Janky SignTool")
spawn {cmd: process.env.JANKY_SIGNTOOL, args: [exeToSign]}, callback
signUsingWindowsSDK = (exeToSign, callback) ->
getCertificate (file, password) ->
signUsingWindowsSDKTool exeToSign, file, password, callback
signUsingWindowsSDKTool = (exeToSign, certificateFile, certificatePassword, callback) ->
grunt.log.ok("Signing '#{exeToSign}' using Windows SDK")
args = ['sign', '/v', '/p', certificatePassword, '/f', certificateFile, exeToSign]
spawn {cmd: 'C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v7.1A\\bin\\signtool.exe', args: args}, callback
getCertificate = (callback) ->
if process.env.WIN_P12KEY_URL?
grunt.log.ok("Obtaining certificate file")
downloadFile process.env.WIN_P12KEY_URL, downloadedCertificateFile, (done) ->
callback(downloadedCertificateFile, process.env.WIN_P12KEY_PASSWORD ? 'password')
else
callback(path.resolve(__dirname, '..', 'certs', 'AtomDevTestSignKey.p12'), process.env.WIN_P12KEY_PASSWORD ? 'password')
downloadFile = (sourceUrl, targetPath, callback) ->
options = {
url: sourceUrl
headers: {
'User-Agent': 'Atom Signing Key build task',
'Accept': 'application/vnd.github.VERSION.raw'
}
}
request(options)
.pipe(fs.createWriteStream(targetPath))
.on('finish', callback)

View File

@@ -1,98 +0,0 @@
path = require 'path'
CSON = require 'season'
fs = require 'fs-plus'
_ = require 'underscore-plus'
normalizePackageData = require 'normalize-package-data'
semver = require 'semver'
OtherPlatforms = ['darwin', 'freebsd', 'linux', 'sunos', 'win32'].filter (platform) -> platform isnt process.platform
module.exports = (grunt) ->
{spawn, rm} = require('./task-helpers')(grunt)
getMenu = (appDir) ->
menusPath = path.join(appDir, 'menus')
menuPath = path.join(menusPath, "#{process.platform}.json")
menu = CSON.readFileSync(menuPath) if fs.isFileSync(menuPath)
rm menusPath
menu
getKeymaps = (appDir) ->
keymapsPath = path.join(appDir, 'keymaps')
keymaps = {}
for keymapPath in fs.listSync(keymapsPath, ['.json'])
name = path.basename(keymapPath, path.extname(keymapPath))
continue unless OtherPlatforms.indexOf(name) is -1
keymap = CSON.readFileSync(keymapPath)
keymaps[path.basename(keymapPath)] = keymap
rm keymapsPath
keymaps
grunt.registerTask 'compile-packages-slug', 'Add bundled package metadata information to the main package.json file', ->
appDir = fs.realpathSync(grunt.config.get('atom.appDir'))
modulesDirectory = path.join(appDir, 'node_modules')
packages = {}
invalidPackages = false
for moduleDirectory in fs.listSync(modulesDirectory)
continue if path.basename(moduleDirectory) is '.bin'
metadataPath = path.join(moduleDirectory, 'package.json')
metadata = grunt.file.readJSON(metadataPath)
continue unless metadata?.engines?.atom?
reportPackageError = (msg) ->
invalidPackages = true
grunt.log.error("#{metadata.name}: #{msg}")
normalizePackageData metadata, reportPackageError, true
if metadata.repository?.type is 'git'
metadata.repository.url = metadata.repository.url?.replace(/^git\+/, '')
moduleCache = metadata._atomModuleCache ? {}
rm metadataPath
_.remove(moduleCache.extensions?['.json'] ? [], 'package.json')
for property in ['_from', '_id', 'dist', 'readme', 'readmeFilename']
delete metadata[property]
pack = {metadata, keymaps: {}, menus: {}}
if metadata.main
mainPath = require.resolve(path.resolve(moduleDirectory, metadata.main))
pack.main = path.relative(appDir, mainPath)
keymapsPath = path.join(moduleDirectory, 'keymaps')
for keymapPath in fs.listSync(keymapsPath, ['.cson', '.json'])
relativePath = path.relative(appDir, keymapPath)
pack.keymaps[relativePath] = CSON.readFileSync(keymapPath)
rm keymapPath
rm keymapsPath if fs.listSync(keymapsPath).length is 0
menusPath = path.join(moduleDirectory, 'menus')
for menuPath in fs.listSync(menusPath, ['.cson', '.json'])
relativePath = path.relative(appDir, menuPath)
pack.menus[relativePath] = CSON.readFileSync(menuPath)
rm menuPath
rm menusPath if fs.listSync(menusPath).length is 0
packages[metadata.name] = pack
for extension, paths of moduleCache.extensions
delete moduleCache.extensions[extension] if paths.length is 0
metadata = grunt.file.readJSON(path.join(appDir, 'package.json'))
metadata._atomPackages = packages
metadata._atomMenu = getMenu(appDir)
metadata._atomKeymaps = getKeymaps(appDir)
metadata._deprecatedPackages = require('../deprecated-packages')
for name, {version} of metadata._deprecatedPackages
if version and not semver.validRange(version)
invalidPackages = true
grunt.log.error("Invalid range: #{version} (#{name})")
grunt.file.write(path.join(appDir, 'package.json'), JSON.stringify(metadata))
not invalidPackages

View File

@@ -1,13 +0,0 @@
path = require 'path'
module.exports = (grunt) ->
{cp} = require('./task-helpers')(grunt)
grunt.registerTask 'copy-info-plist', 'Copy plist', ->
contentsDir = grunt.config.get('atom.contentsDir')
plistPath = path.join(contentsDir, 'Info.plist')
helperPlistPath = path.join(contentsDir, 'Frameworks/Atom Helper.app/Contents/Info.plist')
# Copy custom plist files
cp 'resources/mac/atom-Info.plist', plistPath
cp 'resources/mac/helper-Info.plist', helperPlistPath

View File

@@ -1,40 +0,0 @@
path = require 'path'
fs = require 'fs-plus'
_ = require 'underscore-plus'
donna = require 'donna'
tello = require 'tello'
module.exports = (grunt) ->
getClassesToInclude = ->
modulesPath = path.resolve(__dirname, '..', '..', 'node_modules')
classes = {}
fs.traverseTreeSync modulesPath, (modulePath) ->
return false if modulePath.match(/node_modules/g).length > 1 # dont need the dependencies of the dependencies
return true unless path.basename(modulePath) is 'package.json'
return true unless fs.isFileSync(modulePath)
apiPath = path.join(path.dirname(modulePath), 'api.json')
if fs.isFileSync(apiPath)
_.extend(classes, grunt.file.readJSON(apiPath).classes)
true
classes
sortClasses = (classes) ->
sortedClasses = {}
for className in Object.keys(classes).sort()
sortedClasses[className] = classes[className]
sortedClasses
grunt.registerTask 'build-docs', 'Builds the API docs in src', ->
docsOutputDir = grunt.config.get('docsOutputDir')
metadata = donna.generateMetadata(['.'])
api = tello.digest(metadata)
_.extend(api.classes, getClassesToInclude())
api.classes = sortClasses(api.classes)
apiJson = JSON.stringify(api, null, 2)
apiJsonPath = path.join(docsOutputDir, 'api.json')
grunt.file.write(apiJsonPath, apiJson)

View File

@@ -1,39 +0,0 @@
async = require 'async'
fs = require 'fs-plus'
path = require 'path'
minidump = require 'minidump'
module.exports = (grunt) ->
{mkdir, rm} = require('./task-helpers')(grunt)
dumpSymbolTo = (binaryPath, targetDirectory, callback) ->
minidump.dumpSymbol binaryPath, (error, content) ->
return callback(error) if error?
moduleLine = /MODULE [^ ]+ [^ ]+ ([0-9A-F]+) (.*)\n/.exec(content)
if moduleLine.length isnt 3
return callback("Invalid output when dumping symbol for #{binaryPath}")
filename = moduleLine[2]
targetPathDirname = path.join(targetDirectory, filename, moduleLine[1])
mkdir targetPathDirname
targetPath = path.join(targetPathDirname, "#{filename}.sym")
fs.writeFile(targetPath, content, callback)
grunt.registerTask 'dump-symbols', 'Dump symbols for native modules', ->
done = @async()
symbolsDir = grunt.config.get('atom.symbolsDir')
rm symbolsDir
mkdir symbolsDir
tasks = []
onFile = (binaryPath) ->
if /.*\.node$/.test(binaryPath)
tasks.push(dumpSymbolTo.bind(this, binaryPath, symbolsDir))
onDirectory = ->
true
fs.traverseTreeSync 'node_modules', onFile, onDirectory
async.parallel tasks, done

View File

@@ -1,7 +0,0 @@
var fingerprint = require('../../script/utils/fingerprint')
module.exports = function (grunt) {
grunt.registerTask('fingerprint', 'Fingerpint the node_modules folder for caching on CI', function () {
fingerprint.writeFingerprint()
})
}

View File

@@ -1,37 +0,0 @@
asar = require 'asar'
fs = require 'fs'
path = require 'path'
module.exports = (grunt) ->
{cp, rm} = require('./task-helpers')(grunt)
grunt.registerTask 'generate-asar', 'Generate asar archive for the app', ->
done = @async()
unpack = [
'*.node'
'ctags-config'
'ctags-darwin'
'ctags-linux'
'ctags-win32.exe'
'**/node_modules/spellchecker/**'
'**/resources/atom.png'
]
unpack = "{#{unpack.join(',')}}"
appDir = grunt.config.get('atom.appDir')
unless fs.existsSync(appDir)
grunt.log.error 'The app has to be built before generating asar archive.'
return done(false)
asar.createPackageWithOptions appDir, path.resolve(appDir, '..', 'app.asar'), {unpack}, (err) ->
return done(err) if err?
rm appDir
fs.renameSync path.resolve(appDir, '..', 'new-app'), appDir
ctagsFolder = path.join("#{appDir}.asar.unpacked", 'node_modules', 'symbols-view', 'vendor')
for ctagsFile in fs.readdirSync(ctagsFolder)
fs.chmodSync(path.join(ctagsFolder, ctagsFile), "755")
done()

View File

@@ -1,46 +0,0 @@
fs = require 'fs'
path = require 'path'
module.exports = (grunt) ->
grunt.registerTask 'generate-license', 'Generate the license, including the licenses of all dependencies', (mode) ->
legalEagle = require 'legal-eagle'
done = @async()
options =
path: process.cwd()
overrides: require './license-overrides'
legalEagle options, (err, dependencyLicenses) ->
if err?
console.error(err)
exit 1
licenseText = getLicenseText(dependencyLicenses)
if mode is 'save'
targetPath = path.resolve(grunt.config.get('atom.appDir'), '..', 'LICENSE.md')
fs.writeFileSync(targetPath, licenseText)
else
console.log licenseText
done()
getLicenseText = (dependencyLicenses) ->
{keys} = require 'underscore-plus'
text = """
#{fs.readFileSync('LICENSE.md', 'utf8')}
This application bundles the following third-party packages in accordance
with the following licenses:\n\n
"""
names = keys(dependencyLicenses).sort()
for name in names
{license, source, sourceText} = dependencyLicenses[name]
text += "-------------------------------------------------------------------------\n\n"
text += "Package: #{name}\n"
text += "License: #{license}\n"
text += "License Source: #{source}\n" if source?
if sourceText?
text += "Source Text:\n\n"
text += sourceText
text += '\n'
text

View File

@@ -1,39 +0,0 @@
path = require 'path'
fs = require 'fs-plus'
ModuleCache = require '../../src/module-cache'
module.exports = (grunt) ->
grunt.registerTask 'generate-module-cache', 'Generate a module cache for all core modules and packages', ->
appDir = grunt.config.get('atom.appDir')
{packageDependencies} = grunt.file.readJSON('package.json')
for packageName, version of packageDependencies
ModuleCache.create(path.join(appDir, 'node_modules', packageName))
ModuleCache.create(appDir)
metadata = grunt.file.readJSON(path.join(appDir, 'package.json'))
metadata._atomModuleCache.folders.forEach (folder) ->
if '' in folder.paths
folder.paths = [
''
'exports'
'spec'
'src'
'src/main-process'
'static'
'vendor'
]
# Reactionary does not have an explicit react dependency
metadata._atomModuleCache.folders.push
paths: [
'node_modules/reactionary-atom-fork/lib'
]
dependencies: {
'react-atom-fork': metadata.dependencies['react-atom-fork']
}
grunt.file.write(path.join(appDir, 'package.json'), JSON.stringify(metadata))

View File

@@ -1,73 +0,0 @@
path = require 'path'
fs = require 'fs-plus'
runas = null
temp = require 'temp'
module.exports = (grunt) ->
{cp, fillTemplate, mkdir, rm} = require('./task-helpers')(grunt)
grunt.registerTask 'install', 'Install the built application', ->
appName = grunt.config.get('atom.appName')
appFileName = grunt.config.get('atom.appFileName')
apmFileName = grunt.config.get('atom.apmFileName')
buildDir = grunt.config.get('atom.buildDir')
installDir = grunt.config.get('atom.installDir')
shellAppDir = grunt.config.get('atom.shellAppDir')
{description} = grunt.config.get('atom.metadata')
if process.platform is 'win32'
done = @async()
grunt.log.ok("Installing into \"#{installDir}\" from \"#{shellAppDir}\"")
parentInstallDir = path.resolve(installDir, '..')
adminRequired = false
try
rm installDir
mkdir installDir
catch err
grunt.log.ok("Admin elevation required for write access to \"#{installDir}\"")
adminRequired = true
runas ?= require 'runas'
copyFolder = path.resolve 'script', 'copy-folder.cmd'
if runas('cmd', ['/c', copyFolder, shellAppDir, installDir], admin: adminRequired) isnt 0
grunt.fail.fatal("Unable to copy files.")
else
grunt.log.ok("Completed successfully.")
done()
else if process.platform is 'darwin'
rm installDir
mkdir path.dirname(installDir)
tempFolder = temp.path()
mkdir tempFolder
cp shellAppDir, tempFolder
fs.renameSync(tempFolder, installDir)
else
shareDir = path.join(installDir, 'share', appFileName)
rm shareDir
mkdir path.dirname(shareDir)
cp shellAppDir, shareDir
unless installDir.indexOf(process.env.TMPDIR ? '/tmp') is 0
iconPath = path.join(shareDir, 'resources', 'app.asar.unpacked', 'resources', 'atom.png')
mkdir path.join(installDir, 'share', 'applications')
fillTemplate(
path.join('resources', 'linux', 'atom.desktop.in'),
path.join(installDir, 'share', 'applications', appFileName + '.desktop'),
{appName, appFileName, description, iconPath, installDir}
)
binDir = path.join(installDir, 'bin')
mkdir binDir
cp 'atom.sh', path.join(binDir, appFileName)
rm(path.join(binDir, apmFileName))
fs.symlinkSync(
path.join('..', 'share', appFileName, 'resources', 'app', 'apm', 'node_modules', '.bin', 'apm'),
path.join(binDir, apmFileName)
)
fs.chmodSync(path.join(shareDir, 'atom'), '755')

View File

@@ -1,354 +0,0 @@
module.exports =
'aws-sign@0.3.0':
repository: 'https://github.com/mikeal/aws-sign'
license: 'MIT'
source: 'index.js'
sourceText: """
/*!
* knox - auth
* Copyright(c) 2010 LearnBoost <dev@learnboost.com>
* MIT Licensed
*/
<content omitted>
"""
'bufferjs@2.0.0':
repository: 'https://github.com/coolaj86/node-bufferjs'
license: 'MIT'
source: 'LICENSE.MIT'
sourceText: """
Copyright (c) 2010 AJ ONeal (and Contributors)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
"""
'buffers@0.1.1':
repository: "http://github.com/substack/node-buffers"
license: 'MIT'
source: 'README.markdown'
sourceText: """
<content omitted>
license
=======
MIT/X11
"""
'cheerio@0.15.0':
repository: "https://github.com/cheeriojs/cheerio"
license: 'MIT'
source: 'https://github.com/cheeriojs/cheerio/blob/master/package.json'
'specificity@0.1.3':
repository: 'https://github.com/keeganstreet/specificity'
license: 'MIT'
source: 'package.json in repository'
'promzard@0.2.0':
license: 'ISC'
source: 'LICENSE in the repository'
sourceText: """
The ISC License
Copyright (c) Isaac Z. Schlueter
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
"""
'jschardet@1.1.1':
license: 'LGPL'
source: 'README.md in the repository'
sourceText: """
JsChardet
=========
Port of python's chardet (http://chardet.feedparser.org/).
License
-------
LGPL
"""
'core-js@0.4.10':
license: 'MIT'
source: 'http://rock.mit-license.org linked in source files and bower.json says MIT'
'log-driver@1.2.4':
license: 'ISC'
source: 'LICENSE file in the repository'
sourceText: """
Copyright (c) 2014, Gregg Caines, gregg@caines.ca
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
"""
'shelljs@0.3.0':
license: 'BSD'
source: 'LICENSE file in repository - 3-clause BSD (aka BSD-new)'
sourceText: """
Copyright (c) 2012, Artur Adib <arturadib@gmail.com>
All rights reserved.
You may use this project under the terms of the New BSD license as follows:
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of Artur Adib nor the
names of the contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL ARTUR ADIB BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""
'json-schema@0.2.2':
repository: 'https://github.com/kriszyp/json-schema'
license: 'BSD'
source: 'README links to https://github.com/dojo/dojo/blob/8b6a5e4c42f9cf777dd39eaae8b188e0ebb59a4c/LICENSE'
sourceText: """
Dojo is available under *either* the terms of the modified BSD license *or* the
Academic Free License version 2.1. As a recipient of Dojo, you may choose which
license to receive this code under (except as noted in per-module LICENSE
files). Some modules may not be the copyright of the Dojo Foundation. These
modules contain explicit declarations of copyright in both the LICENSE files in
the directories in which they reside and in the code itself. No external
contributions are allowed under licenses which are fundamentally incompatible
with the AFL or BSD licenses that Dojo is distributed under.
The text of the AFL and BSD licenses is reproduced below.
-------------------------------------------------------------------------------
The "New" BSD License:
**********************
Copyright (c) 2005-2015, The Dojo Foundation
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of the Dojo Foundation nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-------------------------------------------------------------------------------
The Academic Free License, v. 2.1:
**********************************
This Academic Free License (the "License") applies to any original work of
authorship (the "Original Work") whose owner (the "Licensor") has placed the
following notice immediately following the copyright notice for the Original
Work:
Licensed under the Academic Free License version 2.1
1) Grant of Copyright License. Licensor hereby grants You a world-wide,
royalty-free, non-exclusive, perpetual, sublicenseable license to do the
following:
a) to reproduce the Original Work in copies;
b) to prepare derivative works ("Derivative Works") based upon the Original
Work;
c) to distribute copies of the Original Work and Derivative Works to the
public;
d) to perform the Original Work publicly; and
e) to display the Original Work publicly.
2) Grant of Patent License. Licensor hereby grants You a world-wide,
royalty-free, non-exclusive, perpetual, sublicenseable license, under patent
claims owned or controlled by the Licensor that are embodied in the Original
Work as furnished by the Licensor, to make, use, sell and offer for sale the
Original Work and Derivative Works.
3) Grant of Source Code License. The term "Source Code" means the preferred
form of the Original Work for making modifications to it and all available
documentation describing how to modify the Original Work. Licensor hereby
agrees to provide a machine-readable copy of the Source Code of the Original
Work along with each copy of the Original Work that Licensor distributes.
Licensor reserves the right to satisfy this obligation by placing a
machine-readable copy of the Source Code in an information repository
reasonably calculated to permit inexpensive and convenient access by You for as
long as Licensor continues to distribute the Original Work, and by publishing
the address of that information repository in a notice immediately following
the copyright notice that applies to the Original Work.
4) Exclusions From License Grant. Neither the names of Licensor, nor the names
of any contributors to the Original Work, nor any of their trademarks or
service marks, may be used to endorse or promote products derived from this
Original Work without express prior written permission of the Licensor. Nothing
in this License shall be deemed to grant any rights to trademarks, copyrights,
patents, trade secrets or any other intellectual property of Licensor except as
expressly stated herein. No patent license is granted to make, use, sell or
offer to sell embodiments of any patent claims other than the licensed claims
defined in Section 2. No right is granted to the trademarks of Licensor even if
such marks are included in the Original Work. Nothing in this License shall be
interpreted to prohibit Licensor from licensing under different terms from this
License any Original Work that Licensor otherwise would have a right to
license.
5) This section intentionally omitted.
6) Attribution Rights. You must retain, in the Source Code of any Derivative
Works that You create, all copyright, patent or trademark notices from the
Source Code of the Original Work, as well as any notices of licensing and any
descriptive text identified therein as an "Attribution Notice." You must cause
the Source Code for any Derivative Works that You create to carry a prominent
Attribution Notice reasonably calculated to inform recipients that You have
modified the Original Work.
7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that
the copyright in and to the Original Work and the patent rights granted herein
by Licensor are owned by the Licensor or are sublicensed to You under the terms
of this License with the permission of the contributor(s) of those copyrights
and patent rights. Except as expressly stated in the immediately proceeding
sentence, the Original Work is provided under this License on an "AS IS" BASIS
and WITHOUT WARRANTY, either express or implied, including, without limitation,
the warranties of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU.
This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No
license to Original Work is granted hereunder except under this disclaimer.
8) Limitation of Liability. Under no circumstances and under no legal theory,
whether in tort (including negligence), contract, or otherwise, shall the
Licensor be liable to any person for any direct, indirect, special, incidental,
or consequential damages of any character arising as a result of this License
or the use of the Original Work including, without limitation, damages for loss
of goodwill, work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses. This limitation of liability shall not
apply to liability for death or personal injury resulting from Licensor's
negligence to the extent applicable law prohibits such limitation. Some
jurisdictions do not allow the exclusion or limitation of incidental or
consequential damages, so this exclusion and limitation may not apply to You.
9) Acceptance and Termination. If You distribute copies of the Original Work or
a Derivative Work, You must make a reasonable effort under the circumstances to
obtain the express assent of recipients to the terms of this License. Nothing
else but this License (or another written agreement between Licensor and You)
grants You permission to create Derivative Works based upon the Original Work
or to exercise any of the rights granted in Section 1 herein, and any attempt
to do so except under the terms of this License (or another written agreement
between Licensor and You) is expressly prohibited by U.S. copyright law, the
equivalent laws of other countries, and by international treaty. Therefore, by
exercising any of the rights granted to You in Section 1 herein, You indicate
Your acceptance of this License and all of its terms and conditions.
10) Termination for Patent Action. This License shall terminate automatically
and You may no longer exercise any of the rights granted to You by this License
as of the date You commence an action, including a cross-claim or counterclaim,
against Licensor or any licensee alleging that the Original Work infringes a
patent. This termination provision shall not apply for an action alleging
patent infringement by combinations of the Original Work with other software or
hardware.
11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this
License may be brought only in the courts of a jurisdiction wherein the
Licensor resides or in which Licensor conducts its primary business, and under
the laws of that jurisdiction excluding its conflict-of-law provisions. The
application of the United Nations Convention on Contracts for the International
Sale of Goods is expressly excluded. Any use of the Original Work outside the
scope of this License or after its termination shall be subject to the
requirements and penalties of the U.S. Copyright Act, 17 U.S.C. § 101 et
seq., the equivalent laws of other countries, and international treaty. This
section shall survive the termination of this License.
12) Attorneys Fees. In any action to enforce the terms of this License or
seeking damages relating thereto, the prevailing party shall be entitled to
recover its costs and expenses, including, without limitation, reasonable
attorneys' fees and costs incurred in connection with such action, including
any appeal of such action. This section shall survive the termination of this
License.
13) Miscellaneous. This License represents the complete agreement concerning
the subject matter hereof. If any provision of this License is held to be
unenforceable, such provision shall be reformed only to the extent necessary to
make it enforceable.
14) Definition of "You" in This License. "You" throughout this License, whether
in upper or lower case, means an individual or a legal entity exercising rights
under, and complying with all of the terms of, this License. For legal
entities, "You" includes any entity that controls, is controlled by, or is
under common control with you. For purposes of this definition, "control" means
(i) the power, direct or indirect, to cause the direction or management of such
entity, whether by contract or otherwise, or (ii) ownership of fifty percent
(50%) or more of the outstanding shares, or (iii) beneficial ownership of such
entity.
15) Right to Use. You may use the Original Work in all ways not otherwise
restricted or conditioned by this License or by law, and Licensor promises not
to interfere with or be responsible for such uses by You.
This license is Copyright (C) 2003-2004 Lawrence E. Rosen. All rights reserved.
Permission is hereby granted to copy and distribute this license without
modification. This license may not be modified without the express written
permission of its copyright owner.
"""
'inherit@2.2.2':
license: 'MIT'
repository: 'https://github.com/dfilatov/inherit'
source: 'LICENSE.md'
sourceText: """
Copyright (c) 2012 Dmitry Filatov
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
"""
'tweetnacl@0.14.3':
license: 'Public Domain'
repository: 'https://github.com/dchest/tweetnacl'
source: 'COPYING.txt'
sourceText: """
Public Domain
The person who associated a work with this deed has dedicated the work to the
public domain by waiving all of his or her rights to the work worldwide under
copyright law, including all related and neighboring rights, to the extent
allowed by law.
You can copy, modify, distribute and perform the work, even for commercial
purposes, all without asking permission.
"""

View File

@@ -1,59 +0,0 @@
path = require 'path'
module.exports = (grunt) ->
{spawn, fillTemplate} = require('./task-helpers')(grunt)
grunt.registerTask 'mkdeb', 'Create debian package', ->
done = @async()
appName = grunt.config.get('atom.appName')
appFileName = grunt.config.get('atom.appFileName')
apmFileName = grunt.config.get('atom.apmFileName')
buildDir = grunt.config.get('atom.buildDir')
installDir = '/usr'
shellAppDir = grunt.config.get('atom.shellAppDir')
{version, description} = grunt.config.get('atom.metadata')
channel = grunt.config.get('atom.channel')
if process.arch is 'ia32'
arch = 'i386'
else if process.arch is 'x64'
arch = 'amd64'
else
return done("Unsupported arch #{process.arch}")
desktopFilePath = path.join(buildDir, appFileName + '.desktop')
fillTemplate(
path.join('resources', 'linux', 'atom.desktop.in'),
desktopFilePath,
{appName, appFileName, description, installDir, iconPath: appFileName}
)
getInstalledSize shellAppDir, (error, installedSize) ->
if error?
return done(error)
controlFilePath = path.join(buildDir, 'control')
fillTemplate(
path.join('resources', 'linux', 'debian', 'control.in'),
controlFilePath,
{appFileName, version, arch, installedSize, description}
)
iconPath = path.join(shellAppDir, 'resources', 'app.asar.unpacked', 'resources', 'atom.png')
cmd = path.join('script', 'mkdeb')
args = [appFileName, version, channel, arch, controlFilePath, desktopFilePath, iconPath, buildDir]
spawn {cmd, args}, (error) ->
if error?
done(error)
else
grunt.log.ok "Created #{buildDir}/#{appFileName}-#{version}-#{arch}.deb"
done()
getInstalledSize = (directory, callback) ->
cmd = 'du'
args = ['-sk', directory]
spawn {cmd, args}, (error, {stdout}) ->
installedSize = stdout.split(/\s+/)?[0] or '200000' # default to 200MB
callback(null, installedSize)

View File

@@ -1,54 +0,0 @@
path = require 'path'
module.exports = (grunt) ->
{spawn, fillTemplate, rm, mkdir} = require('./task-helpers')(grunt)
grunt.registerTask 'mkrpm', 'Create rpm package', ->
done = @async()
appName = grunt.config.get('atom.appName')
appFileName = grunt.config.get('atom.appFileName')
apmFileName = grunt.config.get('atom.apmFileName')
buildDir = grunt.config.get('atom.buildDir')
installDir = '/usr'
{version, description} = grunt.config.get('atom.metadata')
if process.arch is 'ia32'
arch = 'i386'
else if process.arch is 'x64'
arch = 'amd64'
else
return done("Unsupported arch #{process.arch}")
desktopFilePath = path.join(buildDir, appFileName + '.desktop')
fillTemplate(
path.join('resources', 'linux', 'atom.desktop.in'),
desktopFilePath,
{appName, appFileName, description, installDir, iconPath: appFileName}
)
# RPM versions can't have dashes in them.
# * http://www.rpm.org/max-rpm/ch-rpm-file-format.html
# * https://github.com/mojombo/semver/issues/145
version = version.replace(/-beta/, "~beta")
version = version.replace(/-dev/, "~dev")
specFilePath = path.join(buildDir, appFileName + '.spec')
fillTemplate(
path.join('resources', 'linux', 'redhat', 'atom.spec.in'),
specFilePath,
{appName, appFileName, apmFileName, installDir, version, description}
)
rpmDir = path.join(buildDir, 'rpm')
rm rpmDir
mkdir rpmDir
cmd = path.join('script', 'mkrpm')
args = [appName, appFileName, specFilePath, desktopFilePath, buildDir]
spawn {cmd, args}, (error) ->
if error?
done(error)
else
grunt.log.ok "Created rpm package in #{rpmDir}"
done()

View File

@@ -1,30 +0,0 @@
path = require 'path'
module.exports = (grunt) ->
{spawn, fillTemplate} = require('./task-helpers')(grunt)
grunt.registerTask 'mktar', 'Create an archive', ->
done = @async()
appFileName = grunt.config.get('atom.appFileName')
buildDir = grunt.config.get('atom.buildDir')
shellAppDir = grunt.config.get('atom.shellAppDir')
{version, description} = grunt.config.get('atom.metadata')
if process.arch is 'ia32'
arch = 'i386'
else if process.arch is 'x64'
arch = 'amd64'
else
return done("Unsupported arch #{process.arch}")
iconPath = path.join(shellAppDir, 'resources', 'app.asar.unpacked', 'resources', 'atom.png')
cmd = path.join('script', 'mktar')
args = [appFileName, version, arch, iconPath, buildDir]
spawn {cmd, args}, (error) ->
if error?
done(error)
else
grunt.log.ok "Created " + path.join(buildDir, "#{appFileName}-#{version}-#{arch}.tar.gz")
done()

View File

@@ -1,6 +0,0 @@
module.exports = (grunt) ->
{spawn} = require('./task-helpers')(grunt)
grunt.registerTask 'nof', 'Un-focus all specs', ->
nof = require.resolve('.bin/nof')
spawn({cmd: nof, args: ['spec']}, @async())

View File

@@ -1,34 +0,0 @@
asar = require 'asar'
path = require 'path'
module.exports = (grunt) ->
grunt.registerTask 'output-build-filetypes', 'Log counts for each filetype in the built application', ->
shellAppDir = grunt.config.get('atom.shellAppDir')
types = {}
registerFile = (filePath) ->
extension = path.extname(filePath) or path.basename(filePath)
types[extension] ?= []
types[extension].push(filePath)
if extension is '.asar'
asar.listPackage(filePath).forEach (archivePath) ->
archivePath = archivePath.substring(1)
unless asar.statFile(filePath, archivePath, true).files
registerFile(archivePath)
grunt.file.recurse shellAppDir, (absolutePath, rootPath, relativePath, fileName) -> registerFile(absolutePath)
extensions = Object.keys(types).sort (extension1, extension2) ->
diff = types[extension2].length - types[extension1].length
if diff is 0
extension1.toLowerCase().localeCompare(extension2.toLowerCase())
else
diff
if extension = grunt.option('extension')
types[extension]?.sort().forEach (filePath) ->
grunt.log.error filePath
else
extensions[0...25].forEach (extension) ->
grunt.log.error "#{extension}: #{types[extension].length}"

View File

@@ -1,25 +0,0 @@
module.exports = (grunt) ->
{spawn} = require('./task-helpers')(grunt)
grunt.registerTask 'output-disk-space', 'Print diskspace available', ->
return unless process.platform is 'darwin'
done = @async()
cmd = 'df'
args = ['-Hl']
spawn {cmd, args}, (error, result, code) ->
return done(error) if error?
lines = result.stdout.split("\n")
for line in lines[1..]
[filesystem, size, used, avail, capacity, extra] = line.split(/\s+/)
capacity = parseInt(capacity)
if capacity > 90
grunt.log.error("#{filesystem} is at #{capacity}% capacity!")
else if capacity > 80
grunt.log.ok("#{filesystem} is at #{capacity}% capacity.")
done()

View File

@@ -1,22 +0,0 @@
path = require 'path'
module.exports = (grunt) ->
grunt.registerTask 'output-for-loop-returns', 'Log methods that end with a for loop', ->
appDir = grunt.config.get('atom.appDir')
jsPaths = []
grunt.file.recurse path.join(appDir, 'src'), (absolutePath, rootPath, relativePath, fileName) ->
jsPaths.push(absolutePath) if path.extname(fileName) is '.js'
jsPaths.forEach (jsPath) ->
js = grunt.file.read(jsPath)
method = null
for line, index in js.split('\n')
[match, className, methodName] = /^\s*([a-zA-Z]+)\.(?:prototype\.)?([a-zA-Z]+)\s*=\s*function\(/.exec(line) ? []
if className and methodName
method = "#{className}::#{methodName}"
else
[match, ctorName] = /^\s*function\s+([a-zA-Z]+)\(/.exec(line) ? []
if /^\s*return\s+_results;\s*$/.test(line)
console.log(method ? "#{path.basename(jsPath)}:#{index}")

View File

@@ -1,18 +0,0 @@
path = require 'path'
module.exports = (grunt) ->
grunt.registerTask 'output-long-paths', 'Log long paths in the built application', ->
shellAppDir = grunt.config.get('atom.shellAppDir')
longPaths = []
grunt.file.recurse shellAppDir, (absolutePath, rootPath, relativePath, fileName) ->
if relativePath
fullPath = path.join(relativePath, fileName)
else
fullPath = fileName
longPaths.push(fullPath) if fullPath.length >= 175
longPaths.sort (longPath1, longPath2) -> longPath2.length - longPath1.length
longPaths.forEach (longPath) ->
grunt.log.error "#{longPath.length} character path: #{longPath}"

View File

@@ -1,66 +0,0 @@
fs = require 'fs'
path = require 'path'
module.exports = (grunt) ->
grunt.registerTask 'output-module-counts', 'Log modules where more than one copy exists in node_modules', ->
nodeModulesDir = path.resolve(__dirname, '..', '..', 'node_modules')
otherModules = {}
atomModules = {}
sortModuleNames = (modules) ->
Object.keys(modules).sort (name1, name2) ->
diff = modules[name2].count - modules[name1].count
diff = name1.localeCompare(name2) if diff is 0
diff
getAtomTotal = ->
Object.keys(atomModules).length
getOtherTotal = ->
Object.keys(otherModules).length
recurseHandler = (absolutePath, rootPath, relativePath, fileName) ->
return if fileName isnt 'package.json'
{name, version, repository} = grunt.file.readJSON(absolutePath)
return unless name and version
repository = repository.url if repository?.url
if /.+\/atom\/.+/.test(repository)
modules = atomModules
else
modules = otherModules
modules[name] ?= {versions: {}, count: 0}
modules[name].count++
modules[name].versions[version] = true
walkNodeModuleDir = ->
grunt.file.recurse(nodeModulesDir, recurseHandler)
# Handle broken symlinks that grunt.file.recurse fails to handle
loop
try
walkNodeModuleDir()
break
catch error
if error.code is 'ENOENT'
fs.unlinkSync(error.path)
otherModules = {}
atomModules = {}
else
break
if getAtomTotal() > 0
console.log "Atom Modules: #{getAtomTotal()}"
sortModuleNames(atomModules).forEach (name) ->
{count, versions, atom} = atomModules[name]
grunt.log.error "#{name}: #{count} (#{Object.keys(versions).join(', ')})" if count > 1
console.log()
console.log "Other Modules: #{getOtherTotal()}"
sortModuleNames(otherModules).forEach (name) ->
{count, versions, atom} = otherModules[name]
grunt.log.error "#{name}: #{count} (#{Object.keys(versions).join(', ')})" if count > 1

View File

@@ -1,107 +0,0 @@
path = require 'path'
fs = require 'fs'
temp = require('temp').track()
LessCache = require 'less-cache'
module.exports = (grunt) ->
{rm} = require('./task-helpers')(grunt)
cacheMisses = 0
cacheHits = 0
compileBootstrap = ->
appDir = grunt.config.get('atom.appDir')
bootstrapLessPath = path.join(appDir, 'static', 'bootstrap.less')
bootstrapCssPath = path.join(appDir, 'static', 'bootstrap.css')
lessCache = new LessCache
cacheDir: temp.mkdirSync('atom-less-cache')
fallbackDir: grunt.config.get('prebuild-less.options.cachePath')
syncCaches: true
resourcePath: path.resolve('.')
bootstrapCss = lessCache.readFileSync(bootstrapLessPath)
grunt.file.write(bootstrapCssPath, bootstrapCss)
rm(bootstrapLessPath)
rm(path.join(appDir, 'node_modules', 'bootstrap', 'less'))
cacheMisses += lessCache.stats.misses
cacheHits += lessCache.stats.hits
importFallbackVariables = (lessFilePath) ->
if lessFilePath.indexOf('static') is 0
false
else
true
grunt.registerMultiTask 'prebuild-less', 'Prebuild cached of compiled Less files', ->
compileBootstrap()
uiThemes = [
'atom-dark-ui'
'atom-light-ui'
'one-dark-ui'
'one-light-ui'
]
syntaxThemes = [
'atom-dark-syntax'
'atom-light-syntax'
'one-dark-syntax'
'one-light-syntax'
'solarized-dark-syntax'
'base16-tomorrow-dark-theme'
'base16-tomorrow-light-theme'
]
prebuiltConfigurations = []
uiThemes.forEach (uiTheme) ->
syntaxThemes.forEach (syntaxTheme) ->
prebuiltConfigurations.push([uiTheme, syntaxTheme])
directory = path.join(grunt.config.get('atom.appDir'), 'less-compile-cache')
for configuration in prebuiltConfigurations
importPaths = grunt.config.get('less.options.paths')
themeMains = []
for theme in configuration
# TODO Use AtomPackage class once it runs outside of an Atom context
themePath = path.resolve('node_modules', theme)
if fs.existsSync(path.join(themePath, 'stylesheets'))
stylesheetsDir = path.join(themePath, 'stylesheets')
else
stylesheetsDir = path.join(themePath, 'styles')
{main} = grunt.file.readJSON(path.join(themePath, 'package.json'))
main ?= 'index.less'
mainPath = path.join(themePath, main)
themeMains.push(mainPath) if grunt.file.isFile(mainPath)
importPaths.unshift(stylesheetsDir) if grunt.file.isDir(stylesheetsDir)
grunt.verbose.writeln("Building Less cache for #{configuration.join(', ').yellow}")
lessCache = new LessCache
cacheDir: directory
fallbackDir: grunt.config.get('prebuild-less.options.cachePath')
syncCaches: true
resourcePath: path.resolve('.')
importPaths: importPaths
cssForFile = (file) ->
less = fs.readFileSync(file, 'utf8')
if importFallbackVariables(file)
baseVarImports = """
@import "variables/ui-variables";
@import "variables/syntax-variables";
"""
less = [baseVarImports, less].join('\n')
lessCache.cssForFile(file, less)
for file in @filesSrc
grunt.verbose.writeln("File #{file.cyan} created in cache.")
cssForFile(file)
for file in themeMains
grunt.verbose.writeln("File #{file.cyan} created in cache.")
cssForFile(file)
cacheMisses += lessCache.stats.misses
cacheHits += lessCache.stats.hits
grunt.log.ok("#{cacheMisses} files compiled, #{cacheHits} files reused")

View File

@@ -1,266 +0,0 @@
child_process = require 'child_process'
path = require 'path'
_ = require 'underscore-plus'
async = require 'async'
fs = require 'fs-plus'
GitHub = require 'github-releases'
request = require 'request'
AWS = require 'aws-sdk'
grunt = null
token = process.env.ATOM_ACCESS_TOKEN
defaultHeaders =
Authorization: "token #{token}"
'User-Agent': 'Atom'
module.exports = (gruntObject) ->
grunt = gruntObject
{cp} = require('./task-helpers')(grunt)
grunt.registerTask 'publish-build', 'Publish the built app', ->
tasks = []
tasks.push('build-docs', 'prepare-docs') if process.platform is 'darwin'
tasks.push('upload-assets')
grunt.task.run(tasks)
grunt.registerTask 'prepare-docs', 'Move api.json to atom-api.json', ->
docsOutputDir = grunt.config.get('docsOutputDir')
buildDir = grunt.config.get('atom.buildDir')
cp path.join(docsOutputDir, 'api.json'), path.join(buildDir, 'atom-api.json')
grunt.registerTask 'upload-assets', 'Upload the assets to a GitHub release', ->
releaseBranch = grunt.config.get('atom.releaseBranch')
isPrerelease = grunt.config.get('atom.channel') is 'beta'
return unless releaseBranch?
doneCallback = @async()
startTime = Date.now()
done = (args...) ->
elapsedTime = Math.round((Date.now() - startTime) / 100) / 10
grunt.log.ok("Upload time: #{elapsedTime}s")
doneCallback(args...)
unless token
return done(new Error('ATOM_ACCESS_TOKEN environment variable not set'))
buildDir = grunt.config.get('atom.buildDir')
assets = getAssets()
zipAssets buildDir, assets, (error) ->
return done(error) if error?
getAtomDraftRelease isPrerelease, releaseBranch, (error, release) ->
return done(error) if error?
assetNames = (asset.assetName for asset in assets)
deleteExistingAssets release, assetNames, (error) ->
return done(error) if error?
uploadAssets(release, buildDir, assets, done)
getAssets = ->
{cp} = require('./task-helpers')(grunt)
{version} = grunt.file.readJSON('package.json')
buildDir = grunt.config.get('atom.buildDir')
appName = grunt.config.get('atom.appName')
appFileName = grunt.config.get('atom.appFileName')
switch process.platform
when 'darwin'
[
{assetName: 'atom-mac.zip', sourcePath: appName}
{assetName: 'atom-mac-symbols.zip', sourcePath: 'Atom.breakpad.syms'}
{assetName: 'atom-api.json', sourcePath: 'atom-api.json'}
]
when 'win32'
assets = [{assetName: 'atom-windows.zip', sourcePath: appName}]
for squirrelAsset in ['AtomSetup.exe', 'AtomSetup.msi', 'RELEASES', "atom-#{version}-full.nupkg", "atom-#{version}-delta.nupkg"]
cp path.join(buildDir, 'installer', squirrelAsset), path.join(buildDir, squirrelAsset)
assets.push({assetName: squirrelAsset, sourcePath: assetName})
assets
when 'linux'
if process.arch is 'ia32'
arch = 'i386'
else
arch = 'amd64'
# Check for a Debian build
sourcePath = path.join(buildDir, "#{appFileName}-#{version}-#{arch}.deb")
assetName = "atom-#{arch}.deb"
# Check for a Fedora build
unless fs.isFileSync(sourcePath)
rpmName = fs.readdirSync("#{buildDir}/rpm")[0]
sourcePath = path.join(buildDir, "rpm", rpmName)
if process.arch is 'ia32'
arch = 'i386'
else
arch = 'x86_64'
assetName = "atom.#{arch}.rpm"
cp sourcePath, path.join(buildDir, assetName)
assets = [{assetName, sourcePath}]
# Check for an archive build on a debian build machine.
# We could provide a Fedora version if some libraries are not compatible
sourcePath = path.join(buildDir, "#{appFileName}-#{version}-#{arch}.tar.gz")
if fs.isFileSync(sourcePath)
assetName = "atom-#{arch}.tar.gz"
cp sourcePath, path.join(buildDir, assetName)
assets.push({assetName, sourcePath})
assets
logError = (message, error, details) ->
grunt.log.error(message)
grunt.log.error(error.message ? error) if error?
grunt.log.error(require('util').inspect(details)) if details
zipAssets = (buildDir, assets, callback) ->
zip = (directory, sourcePath, assetName, callback) ->
if process.platform is 'win32'
zipCommand = "C:/psmodules/7z.exe a -r #{assetName} \"#{sourcePath}\""
else
zipCommand = "zip -r --symlinks '#{assetName}' '#{sourcePath}'"
options = {cwd: directory, maxBuffer: Infinity}
child_process.exec zipCommand, options, (error, stdout, stderr) ->
logError("Zipping #{sourcePath} failed", error, stderr) if error?
callback(error)
tasks = []
for {assetName, sourcePath} in assets when path.extname(assetName) is '.zip'
fs.removeSync(path.join(buildDir, assetName))
tasks.push(zip.bind(this, buildDir, sourcePath, assetName))
async.parallel(tasks, callback)
getAtomDraftRelease = (isPrerelease, branchName, callback) ->
atomRepo = new GitHub({repo: 'atom/atom', token})
atomRepo.getReleases {prerelease: isPrerelease}, (error, releases=[]) ->
if error?
logError('Fetching atom/atom releases failed', error, releases)
callback(error)
else
[firstDraft] = releases.filter ({draft}) -> draft
if firstDraft?
options =
uri: firstDraft.assets_url
method: 'GET'
headers: defaultHeaders
json: true
request options, (error, response, assets=[]) ->
if error? or response.statusCode isnt 200
logError('Fetching draft release assets failed', error, assets)
callback(error ? new Error(response.statusCode))
else
firstDraft.assets = assets
callback(null, firstDraft)
else
createAtomDraftRelease(isPrerelease, branchName, callback)
createAtomDraftRelease = (isPrerelease, branchName, callback) ->
{version} = require('../../package.json')
options =
uri: 'https://api.github.com/repos/atom/atom/releases'
method: 'POST'
headers: defaultHeaders
json:
tag_name: "v#{version}"
prerelease: isPrerelease
target_commitish: branchName
name: version
draft: true
body: """
### Notable Changes
* Something new
"""
request options, (error, response, body='') ->
if error? or response.statusCode isnt 201
logError("Creating atom/atom draft release failed", error, body)
callback(error ? new Error(response.statusCode))
else
callback(null, body)
deleteRelease = (release) ->
options =
uri: release.url
method: 'DELETE'
headers: defaultHeaders
json: true
request options, (error, response, body='') ->
if error? or response.statusCode isnt 204
logError('Deleting release failed', error, body)
deleteExistingAssets = (release, assetNames, callback) ->
[callback, assetNames] = [assetNames, callback] if not callback?
deleteAsset = (url, callback) ->
options =
uri: url
method: 'DELETE'
headers: defaultHeaders
request options, (error, response, body='') ->
if error? or response.statusCode isnt 204
logError('Deleting existing release asset failed', error, body)
callback(error ? new Error(response.statusCode))
else
callback()
tasks = []
for asset in release.assets when not assetNames? or asset.name in assetNames
tasks.push(deleteAsset.bind(this, asset.url))
async.parallel(tasks, callback)
uploadAssets = (release, buildDir, assets, callback) ->
uploadToReleases = (release, assetName, assetPath, callback) ->
options =
uri: release.upload_url.replace(/\{.*$/, "?name=#{assetName}")
method: 'POST'
headers: _.extend({
'Content-Type': 'application/zip'
'Content-Length': fs.getSizeSync(assetPath)
}, defaultHeaders)
assetRequest = request options, (error, response, body='') ->
if error? or response.statusCode >= 400
logError("Upload release asset #{assetName} to Releases failed", error, body)
callback(error ? new Error(response.statusCode))
else
callback(null, release)
fs.createReadStream(assetPath).pipe(assetRequest)
uploadToS3 = (release, assetName, assetPath, callback) ->
s3Key = process.env.BUILD_ATOM_RELEASES_S3_KEY
s3Secret = process.env.BUILD_ATOM_RELEASES_S3_SECRET
s3Bucket = process.env.BUILD_ATOM_RELEASES_S3_BUCKET
unless s3Key and s3Secret and s3Bucket
callback(new Error('BUILD_ATOM_RELEASES_S3_KEY, BUILD_ATOM_RELEASES_S3_SECRET, and BUILD_ATOM_RELEASES_S3_BUCKET environment variables must be set.'))
return
s3Info =
accessKeyId: s3Key
secretAccessKey: s3Secret
s3 = new AWS.S3 s3Info
key = "releases/#{release.tag_name}/#{assetName}"
uploadParams =
Bucket: s3Bucket
ACL: 'public-read'
Key: key
Body: fs.createReadStream(assetPath)
s3.upload uploadParams, (error, data) ->
if error?
logError("Upload release asset #{assetName} to S3 failed", error)
callback(error)
else
callback(null, release)
tasks = []
for {assetName} in assets
assetPath = path.join(buildDir, assetName)
tasks.push(uploadToReleases.bind(this, release, assetName, assetPath))
tasks.push(uploadToS3.bind(this, release, assetName, assetPath))
async.parallel(tasks, callback)

View File

@@ -1,13 +0,0 @@
path = require 'path'
module.exports = (grunt) ->
grunt.registerTask 'set-exe-icon', 'Set icon of the exe', ->
done = @async()
channel = grunt.config.get('atom.channel')
shellAppDir = grunt.config.get('atom.shellAppDir')
shellExePath = path.join(shellAppDir, 'atom.exe')
iconPath = path.resolve('resources', 'app-icons', channel, 'atom.ico')
rcedit = require('rcedit')
rcedit(shellExePath, {'icon': iconPath}, done)

View File

@@ -1,57 +0,0 @@
fs = require 'fs'
path = require 'path'
module.exports = (grunt) ->
{spawn} = require('./task-helpers')(grunt)
getVersion = (callback) ->
shouldUseCommitHash = grunt.config.get('atom.channel') is 'dev'
inRepository = fs.existsSync(path.resolve(__dirname, '..', '..', '.git'))
{version} = require(path.join(grunt.config.get('atom.appDir'), 'package.json'))
if shouldUseCommitHash and inRepository
cmd = 'git'
args = ['rev-parse', '--short', 'HEAD']
spawn {cmd, args}, (error, {stdout}={}, code) ->
commitHash = stdout?.trim?()
combinedVersion = "#{version}-#{commitHash}"
callback(error, combinedVersion)
else
callback(null, version)
grunt.registerTask 'set-version', 'Set the version in the plist and package.json', ->
done = @async()
getVersion (error, version) ->
if error?
done(error)
return
appDir = grunt.config.get('atom.appDir')
shellAppDir = grunt.config.get('atom.shellAppDir')
# Replace version field of package.json.
packageJsonPath = path.join(appDir, 'package.json')
packageJson = require(packageJsonPath)
packageJson.version = version
packageJsonString = JSON.stringify(packageJson)
fs.writeFileSync(packageJsonPath, packageJsonString)
if process.platform is 'darwin'
cmd = 'script/set-version'
args = [shellAppDir, version]
spawn {cmd, args}, (error, result, code) -> done(error)
else if process.platform is 'win32'
shellAppDir = grunt.config.get('atom.shellAppDir')
shellExePath = path.join(shellAppDir, 'atom.exe')
strings =
CompanyName: 'GitHub, Inc.'
FileDescription: 'Atom'
LegalCopyright: 'Copyright (C) 2015 GitHub, Inc. All rights reserved'
ProductName: 'Atom'
ProductVersion: version
rcedit = require('rcedit')
rcedit(shellExePath, {'version-string': strings}, done)
else
done()

View File

@@ -1,170 +0,0 @@
fs = require 'fs'
path = require 'path'
temp = require('temp').track()
_ = require 'underscore-plus'
async = require 'async'
# TODO: This should really be parallel on every platform, however:
# - On Windows, our fixtures step on each others toes.
if process.platform is 'win32'
concurrency = 1
else
concurrency = 2
module.exports = (grunt) ->
{isAtomPackage, spawn} = require('./task-helpers')(grunt)
packageSpecQueue = null
getAppPath = ->
contentsDir = grunt.config.get('atom.contentsDir')
switch process.platform
when 'darwin'
path.join(contentsDir, 'MacOS', 'Atom')
when 'linux'
path.join(contentsDir, 'atom')
when 'win32'
path.join(contentsDir, 'atom.exe')
runPackageSpecs = (callback) ->
failedPackages = []
rootDir = grunt.config.get('atom.shellAppDir')
resourcePath = process.cwd()
appPath = getAppPath()
# Ensure application is executable on Linux
fs.chmodSync(appPath, '755') if process.platform is 'linux'
packageSpecQueue = async.queue (packagePath, callback) ->
if process.platform in ['darwin', 'linux']
options =
cmd: appPath
args: ['--test', "--resource-path=#{resourcePath}", path.join(packagePath, 'spec')]
opts:
cwd: packagePath
env: _.extend({}, process.env, ELECTRON_ENABLE_LOGGING: true, ATOM_PATH: rootDir)
else if process.platform is 'win32'
options =
cmd: process.env.comspec
args: ['/c', appPath, '--test', "--resource-path=#{resourcePath}", "--log-file=ci.log", path.join(packagePath, 'spec')]
opts:
cwd: packagePath
env: _.extend({}, process.env, ELECTRON_ENABLE_LOGGING: true, ATOM_PATH: rootDir)
grunt.log.ok "Launching #{path.basename(packagePath)} specs."
spawn options, (error, results, code) ->
if process.platform is 'win32'
if error
process.stderr.write(fs.readFileSync(path.join(packagePath, 'ci.log')))
fs.unlinkSync(path.join(packagePath, 'ci.log'))
failedPackages.push path.basename(packagePath) if error
callback()
modulesDirectory = path.resolve('node_modules')
for packageDirectory in fs.readdirSync(modulesDirectory)
packagePath = path.join(modulesDirectory, packageDirectory)
continue unless grunt.file.isDir(path.join(packagePath, 'spec'))
continue unless isAtomPackage(packagePath)
packageSpecQueue.push(packagePath)
packageSpecQueue.concurrency = Math.max(1, concurrency - 1)
packageSpecQueue.drain = -> callback(null, failedPackages)
runRendererProcessSpecs = (callback) ->
appPath = getAppPath()
resourcePath = process.cwd()
coreSpecsPath = path.resolve('spec')
if process.platform in ['darwin', 'linux']
options =
cmd: appPath
args: ['--test', "--resource-path=#{resourcePath}", coreSpecsPath, "--user-data-dir=#{temp.mkdirSync('atom-user-data-dir')}"]
opts:
env: _.extend({}, process.env, {ELECTRON_ENABLE_LOGGING: true, ATOM_INTEGRATION_TESTS_ENABLED: true})
stdio: 'inherit'
else if process.platform is 'win32'
options =
cmd: process.env.comspec
args: ['/c', appPath, '--test', "--resource-path=#{resourcePath}", '--log-file=ci.log', coreSpecsPath]
opts:
env: _.extend({}, process.env, {ELECTRON_ENABLE_LOGGING: true, ATOM_INTEGRATION_TESTS_ENABLED: true})
stdio: 'inherit'
grunt.log.ok "Launching core specs (renderer process)."
spawn options, (error, results, code) ->
if process.platform is 'win32'
process.stderr.write(fs.readFileSync('ci.log')) if error
fs.unlinkSync('ci.log')
else
# TODO: Restore concurrency on Windows
packageSpecQueue?.concurrency = concurrency
callback(null, error)
runMainProcessSpecs = (callback) ->
appPath = getAppPath()
resourcePath = process.cwd()
mainProcessSpecsPath = path.resolve('spec/main-process')
if process.platform in ['darwin', 'linux']
options =
cmd: appPath
args: ["--test", "--main-process", "--resource-path=#{resourcePath}", mainProcessSpecsPath]
opts:
env: process.env
stdio: 'inherit'
else if process.platform is 'win32'
options =
cmd: process.env.comspec
args: ['/c', appPath, "--test", "--main-process", "--resource-path=#{resourcePath}", mainProcessSpecsPath]
opts:
env: process.env
stdio: 'inherit'
grunt.log.ok "Launching core specs (main process)."
spawn options, (error, results, code) ->
callback(null, error)
grunt.registerTask 'run-specs', 'Run the specs', ->
done = @async()
startTime = Date.now()
method =
if concurrency is 1
async.series
else
async.parallel
specs =
if process.env.ATOM_SPECS_TASK is 'packages'
[runPackageSpecs]
else if process.env.ATOM_SPECS_TASK is 'core'
[runRendererProcessSpecs, runMainProcessSpecs]
else
[runRendererProcessSpecs, runMainProcessSpecs, runPackageSpecs]
method specs, (error, results) ->
failedPackages = []
coreSpecFailed = null
if process.env.ATOM_SPECS_TASK is 'packages'
[failedPackages] = results
else if process.env.ATOM_SPECS_TASK is 'core'
[rendererProcessSpecsFailed, mainProcessSpecsFailed] = results
else
[rendererProcessSpecsFailed, mainProcessSpecsFailed, failedPackages] = results
elapsedTime = Math.round((Date.now() - startTime) / 100) / 10
grunt.log.ok("Total spec time: #{elapsedTime}s using #{concurrency} cores")
failures = failedPackages
failures.push "atom core (renderer process)" if rendererProcessSpecsFailed
failures.push "atom core (main process)" if mainProcessSpecsFailed
grunt.log.error("[Error]".red + " #{failures.join(', ')} spec(s) failed") if failures.length > 0
if process.platform is 'win32' and process.env.JANKY_SHA1
done()
else
done(failures.length is 0)

View File

@@ -1,75 +0,0 @@
fs = require 'fs-plus'
path = require 'path'
_ = require 'underscore-plus'
module.exports = (grunt) ->
cp: (source, destination, {filter}={}) ->
unless grunt.file.exists(source)
grunt.fatal("Cannot copy non-existent #{source.cyan} to #{destination.cyan}")
copyFile = (sourcePath, destinationPath) ->
return if filter?(sourcePath) or filter?.test?(sourcePath)
stats = fs.lstatSync(sourcePath)
if stats.isSymbolicLink()
grunt.file.mkdir(path.dirname(destinationPath))
fs.symlinkSync(fs.readlinkSync(sourcePath), destinationPath)
else if stats.isFile()
grunt.file.copy(sourcePath, destinationPath)
if grunt.file.exists(destinationPath)
fs.chmodSync(destinationPath, fs.statSync(sourcePath).mode)
if grunt.file.isFile(source)
copyFile(source, destination)
else
try
onFile = (sourcePath) ->
destinationPath = path.join(destination, path.relative(source, sourcePath))
copyFile(sourcePath, destinationPath)
onDirectory = (sourcePath) ->
if fs.isSymbolicLinkSync(sourcePath)
destinationPath = path.join(destination, path.relative(source, sourcePath))
copyFile(sourcePath, destinationPath)
false
else
true
fs.traverseTreeSync source, onFile, onDirectory
catch error
grunt.fatal(error)
grunt.verbose.writeln("Copied #{source.cyan} to #{destination.cyan}.")
mkdir: (args...) ->
grunt.file.mkdir(args...)
rm: (args...) ->
grunt.file.delete(args..., force: true) if grunt.file.exists(args...)
spawn: (options, callback) ->
childProcess = require 'child_process'
stdout = []
stderr = []
error = null
proc = childProcess.spawn(options.cmd, options.args, options.opts)
if proc.stdout?
proc.stdout.on 'data', (data) -> stdout.push(data.toString())
if proc.stderr?
proc.stderr.on 'data', (data) -> stderr.push(data.toString())
proc.on 'error', (processError) -> error ?= processError
proc.on 'close', (exitCode, signal) ->
error ?= new Error(signal) if exitCode isnt 0
results = {stderr: stderr.join(''), stdout: stdout.join(''), code: exitCode}
grunt.log.error results.stderr if exitCode isnt 0
callback(error, results, exitCode)
isAtomPackage: (packagePath) ->
try
{engines} = grunt.file.readJSON(path.join(packagePath, 'package.json'))
engines?.atom?
catch error
false
fillTemplate: (templatePath, outputPath, data) ->
content = _.template(String(fs.readFileSync(templatePath)))(data)
grunt.file.write(outputPath, content)

View File

@@ -1,4 +1,45 @@
machine:
environment:
XCODE_SCHEME: test
XCODE_WORKSPACE: test
XCODE_PROJECT: test
TEST_JUNIT_XML_ROOT: ${CIRCLE_TEST_REPORTS}
xcode:
version: 7.3
general:
branches:
only:
- io-circle-ci
artifacts:
- out/atom-mac.zip
- out/atom-mac-symbols.zip
- docs/output/atom-api.json
dependencies:
pre:
- curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.3/install.sh | bash
- nvm install 6.9.4
- nvm use 6.9.4
- npm install -g npm@5.3.0
override:
- script/build --code-sign --compress-artifacts
cache_directories:
- electron
- apm/node_modules
- script/node_modules
- node_modules
- ~/.atom/compile-cache
- ~/.atom/snapshot-cache
test:
override:
- script/lint
- osascript -e 'tell application "System Events" to keystroke "x"' # clear screen saver
- caffeinate -s script/test # Run with caffeinate to prevent screen saver
experimental:
notify:
branches:
only:
- master

View File

@@ -2,20 +2,20 @@
![Atom](https://cloud.githubusercontent.com/assets/72919/2874231/3af1db48-d3dd-11e3-98dc-6066f8bc766f.png)
Most of the Atom user and developer documentation is contained in the [Atom Docs](https://github.com/atom/docs) repository.
Most of the Atom user and developer documentation is contained in the [Atom Flight Manual](https://github.com/atom/flight-manual.atom.io) repository.
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.
In this directory you can only find very specific build and API level documentation. Some of this may eventually move to the Flight Manual as well.
## Build documentation
Instructions for building Atom on various platforms from source.
* [OS X](build-instructions/os-x.md)
* [Windows](build-instructions/windows.md)
* [Linux](build-instructions/linux.md)
* [FreeBSD](build-instructions/freebsd.md)
* [macOS](./build-instructions/macOS.md)
* [Windows](./build-instructions/windows.md)
* [Linux](./build-instructions/linux.md)
* [FreeBSD](./build-instructions/freebsd.md)
## Other documentation here
* [apm REST API](apm-rest-api.md)
* [Tips for contributing to packages](contributing-to-packages.md)
* [apm REST API](./apm-rest-api.md)
* [Tips for contributing to packages](./contributing-to-packages.md)

View File

@@ -0,0 +1,117 @@
# Atom build status
| System | Travis | AppVeyor/Win | Circle/Mac | Dependencies |
|--------|--------|--------------|------------|--------------|
| [Atom](https://github.com/atom/atom) | [![Travis Build Status](https://travis-ci.org/atom/atom.svg?branch=master)](https://travis-ci.org/atom/atom) | [![AppVeyor/Wi Build Status](https://ci.appveyor.com/api/projects/status/1tkktwh654w07eim?svg=true)](https://ci.appveyor.com/project/Atom/atom) | [![Circle/Mac Build Status](https://circleci.com/gh/atom/atom.svg?style=shield)](https://circleci.com/gh/atom/atom) | [![Dependency Status](https://david-dm.org/atom/atom.svg)](https://david-dm.org/atom/atom) |
| [APM](https://github.com/atom/apm) | [![Travis Build Status](https://travis-ci.org/atom/apm.svg?branch=master)](https://travis-ci.org/atom/apm) | [![AppVeyor/Wi Build Status](https://ci.appveyor.com/api/projects/status/j6ixw374a397ugkb/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/apm/branch/master) | | [![Dependency Status](https://david-dm.org/atom/apm.svg)](https://david-dm.org/atom/apm) |
| [Electron](https://github.com/electron/electron) | [![Travis Build Status](https://travis-ci.org/electron/electron.svg?branch=master)](https://travis-ci.org/electron/electron) | [![AppVeyor/Wi Build Status](https://ci.appveyor.com/api/projects/status/kvxe4byi7jcxbe26/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/electron) | | [![Dependency Status](https://david-dm.org/electron/electron/dev-status.svg)](https://david-dm.org/electron/electron)
## Packages
| Package | Travis | AppVeyor/Win | Dependencies |
|---------|--------|--------------|--------------|
| [About](https://github.com/atom/about) | [![macOS Build Status](https://travis-ci.org/atom/about.svg?branch=master)](https://travis-ci.org/atom/about) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/msprea3vq47l8oce/branch/master?svg=true)](https://ci.appveyor.com/project/atom/about/branch/master) | [![Dependency Status](https://david-dm.org/atom/about.svg)](https://david-dm.org/atom/about) |
| [Archive View](https://github.com/atom/archive-view) | [![macOS Build Status](https://travis-ci.org/atom/archive-view.svg?branch=master)](https://travis-ci.org/atom/archive-view) | [![Windows Build status](https://ci.appveyor.com/api/projects/status/u3qfgaod4lhriqlj/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/archive-view/branch/master) | [![Dependency Status](https://david-dm.org/atom/archive-view.svg)](https://david-dm.org/atom/archive-view) |
| [AutoComplete Atom API](https://github.com/atom/autocomplete-atom-api) | [![macOS Build Status](https://travis-ci.org/atom/autocomplete-atom-api.svg?branch=master)](https://travis-ci.org/atom/autocomplete-atom-api) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/1x3uqd9ddchpe555/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/autocomplete-atom-api/branch/master) | [![Dependency Status](https://david-dm.org/atom/autocomplete-atom-api.svg)](https://david-dm.org/atom/autocomplete-atom-api) |
| [AutoComplete CSS](https://github.com/atom/autocomplete-css) | [![macOS Build Status](https://travis-ci.org/atom/autocomplete-css.svg?branch=master)](https://travis-ci.org/atom/autocomplete-css) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/k3e5uvpmpc5bkja9/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/autocomplete-css/branch/master) | [![Dependency Status](https://david-dm.org/atom/autocomplete-css.svg)](https://david-dm.org/atom/autocomplete-css) |
| [AutoComplete HTML](https://github.com/atom/autocomplete-html) | [![macOS Build Status](https://travis-ci.org/atom/autocomplete-html.svg?branch=master)](https://travis-ci.org/atom/autocomplete-html) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/bsaqbg1fljpd9q1b/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/autocomplete-html/branch/master) | [![Dependency Status](https://david-dm.org/atom/autocomplete-html.svg)](https://david-dm.org/atom/autocomplete-html) |
| [AutoComplete+](https://github.com/atom/autocomplete-plus) | [![macOS Build Status](https://travis-ci.org/atom/autocomplete-plus.svg?branch=master)](https://travis-ci.org/atom/autocomplete-plus) | [![Windows Build status](https://ci.appveyor.com/api/projects/status/9bpokrud2apgqsq0/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/autocomplete-plus/branch/master) | [![Dependency Status](https://david-dm.org/atom/autocomplete-plus.svg)](https://david-dm.org/atom/autocomplete-plus) |
| [AutoComplete Snippets](https://github.com/atom/autocomplete-snippets) | [![macOS Build Status](https://travis-ci.org/atom/autocomplete-snippets.svg)](https://travis-ci.org/atom/autocomplete-snippets) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/72kfi83l6cw90joy/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/autocomplete-snippets/branch/master) | [![Dependency Status](https://david-dm.org/atom/autocomplete-snippets.svg)](https://david-dm.org/atom/autocomplete-snippets) |
| [AutoFlow](https://github.com/atom/autoflow) | [![macOS Build Status](https://travis-ci.org/atom/autoflow.svg?branch=master)](https://travis-ci.org/atom/autoflow) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/kpmsnkbooa29x907/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/autoflow/branch/master) | [![Dependency Status](https://david-dm.org/atom/autoflow.svg)](https://david-dm.org/atom/autoflow) |
| [AutoSave](https://github.com/atom/autosave) | [![macOS Build Status](https://travis-ci.org/atom/autosave.svg?branch=master)](https://travis-ci.org/atom/autosave) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/3aktr9updp722fqx/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/autosave/branch/master) | [![Dependency Status](https://david-dm.org/atom/autosave.svg)](https://david-dm.org/atom/autosave) |
| [Background Tips](https://github.com/atom/background-tips) | [![macOS Build Status](https://travis-ci.org/atom/background-tips.svg?branch=master)](https://travis-ci.org/atom/background-tips) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/2utcugietl5vjc7w/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/background-tips/branch/master) | [![Dependency Status](https://david-dm.org/atom/background-tips.svg)](https://david-dm.org/atom/background-tips) |
| [Bookmarks](https://github.com/atom/bookmarks) | [![macOS Build Status](https://travis-ci.org/atom/bookmarks.svg?branch=master)](https://travis-ci.org/atom/bookmarks) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/vjsf78pj4rw6ibcw/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/bookmarks/branch/master) | [![Dependency Status](https://david-dm.org/atom/bookmarks.svg)](https://david-dm.org/atom/bookmarks) |
| [Bracket Matcher](https://github.com/atom/bracket-matcher) | [![macOS Build Status](https://travis-ci.org/atom/bracket-matcher.svg?branch=master)](https://travis-ci.org/atom/bracket-matcher) | [![Windows Build status](https://ci.appveyor.com/api/projects/status/rrsl2h7e0od26k54/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/bracket-matcher/branch/master) | [![Dependency Status](https://david-dm.org/atom/bracket-matcher.svg)](https://david-dm.org/atom/bracket-matcher) |
| [Command Palette](https://github.com/atom/command-palette) | [![macOS Build Status](https://travis-ci.org/atom/command-palette.svg?branch=master)](https://travis-ci.org/atom/command-palette) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/jqgwetayr0enorun/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/command-palette/branch/master) | [![Dependency Status](https://david-dm.org/atom/command-palette.svg)](https://david-dm.org/atom/command-palette) |
| [Deprecation Cop](https://github.com/atom/deprecation-cop) | [![macOS Build Status](https://travis-ci.org/atom/deprecation-cop.svg?branch=master)](https://travis-ci.org/atom/deprecation-cop) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/0s870q5fj3vwihjx/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/deprecation-cop/branch/master) | [![Dependency Status](https://david-dm.org/atom/deprecation-cop.svg)](https://david-dm.org/atom/deprecation-cop) |
| [Dev Live Reload](https://github.com/atom/dev-live-reload) | [![macOS Build Status](https://travis-ci.org/atom/dev-live-reload.svg?branch=master)](https://travis-ci.org/atom/dev-live-reload) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/g3sd27ylba1fun1v/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/dev-live-reload/branch/master) | [![Dependency Status](https://david-dm.org/atom/dev-live-reload.svg)](https://david-dm.org/atom/dev-live-reload) |
| [Encoding Selector](https://github.com/atom/encoding-selector) | [![macOS Build Status](https://travis-ci.org/atom/encoding-selector.svg?branch=master)](https://travis-ci.org/atom/encoding-selector) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/e08x6k2b68wpwxxc/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/encoding-selector/branch/master) | [![Dependency Status](https://david-dm.org/atom/encoding-selector.svg)](https://david-dm.org/atom/encoding-selector) |
| [Exception Reporting](https://github.com/atom/exception-reporting) | [![macOS Build Status](https://travis-ci.org/atom/exception-reporting.svg?branch=master)](https://travis-ci.org/atom/exception-reporting) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/i0pla7qbpv7celg2/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/exception-reporting/branch/master) | [![Dependency Status](https://david-dm.org/atom/exception-reporting.svg)](https://david-dm.org/atom/exception-reporting) |
| [Find and Replace](https://github.com/atom/find-and-replace) | [![macOS Build Status](https://travis-ci.org/atom/find-and-replace.svg?branch=master)](https://travis-ci.org/atom/find-and-replace) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/6w4baiiq5mw4nxky/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/find-and-replace/branch/master) | [![Dependency Status](https://david-dm.org/atom/find-and-replace.svg)](https://david-dm.org/atom/find-and-replace) |
| [Fuzzy Finder](https://github.com/atom/fuzzy-finder) | [![macOS Build Status](https://travis-ci.org/atom/fuzzy-finder.svg?branch=master)](https://travis-ci.org/atom/fuzzy-finder) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/b4b2dg5n9r1wdqad/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/fuzzy-finder/branch/master) | [![Dependency Status](https://david-dm.org/atom/fuzzy-finder.svg)](https://david-dm.org/atom/fuzzy-finder) |
| [GitHub](https://github.com/atom/github) | [![macOS Build Status](https://travis-ci.com/atom/github.svg?token=RwrCnzpsZN5oEq5S5p7V&branch=master)](https://travis-ci.com/atom/github) | [![Windows Build status](https://ci.appveyor.com/api/projects/status/psctk8vrva49dseb/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/github/branch/master) | [![Dependency Status](https://david-dm.org/atom/github.svg)](https://david-dm.org/atom/github) |
| [Git Diff](https://github.com/atom/git-diff) | [![macOS Build Status](https://travis-ci.org/atom/git-diff.svg?branch=master)](https://travis-ci.org/atom/git-diff) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/9auj52cs0vso66nv/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/git-diff/branch/master) | [![Dependency Status](https://david-dm.org/atom/git-diff.svg)](https://david-dm.org/atom/git-diff) |
| [Go to Line](https://github.com/atom/go-to-line) | [![macOS Build Status](https://travis-ci.org/atom/go-to-line.svg?branch=master)](https://travis-ci.org/atom/go-to-line) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/qf0isc8ulw4wxi0b/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/go-to-line/branch/master) | [![Dependency Status](https://david-dm.org/atom/go-to-line.svg)](https://david-dm.org/atom/go-to-line) |
| [Grammar Selector](https://github.com/atom/grammar-selector) | [![macOS Build Status](https://travis-ci.org/atom/grammar-selector.svg?branch=master)](https://travis-ci.org/atom/grammar-selector) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/pg8qss03bfh4ngqm/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/grammar-selector/branch/master) | [![Dependency Status](https://david-dm.org/atom/grammar-selector.svg)](https://david-dm.org/atom/grammar-selector) |
| [Image View](https://github.com/atom/image-view) | [![macOS Build Status](https://travis-ci.org/atom/image-view.svg?branch=master)](https://travis-ci.org/atom/image-view) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/notavaawrswk0g10/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/image-view/branch/master) | [![Dependency Status](https://david-dm.org/atom/image-view.svg)](https://david-dm.org/atom/image-view) |
| [Incompatible Packages](https://github.com/atom/incompatible-packages) | [![macOS Build Status](https://travis-ci.org/atom/incompatible-packages.svg?branch=master)](https://travis-ci.org/atom/incompatible-packages) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/neet595s038x7w70/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/incompatible-packages/branch/master) | [![Dependency Status](https://david-dm.org/atom/incompatible-packages.svg)](https://david-dm.org/atom/incompatible-packages) |
| [Keybinding Resolver](https://github.com/atom/keybinding-resolver) | [![macOS Build Status](https://travis-ci.org/atom/keybinding-resolver.svg?branch=master)](https://travis-ci.org/atom/keybinding-resolver) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/9jf31itx01hnn4nh/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/keybinding-resolver/branch/master) | [![Dependency Status](https://david-dm.org/atom/keybinding-resolver.svg)](https://david-dm.org/atom/keybinding-resolver) |
| [Line Ending Selector](https://github.com/atom/line-ending-selector) | [![macOS Build Status](https://travis-ci.org/atom/line-ending-selector.svg?branch=master)](https://travis-ci.org/atom/line-ending-selector) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/b3743n9ojomlpn1g/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/line-ending-selector/branch/master) | [![Dependency Status](https://david-dm.org/atom/line-ending-selector.svg)](https://david-dm.org/atom/line-ending-selector) |
| [Link](https://github.com/atom/link) | [![macOS Build Status](https://travis-ci.org/atom/link.svg?branch=master)](https://travis-ci.org/atom/link) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/1d3cb8ktd48k9vnl/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/link/branch/master) | [![Dependency Status](https://david-dm.org/atom/link.svg)](https://david-dm.org/atom/link) |
| [Markdown Preview](https://github.com/atom/markdown-preview) | [![macOS Build Status](https://travis-ci.org/atom/markdown-preview.svg?branch=master)](https://travis-ci.org/atom/markdown-preview) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/bvh0evhh4v6w9b29/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/markdown-preview/branch/master) | [![Dependency Status](https://david-dm.org/atom/markdown-preview.svg)](https://david-dm.org/atom/markdown-preview) |
| [Metrics](https://github.com/atom/metrics) | [![macOS Build Status](https://travis-ci.org/atom/metrics.svg?branch=master)](https://travis-ci.org/atom/metrics) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/b5doi205xl3iex04/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/metrics/branch/master) | [![Dependency Status](https://david-dm.org/atom/metrics.svg)](https://david-dm.org/atom/metrics) |
| [Notifications](https://github.com/atom/notifications) | [![macOS Build Status](https://travis-ci.org/atom/notifications.svg?branch=master)](https://travis-ci.org/atom/notifications) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/ps3p8tj2okw57x0e/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/notifications/branch/master) | [![Dependency Status](https://david-dm.org/atom/notifications.svg)](https://david-dm.org/atom/notifications) |
| [Open on GitHub](https://github.com/atom/open-on-github) | [![macOS Build Status](https://travis-ci.org/atom/open-on-github.svg?branch=master)](https://travis-ci.org/atom/open-on-github) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/ccl6na4qsna5wncr/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/open-on-github/branch/master) | [![Dependency Status](https://david-dm.org/atom/open-on-github.svg)](https://david-dm.org/atom/open-on-github) |
| [Package Generator](https://github.com/atom/package-generator) | [![macOS Build Status](https://travis-ci.org/atom/package-generator.svg?branch=master)](https://travis-ci.org/atom/package-generator)| [![Windows Build Status](https://ci.appveyor.com/api/projects/status/7t1i4hdmljhigp9u/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/package-generator/branch/master) | [![Dependency Status](https://david-dm.org/atom/package-generator.svg)](https://david-dm.org/atom/package-generator) |
| [Settings View](https://github.com/atom/settings-view) | [![macOS Build Status](https://travis-ci.org/atom/settings-view.svg?branch=master)](https://travis-ci.org/atom/settings-view) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/hatgxg6k2g3grafq/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/settings-view/branch/master) | [![Dependency Status](https://david-dm.org/atom/settings-view.svg)](https://david-dm.org/atom/settings-view) |
| [Snippets](https://github.com/atom/snippets) | [![macOS Build Status](https://travis-ci.org/atom/snippets.svg?branch=master)](https://travis-ci.org/atom/snippets) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/8hlc0onofkgbxw53/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/snippets/branch/master) | [![Dependency Status](https://david-dm.org/atom/snippets.svg)](https://david-dm.org/atom/snippets) |
| [Spell Check](https://github.com/atom/spell-check) | [![macOS Build Status](https://travis-ci.org/atom/spell-check.svg?branch=master)](https://travis-ci.org/atom/spell-check) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/1620a5reqw6kdolv/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/spell-check/branch/master) | [![Dependency Status](https://david-dm.org/atom/spell-check.svg)](https://david-dm.org/atom/spell-check) |
| [Status Bar](https://github.com/atom/status-bar) | [![macOS Build Status](https://travis-ci.org/atom/status-bar.svg?branch=master)](https://travis-ci.org/atom/status-bar) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/gu8tv4h6cnpeesg2/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/status-bar/branch/master) | [![Dependency Status](https://david-dm.org/atom/status-bar.svg)](https://david-dm.org/atom/status-bar) |
| [Styleguide](https://github.com/atom/styleguide) | [![macOS Build Status](https://travis-ci.org/atom/styleguide.svg?branch=master)](https://travis-ci.org/atom/styleguide) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/88dt9jxexkpindhw/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/styleguide/branch/master) | [![Dependency Status](https://david-dm.org/atom/styleguide.svg)](https://david-dm.org/atom/styleguide) |
| [Symbols View](https://github.com/atom/symbols-view) | [![macOS Build Status](https://travis-ci.org/atom/symbols-view.svg?branch=master)](https://travis-ci.org/atom/symbols-view) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/al68vtv83x49eu5d/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/symbols-view/branch/master) | [![Dependency Status](https://david-dm.org/atom/symbols-view.svg)](https://david-dm.org/atom/symbols-view) |
| [Tabs](https://github.com/atom/tabs) | [![macOS Build Status](https://travis-ci.org/atom/tabs.svg?branch=master)](https://travis-ci.org/atom/tabs) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/nf4hdmuk4i9xkfmb/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/tabs/branch/master) | [![Dependency Status](https://david-dm.org/atom/tabs.svg)](https://david-dm.org/atom/tabs) |
| [Timecop](https://github.com/atom/timecop) | [![macOS Build Status](https://travis-ci.org/atom/timecop.svg?branch=master)](https://travis-ci.org/atom/timecop) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/37fhichmvx90sd97/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/timecop/branch/master) | [![Dependency Status](https://david-dm.org/atom/timecop.svg)](https://david-dm.org/atom/timecop) |
| [Tree View](https://github.com/atom/tree-view) | [![macOS Build Status](https://travis-ci.org/atom/tree-view.svg?branch=master)](https://travis-ci.org/atom/tree-view) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/com793ehi0hajrkd/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/tree-view/branch/master) | [![Dependency Status](https://david-dm.org/atom/tree-view.svg)](https://david-dm.org/atom/tree-view) |
| [Update Package Dependencies](https://github.com/atom/update-package-dependencies) | [![macOS Build Status](https://travis-ci.org/atom/update-package-dependencies.svg?branch=master)](https://travis-ci.org/atom/update-package-dependencies) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/5xqtoc3xk1e7lt2y/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/update-package-dependencies/branch/master) | [![Dependency Status](https://david-dm.org/atom/update-package-dependencies.svg)](https://david-dm.org/atom/update-package-dependencies) |
| [Welcome](https://github.com/atom/welcome) | [![macOS Build Status](https://travis-ci.org/atom/welcome.svg?branch=master)](https://travis-ci.org/atom/welcome) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/c3ssyte35ivvnt62/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/welcome/branch/master) | [![Dependency Status](https://david-dm.org/atom/welcome.svg)](https://david-dm.org/atom/welcome) |
| [Whitespace](https://github.com/atom/whitespace) | [![macOS Build Status](https://travis-ci.org/atom/whitespace.svg?branch=master)](https://travis-ci.org/atom/whitespace) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/sf8pdb3ausdk1vtb/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/whitespace/branch/master) | [![Dependency Status](https://david-dm.org/atom/whitespace.svg)](https://david-dm.org/atom/whitespace) |
| [Wrap Guide](https://github.com/atom/wrap-guide) | [![macOS Build Status](https://travis-ci.org/atom/wrap-guide.svg?branch=master)](https://travis-ci.org/atom/wrap-guide) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/5qk1io3uar5j8hol/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/wrap-guide/branch/master) | [![Dependency Status](https://david-dm.org/atom/wrap-guide.svg)](https://david-dm.org/atom/wrap-guide) |
## Libraries
| Library | Travis | AppVeyor/Win | Dependencies |
|---------|--------|--------------|--------------|
| [Clear Cut](https://github.com/atom/clear-cut) | [![macOS Build Status](https://travis-ci.org/atom/clear-cut.svg?branch=master)](https://travis-ci.org/atom/clear-cut) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/civ54x89l06286m9/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/clear-cut/branch/master) | [![Dependency Status](https://david-dm.org/atom/clear-cut.svg)](https://david-dm.org/atom/clear-cut) |
| [Event Kit](https://github.com/atom/event-kit) | [![macOS Build Status](https://travis-ci.org/atom/event-kit.svg?branch=master)](https://travis-ci.org/atom/event-kit) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/lb32q70204lpmlxo/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/event-kit/branch/master) | [![Dependency Status](https://david-dm.org/atom/event-kit.svg)](https://david-dm.org/atom/event-kit) |
| [First Mate](https://github.com/atom/first-mate) | [![macOS Build Status](https://travis-ci.org/atom/first-mate.svg?branch=master)](https://travis-ci.org/atom/first-mate) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/p5im21uq22cwgb6d/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/first-mate) | [![Dependency Status](https://david-dm.org/atom/first-mate/status.svg)](https://david-dm.org/atom/first-mate) |
| [Fs Plus](https://github.com/atom/fs-plus) | [![macOS Build Status](https://travis-ci.org/atom/fs-plus.svg?branch=master)](https://travis-ci.org/atom/fs-plus) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/gf2tleqp0hdek3o3/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/fs-plus/branch/master) | [![Dependency Status](https://david-dm.org/atom/fs-plus.svg)](https://david-dm.org/atom/fs-plus) |
| [Grim](https://github.com/atom/grim) | [![macOS Build Status](https://travis-ci.org/atom/grim.svg)](https://travis-ci.org/atom/grim) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/i4m37pol77vygrvb/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/grim/branch/master) | [![Dependency Status](https://david-dm.org/atom/grim.svg)](https://david-dm.org/atom/grim) |
| [Jasmine Focused](https://github.com/atom/jasmine-focused) | [![macOS Build Status](https://travis-ci.org/atom/grim.svg)](https://travis-ci.org/atom/grim) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/af0ipfqqxn7aygoe/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/jasmine-focused/branch/master) | [![Dependency Status](https://david-dm.org/atom/jasmine-focused.svg)](https://david-dm.org/atom/jasmine-focused) |
| [Keyboard Layout](https://github.com/atom/keyboard-layout) | [![macOS Build Status](https://travis-ci.org/atom/keyboard-layout.svg?branch=master)](https://travis-ci.org/atom/keyboard-layout) | [![Windows Build status](https://ci.appveyor.com/api/projects/status/rk8wooeyh689apgd/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/keyboard-layout) | [![Dependency Status](https://david-dm.org/atom/keyboard-layout/status.svg)](https://david-dm.org/atom/keyboard-layout) |
| [Oniguruma](https://github.com/atom/node-oniguruma) | [![macOS Build Status](https://travis-ci.org/atom/node-oniguruma.svg?branch=master)](https://travis-ci.org/atom/node-oniguruma) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/s9twhi451ef2butr/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/node-oniguruma/branch/master) | [![Dependency Status](https://david-dm.org/atom/node-oniguruma.svg)](https://david-dm.org/atom/node-oniguruma) |
| [PathWatcher](https://github.com/atom/node-pathwatcher) | [![macOS Build Status](https://travis-ci.org/atom/node-pathwatcher.svg?branch=master)](https://travis-ci.org/atom/node-pathwatcher) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/li8dkoucdrc2ryts/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/node-pathwatcher) | [![Dependency Status](https://david-dm.org/atom/node-pathwatcher/status.svg)](https://david-dm.org/atom/node-pathwatcher) |
| [Property Accessors](https://github.com/atom/property-accessors) | [![macOS Build Status](https://travis-ci.org/atom/property-accessors.svg?branch=master)](https://travis-ci.org/atom/property-accessors) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/ww4d10hi4v5h7kbp/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/property-accessors/branch/master) | [![Dependency Status](https://david-dm.org/atom/property-accessors.svg)](https://david-dm.org/atom/property-accessors) |
| [Season](https://github.com/atom/season) | [![macOS Build Status](https://travis-ci.org/atom/season.svg?branch=master)](https://travis-ci.org/atom/season) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/v3bth3ooq5q8k8lx/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/season) | [![Dependency Status](https://david-dm.org/atom/season.svg)](https://david-dm.org/atom/season) |
| [Superstring](https://github.com/atom/superstring) | [![macOS Build Status](https://travis-ci.org/atom/superstring.svg?branch=master)](https://travis-ci.org/atom/superstring) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/n5pack4yk7w80fso/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/superstring/branch/master) | | [![Dependency Status](https://david-dm.org/atom/superstring.svg)](https://david-dm.org/atom/superstring) |
| [TextBuffer](https://github.com/atom/text-buffer) | [![macOS Build Status](https://travis-ci.org/atom/text-buffer.svg?branch=master)](https://travis-ci.org/atom/text-buffer) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/48xl8do1sm2thf5p/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/text-buffer/branch/master) | [![Dependency Status](https://david-dm.org/atom/text-buffer.svg)](https://david-dm.org/atom/text-buffer) |
| [Underscore-Plus](https://github.com/atom/underscore-plus) | [![macOS Build Status](https://travis-ci.org/atom/underscore-plus.svg?branch=master)](https://travis-ci.org/atom/underscore-plus) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/c7l8009vgpaojxcd/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/underscore-plus/branch/master) | [![Dependency Status](https://david-dm.org/atom/underscore-plus.svg)](https://david-dm.org/atom/underscore-plus) |
## Tools
| Language | Travis | AppVeyor/Win | Dependencies |
|----------|--------|--------------|--------------|
| [AtomDoc](https://github.com/atom/atomdoc) | [![macOS Build Status](https://travis-ci.org/atom/atomdoc.svg?branch=master)](https://travis-ci.org/atom/atomdoc) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/chi2bmaafr3puyq2/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/atomdoc/branch/master) | [![Dependency Status](https://david-dm.org/atom/atomdoc.svg)](https://david-dm.org/atom/atomdoc)
## Languages
| Language | Travis | AppVeyor/Win |
|----------|--------|--------------|
| [C/C++](https://github.com/atom/language-c) | [![macOS Build Status](https://travis-ci.org/atom/language-c.svg?branch=master)](https://travis-ci.org/atom/language-c) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/8oy1hmp4yrij7c32/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/language-c/branch/master) |
| [C#](https://github.com/atom/language-csharp) | [![macOS Build Status](https://travis-ci.org/atom/language-csharp.svg?branch=master)](https://travis-ci.org/atom/language-csharp) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/j1as3753y5t90obn/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/language-csharp/branch/master) |
| [Clojure](https://github.com/atom/language-clojure) | [![macOS Build Status](https://travis-ci.org/atom/language-clojure.svg?branch=master)](https://travis-ci.org/atom/language-clojure) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/6kd5fs48y5hixde6/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/language-clojure/branch/master) |
| [CoffeeScript](https://github.com/atom/language-coffee-script) | [![macOS Build Status](https://travis-ci.org/atom/language-coffee-script.svg?branch=master)](https://travis-ci.org/atom/language-coffee-script) | [![Windows Build status](https://ci.appveyor.com/api/projects/status/4j9aak7iwn2f2x7a/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/language-coffee-script/branch/master) |
| [CSS](https://github.com/atom/language-css) | [![macOS Build Status](https://travis-ci.org/atom/language-css.svg?branch=master)](https://travis-ci.org/atom/language-css) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/v8rvm88dxp73ko2y/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/language-css/branch/master) |
| [Git](https://github.com/atom/language-git) | [![macOS Build Status](https://travis-ci.org/atom/language-git.svg?branch=master)](https://travis-ci.org/atom/language-git) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/481319gyrr1feo8b/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/language-git/branch/master) |
| [GitHub Flavored Markdown](https://github.com/atom/language-gfm) | [![macOS Build Status](https://travis-ci.org/atom/language-gfm.svg?branch=master)](https://travis-ci.org/atom/language-gfm) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/rpub8qjyd8lt7wai/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/language-gfm/branch/master) |
| [Go](https://github.com/atom/language-go) | [![macOS Build Status](https://travis-ci.org/atom/language-go.svg?branch=master)](https://travis-ci.org/atom/language-go) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/3fxxvv05p4hv92pn/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/language-go/branch/master) |
| [HTML](https://github.com/atom/language-html) | [![macOS Build Status](https://travis-ci.org/atom/language-html.svg?branch=master)](https://travis-ci.org/atom/language-html) | [![Windows Build status](https://ci.appveyor.com/api/projects/status/t6pk6mmdgcelfg85/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/language-html/branch/master) |
| [Hyperlink](https://github.com/atom/language-hyperlink) | [![macOS Build Status](https://travis-ci.org/atom/language-hyperlink.svg?branch=master)](https://travis-ci.org/atom/language-hyperlink) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/5tgvhph394r684l8/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/language-hyperlink/branch/master) |
| [Java](https://github.com/atom/language-java) | [![macOS Build Status](https://travis-ci.org/atom/language-java.svg?branch=master)](https://travis-ci.org/atom/language-java) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/utoftje56n9u5x4h/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/language-java/branch/master) |
| [JavaScript](https://github.com/atom/language-javascript) | [![macOS Build Status](https://travis-ci.org/atom/language-javascript.svg?branch=master)](https://travis-ci.org/atom/language-javascript) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/ktooccwna96ssiyr/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/language-javascript-dijf8/branch/master) |
| [JSON](https://github.com/atom/language-json) | [![macOS Build Status](https://travis-ci.org/atom/language-json.svg?branch=master)](https://travis-ci.org/atom/language-json) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/5rx05vhdikk6c4cl/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/language-json/branch/master) |
| [Less](https://github.com/atom/language-less) | [![macOS Build Status](https://travis-ci.org/atom/language-less.svg?branch=master)](https://travis-ci.org/atom/language-less) | [![Windows Build Sstatus](https://ci.appveyor.com/api/projects/status/aeina4fr4b0i7yay/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/language-less/branch/master) |
| [Make](https://github.com/atom/language-make) | [![macOS Build Status](https://travis-ci.org/atom/language-make.svg?branch=master)](https://travis-ci.org/atom/language-make) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/vq1aascey21wxjh7/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/language-make/branch/master) |
| [Mustache](https://github.com/atom/language-mustache) | [![macOS Build Status](https://travis-ci.org/atom/language-mustache.svg?branch=master)](https://travis-ci.org/atom/language-mustache) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/mbxnxaojqp0g7ldv/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/language-mustache/branch/master) |
| [Objective-C](https://github.com/atom/language-objective-c) | [![macOS Build Status](https://travis-ci.org/atom/language-objective-c.svg?branch=master)](https://travis-ci.org/atom/language-objective-c) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/27j8vfv5u95fjhkw/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/language-objective-c/branch/master) |
| [Perl](https://github.com/atom/language-perl) | [![macOS Build Status](https://travis-ci.org/atom/language-perl.svg?branch=master)](https://travis-ci.org/atom/language-perl) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/dfs9inkkg40hchf8/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/language-perl/branch/master) |
| [PHP](https://github.com/atom/language-php) | [![macOS Build Status](https://travis-ci.org/atom/language-php.svg?branch=master)](https://travis-ci.org/atom/language-php) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/y9h45ag4b72726jy/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/language-php/branch/master) |
| [Python](https://github.com/atom/language-python) | [![macOS Build Status](https://travis-ci.org/atom/language-python.svg?branch=master)](https://travis-ci.org/atom/language-python) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/hmxrb9jttjh41es9/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/language-python/branch/master) |
| [Ruby](https://github.com/atom/language-ruby) | [![macOS Build Status](https://travis-ci.org/atom/language-ruby.svg?branch=master)](https://travis-ci.org/atom/language-ruby) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/71as182rm1adf2br/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/language-ruby/branch/master) |
| [Ruby on Rails](https://github.com/atom/language-ruby-on-rails) | [![macOS Build Status](https://travis-ci.org/atom/language-ruby-on-rails.svg?branch=master)](https://travis-ci.org/atom/language-ruby-on-rails) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/5t4pa451fu5e0ghg/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/language-ruby-on-rails/branch/master) |
| [Sass](https://github.com/atom/language-sass) | [![macOS Build Status](https://travis-ci.org/atom/language-sass.svg?branch=master)](https://travis-ci.org/atom/language-sass) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/g7p16vainm4iuoot/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/language-sass/branch/master) |
| [ShellScript](https://github.com/atom/language-shellscript) | [![macOS Build Status](https://travis-ci.org/atom/language-shellscript.svg?branch=master)](https://travis-ci.org/atom/language-shellscript) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/p4um3lowgrg8y0ty/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/language-shellscript/branch/master) |
| [SQL](https://github.com/atom/language-sql) | [![macOS Build Status](https://travis-ci.org/atom/language-sql.svg?branch=master)](https://travis-ci.org/atom/language-sql) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/ji31ouk5ehs4jdu1/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/language-sql/branch/master) |
| [Text](https://github.com/atom/language-text) | [![macOS Build Status](https://travis-ci.org/atom/language-text.svg?branch=master)](https://travis-ci.org/atom/language-text) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/psnekekg8lon67dw/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/language-text/branch/master) |
| [TODO](https://github.com/atom/language-todo) | [![macOS Build Status](https://travis-ci.org/atom/language-todo.svg?branch=master)](https://travis-ci.org/atom/language-todo) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/gcgb9m7h146lv6qp/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/language-todo/branch/master) |
| [TOML](https://github.com/atom/language-toml) | [![macOS Build Status](https://travis-ci.org/atom/language-toml.svg?branch=master)](https://travis-ci.org/atom/language-toml) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/kohao3fjyk6xv0sc/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/language-toml/branch/master) |
| [XML](https://github.com/atom/language-xml) | [![macOS Build Status](https://travis-ci.org/atom/language-xml.svg?branch=master)](https://travis-ci.org/atom/language-xml) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/m5f6rn74a6h3q5uq/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/language-xml/branch/master) |
| [YAML](https://github/atom/language-yaml) | [![macOS Build Status](https://travis-ci.org/atom/language-yaml.svg?branch=master)](https://travis-ci.org/atom/language-yaml) | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/eaa4ql7kipgphc2n/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/language-yaml/branch/master) |

View File

@@ -4,33 +4,16 @@ FreeBSD -RELEASE 64-bit is the recommended platform.
## Requirements
* FreeBSD
* `pkg install node`
* `pkg install npm`
* `pkg install libgnome-keyring`
* `npm config set python /usr/local/bin/python2 -g` to ensure that gyp uses Python 2
* FreeBSD
* `pkg install node`
* `pkg install npm`
* `pkg install libgnome-keyring`
* `npm config set python /usr/local/bin/python2 -g` to ensure that gyp uses Python 2
## Instructions
```sh
git clone https://github.com/atom/atom
cd atom
script/build # Creates application at $TMPDIR/atom-build/Atom
sudo script/grunt install # Installs command to /usr/local/bin/atom
```
## Advanced Options
### Custom install directory
```sh
sudo script/grunt install --install-dir /install/atom/here
git clone https://github.com/atom/atom
cd atom
script/build
```
### Custom build directory
```sh
script/build --build-dir /build/atom/here
```
## Troubleshooting

View File

@@ -4,32 +4,62 @@ Ubuntu LTS 12.04 64-bit is the recommended platform.
## Requirements
* OS with 64-bit or 32-bit architecture
* C++ toolchain
* [Git](https://git-scm.com/)
* [Node.js](https://nodejs.org/en/download/) (0.10.x or above)
* [npm](https://www.npmjs.com/) v1.4.x or above (automatically bundled with Node.js)
* `npm -v` to check the version.
* `npm config set python /usr/bin/python2 -g` to ensure that gyp uses python2.
* You might need to run this command as `sudo`, depending on how you have set up [npm](https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager#ubuntu-mint-elementary-os).
* development headers for [GNOME Keyring](https://wiki.gnome.org/Projects/GnomeKeyring)
* OS with 64-bit or 32-bit architecture
* C++11 toolchain
* Git
* Node.js 6.x or later (we recommend installing it via [nvm](https://github.com/creationix/nvm))
* npm 3.10.x or later (run `npm install -g npm`)
* Ensure node-gyp uses python2 (run `npm config set python /usr/bin/python2 -g`, use `sudo` if you didn't install node via nvm)
* Development headers for [libsecret](https://wiki.gnome.org/Projects/Libsecret).
For more details, scroll down to find how to setup a specific Linux distro.
## Instructions
```sh
git clone https://github.com/atom/atom.git
cd atom
script/build
```
To also install the newly built application, use `--create-debian-package` or `--create-rpm-package` and then install the generated package via the system package manager.
### `script/build` Options
* `--compress-artifacts`: zips the generated application as `out/atom-{arch}.tar.gz`.
* `--create-debian-package`: creates a .deb package as `out/atom-{arch}.deb`
* `--create-rpm-package`: creates a .rpm package as `out/atom-{arch}.rpm`
* `--install[=dir]`: installs the application in `${dir}`; `${dir}` defaults to `/usr/local`.
### Ubuntu / Debian
* `sudo apt-get install build-essential git libgnome-keyring-dev fakeroot`
* Instructions for [Node.js](https://github.com/nodejs/node-v0.x-archive/wiki/Installing-Node.js-via-package-manager#debian-and-ubuntu-based-linux-distributions).
* Make sure the command `node` is available after Node.js installation (some systems install it as `nodejs`).
* Use `which node` to check if it is available.
* Use `sudo update-alternatives --install /usr/bin/node node /usr/bin/nodejs 10` to update it.
* Install GNOME headers and other basic prerequisites:
### Fedora / CentOS / RHEL
```sh
sudo apt-get install build-essential git libsecret-1-dev fakeroot rpm libx11-dev libxkbfile-dev
```
* `sudo dnf --assumeyes install make gcc gcc-c++ glibc-devel git-core libgnome-keyring-devel rpmdevtools`
* Instructions for [Node.js](https://github.com/nodejs/node-v0.x-archive/wiki/Installing-Node.js-via-package-manager#enterprise-linux-and-fedora).
* If `script/build` exits with an error, you may need to install a newer C++ compiler with C++11:
```sh
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-5 g++-5
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 80 --slave /usr/bin/g++ g++ /usr/bin/g++-5
sudo update-alternatives --config gcc # choose gcc-5 from the list
```
### Fedora 22+
* `sudo dnf --assumeyes install make gcc gcc-c++ glibc-devel git-core libsecret-devel rpmdevtools libX11-devel libxkbfile-devel`
### Fedora 21 / CentOS / RHEL
* `sudo yum install -y make gcc gcc-c++ glibc-devel git-core libsecret-devel rpmdevtools`
### Arch
* `sudo pacman -S --needed gconf base-devel git nodejs npm libgnome-keyring python2`
* `sudo pacman -S --needed gconf base-devel git nodejs npm libsecret python2 libx11 libxkbfile`
* `export PYTHON=/usr/bin/python2` before building Atom.
### Slackware
@@ -38,81 +68,8 @@ Ubuntu LTS 12.04 64-bit is the recommended platform.
### openSUSE
* `sudo zypper install nodejs nodejs-devel make gcc gcc-c++ glibc-devel git-core libgnome-keyring-devel rpmdevtools`
* `sudo zypper install nodejs nodejs-devel make gcc gcc-c++ glibc-devel git-core libsecret-devel rpmdevtools libX11-devel libxkbfile-devel`
## Instructions
If you have problems with permissions don't forget to prefix with `sudo`
1. Clone the Atom repository:
```sh
git clone https://github.com/atom/atom
cd atom
```
2. Checkout the latest Atom release:
```sh
git fetch -p
git checkout $(git describe --tags `git rev-list --tags --max-count=1`)
```
3. Build Atom:
```sh
script/build
```
This will create the atom application at `out/Atom`.
4. Install the `atom` and `apm` commands to `/usr/local/bin` by executing:
```sh
sudo script/grunt install
```
To use the newly installed Atom, quit and restart all running Atom instances.
5. *Optionally*, you may generate distributable packages of Atom at `out`. Currently, `.deb` and `.rpm` package types are supported, as well as a `.tar.gz` archive. To create a `.deb` package run:
```sh
script/grunt mkdeb
```
To create a `.rpm` package run
```sh
script/grunt mkrpm
```
To create a `.tar.gz` archive run
```sh
script/grunt mktar
```
## Advanced Options
### Custom build directory
```sh
script/build --build-dir /build/atom/here
```
### Custom install directory
To install to a custom location from the standard build directory:
```sh
sudo script/grunt install --install-dir /install/atom/here
```
If you customized your build directory as described above:
```sh
sudo script/grunt install --build-dir /build/atom/here --install-dir /install/atom/here
```
## Troubleshooting
@@ -141,15 +98,12 @@ See also [#2082](https://github.com/atom/atom/issues/2082).
### /usr/bin/env: node: No such file or directory
If you get this notice when attempting to `script/build`, you either do not
have Node.js installed, or node isn't identified as Node.js on your machine.
If it's the latter, entering `sudo ln -s /usr/bin/nodejs /usr/bin/node` into
your terminal may fix the issue.
#### You can also use Alternatives
On some variants (mostly Debian based distros) it's preferable for you to use
Alternatives so that changes to the binary paths can be fixed or altered easily:
If you get this notice when attempting to run any script, you either do not have
Node.js installed, or node isn't identified as Node.js on your machine. If it's
the latter, this might be caused by installing Node.js via the distro package
manager and not nvm, so entering `sudo ln -s /usr/bin/nodejs /usr/bin/node` into
your terminal may fix the issue. On some variants (mostly Debian based distros)
you can use `update-alternatives` too:
```sh
sudo update-alternatives --install /usr/bin/node node /usr/bin/nodejs 1 --slave /usr/bin/js js /usr/bin/nodejs
@@ -167,9 +121,9 @@ you need to uninstall the system version of gyp.
On Fedora you would do the following:
```sh
sudo yum remove gyp
```
```sh
sudo yum remove gyp
```
### Linux build error reports in atom/atom
* Use [this search](https://github.com/atom/atom/search?q=label%3Abuild-error+label%3Alinux&type=Issues)

View File

@@ -0,0 +1,29 @@
# macOS
## Requirements
* macOS 10.8 or later
* Node.js 6.x or later (we recommend installing it via [nvm](https://github.com/creationix/nvm))
* npm 3.10.x or later (run `npm install -g npm`)
* Command Line Tools for [Xcode](https://developer.apple.com/xcode/downloads/) (run `xcode-select --install` to install)
## Instructions
```sh
git clone https://github.com/atom/atom.git
cd atom
script/build
```
To also install the newly built application, use `script/build --install`.
### `script/build` Options
* `--code-sign`: signs the application with the GitHub certificate specified in `$ATOM_MAC_CODE_SIGNING_CERT_DOWNLOAD_URL`.
* `--compress-artifacts`: zips the generated application as `out/atom-mac.zip`.
* `--install[=dir]`: installs the application at `${dir}/Atom.app` for dev and stable versions or at `${dir}/Atom-Beta.app` for beta versions; `${dir}` defaults to `/Applications`.
## Troubleshooting
### macOS build error reports in atom/atom
* Use [this search](https://github.com/atom/atom/search?q=label%3Abuild-error+label%3Amac&type=Issues) to get a list of reports about build errors on macOS.

View File

@@ -1,25 +0,0 @@
# OS X
## Requirements
* OS X 10.8 or later
* [Node.js](https://nodejs.org/en/download/) (0.10.x or above)
* Command Line Tools for [Xcode](https://developer.apple.com/xcode/downloads/) (run `xcode-select --install` to install)
## Instructions
```sh
git clone https://github.com/atom/atom.git
cd atom
script/build # Creates application at /Applications/Atom.app
```
### `script/build` Options
* `--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`
* `--build-dir` - Build the application in this directory.
* `--verbose` - Verbose mode. A lot more information output.
## Troubleshooting
### OSX build error reports in atom/atom
* 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.

View File

@@ -2,82 +2,70 @@
## Requirements
### General
* [Node.js](https://nodejs.org/en/download/) v4.x
* [Python](https://www.python.org/downloads/) v2.7.x
* The python.exe must be available at `%SystemDrive%\Python27\python.exe`.
If it is installed elsewhere, you can create a symbolic link to the
directory containing the python.exe using:
`mklink /d %SystemDrive%\Python27 D:\elsewhere\Python27`
* Node.js 6.9.4 or later (the architecture of node available to the build system will determine whether you build 32-bit or 64-bit Atom)
* Python v2.7.x
* The python.exe must be available at `%SystemDrive%\Python27\python.exe`. If it is installed elsewhere create a symbolic link to the directory containing the python.exe using: `mklink /d %SystemDrive%\Python27 D:\elsewhere\Python27`
* 7zip (7z.exe available from the command line) - for creating distribution zip files
* Visual Studio, either:
* [Visual C++ Build Tools 2015](http://landinghub.visualstudio.com/visual-cpp-build-tools)
* [Visual Studio 2013 Update 5](https://www.visualstudio.com/en-us/downloads/download-visual-studio-vs) (Express Edition or better)
* [Visual Studio 2015](https://www.visualstudio.com/en-us/downloads/download-visual-studio-vs) (Community Edition or better)
### Visual Studio
You can use either:
* [Visual Studio 2013 Update 5](https://www.visualstudio.com/en-us/downloads/download-visual-studio-vs) (Express or better) on Windows 7, 8 or 10
* [Visual Studio 2015](https://www.visualstudio.com/en-us/downloads/download-visual-studio-vs) (Community or better) with Windows 8 or 10
Whichever version you use, ensure that:
* The default installation folder is chosen so the build tools can find it
* Visual C++ support is installed
* A `git` command is in your path
* If you have both VS2013 and VS2015 installed set the `GYP_MSVS_VERSION` environment variable to the Visual Studio version (`2013` or `2015`) you wish to use, e.g. ``[Environment]::SetEnvironmentVariable("GYP_MSVS_VERSION", "2015", "User")`` in PowerShell or set it in Windows advanced system settings control panel.
Also ensure that:
* The default installation folder is chosen so the build tools can find it
* If using Visual Studio make sure Visual C++ support is selected/installed
* If using Visual C++ Build Tools make sure Windows 8 SDK is selected/installed
* A `git` command is in your path
* Set the `GYP_MSVS_VERSION` environment variable to the Visual Studio/Build Tools version (`2013` or `2015`) e.g. ``[Environment]::SetEnvironmentVariable("GYP_MSVS_VERSION", "2015", "User")`` in PowerShell (or set it in Windows advanced system settings).
## Instructions
You can run these commands using Command Prompt, PowerShell or Git Shell via [GitHub Desktop](https://desktop.github.com/). These instructions will assume the use of Bash from Git Shell - if you are using Command Prompt use a backslash instead: i.e. `script\build`.
You can run these commands using Command Prompt, PowerShell, Git Shell, or any other terminal. These instructions will assume the use of Command Prompt.
```bash
```
cd C:\
git clone https://github.com/atom/atom/
git clone https://github.com/atom/atom.git
cd atom
script/build
script\build
```
This will create the Atom application in the `out\Atom` folder as well as copy it to a subfolder of your user profile (e.g. `c:\Users\Bob`) called `AppData\Local\atom\app-dev`.
### `script/build` Options
* `--install-dir` - Creates the final built application in this directory. Example (trailing slash is optional):
To also install the newly built application, use `script\build --create-windows-installer` and launch the generated installers.
### `script\build` Options
* `--code-sign`: signs the application with the GitHub certificate specified in `$WIN_P12KEY_URL`.
* `--compress-artifacts`: zips the generated application as `out\atom-windows.zip` (requires [7-Zip](http://www.7-zip.org)).
* `--create-windows-installer`: creates an `.msi`, an `.exe` and two `.nupkg` packages in the `out` directory.
* `--install[=dir]`: installs the application in `${dir}\Atom\app-dev`; `${dir}` defaults to `%LOCALAPPDATA%`.
### Running tests
In order to run tests from command line you need `apm`, available after you install Atom or after you build from source. If you installed it, run the following commands (assuming `C:\atom` is the root of your Atom repository):
```bash
./script/build --install-dir Z:\Some\Destination\Directory\
cd C:\atom
apm test
```
* `--build-dir` - Build the application in this directory. Example (trailing slash is optional):
```bash
./script/build --build-dir Z:\Some\Temporary\Directory\
```
* `--no-install` - Skips the installation task after building.
* `--verbose` - Verbose mode. A lot more information output.
## Do I have to use GitHub Desktop?
When building Atom from source, the `apm` command is not added to the system path by default. In this case, you can either add it yourself or explicitly list the complete path in previous commands. The default install location is `%LOCALAPPDATA%\Atom\app-dev\resources\cli\`.
No, you can use your existing Git! GitHub Desktop's Git Shell is just easier to set up.
If you _prefer_ using your existing Git installation, make sure git's cmd directory is in your PATH env variable (e.g. `C:\Program Files (x86)\Git\cmd`) before you open your PowerShell or Command Prompt.
It is also recommended you open your Command Prompt or PowerShell as Administrator.
If none of this works, do install Github Desktop and use its Git Shell as it makes life easier.
**NOTE**: Please keep in mind that there are still some tests that don't pass on Windows.
## Troubleshooting
### Common Errors
* `node is not recognized`
* If you just installed Node.js, you'll need to restart your PowerShell/Command Prompt/Git Shell before the node
command is available on your Path.
* If you just installed Node.js, you'll need to restart Command Prompt before the `node` command is available on your path.
* `msbuild.exe failed with exit code: 1`
* Ensure you have Visual C++ support installed. Go into Add/Remove Programs, select Visual Studio and press Modify and then check the Visual C++ box.
* If using **Visual Studio**, ensure you have the **Visual C++** component installed. Go into Add/Remove Programs, select Visual Studio, press Modify, and then check the Visual C++ box.
* If using **Visual C++ Build Tools**, ensure you have the **Windows 8 SDK** component installed. Go into Add/Remove Programs, select Visual C++ Build Tools, press Modify and then check the Windows 8 SDK box.
* `script/build` stops with no error or warning shortly after displaying the versions of node, npm and Python
* Make sure that the path where you have checked out Atom does not include a space. e.g. use `c:\atom` and not `c:\my stuff\atom`
* `script/build` outputs only the Node.js and Python versions before returning
* Try moving the repository to `C:\atom`. Most likely, the path is too long.
See [issue #2200](https://github.com/atom/atom/issues/2200).
* `script\build` stops with no error or warning shortly after displaying the versions of node, npm and Python
* Make sure that the path where you have checked out Atom does not include a space. For example, use `C:\atom` instead of `C:\my stuff\atom`.
* Try moving the repository to `C:\atom`. Most likely, the path is too long. See [issue #2200](https://github.com/atom/atom/issues/2200).
* `error MSB4025: The project file could not be loaded. Invalid character in the given encoding.`
* This can occur because your home directory (`%USERPROFILE%`) has non-ASCII
characters in it. This is a bug in [gyp](https://code.google.com/p/gyp/)
* This can occur because your home directory (`%USERPROFILE%`) has non-ASCII characters in it. This is a bug in [gyp](https://code.google.com/p/gyp/)
which is used to build native Node.js modules and there is no known workaround.
* https://github.com/TooTallNate/node-gyp/issues/297
* https://code.google.com/p/gyp/issues/detail?id=393
@@ -85,15 +73,18 @@ If none of this works, do install Github Desktop and use its Git Shell as it mak
* `'node_modules\.bin\npm' is not recognized as an internal or external command, operable program or batch file.`
* This occurs if the previous build left things in a bad state. Run `script\clean` and then `script\build` again.
* `script/build` stops at installing runas with `Failed at the runas@x.y.z install script.`
* `script\build` stops at installing runas with `Failed at the runas@x.y.z install script.`
* See the next item.
* `error MSB8020: The build tools for Visual Studio 201? (Platform Toolset = 'v1?0') cannot be found.`
* If you're building Atom with Visual Studio 2013 try setting the `GYP_MSVS_VERSION` environment variable to 2013 and then `script/clean` followed by `script/build` (re-open your command prompt or Powershell window if you set it using the GUI)
* Try setting the `GYP_MSVS_VERSION` environment variable to **2013** or **2015** depending on what version of Visual Studio/Build Tools is installed and then `script\clean` followed by `script\build` (re-open the Command Prompt if you set the variable using the GUI).
* `'node-gyp' is not recognized as an internal or external command, operable program or batch file.`
* Try running `npm install -g node-gyp`, and run `script\build` again.
* Other `node-gyp` errors on first build attempt, even though the right Node.js and Python versions are installed.
* Do try the build command one more time, as experience shows it often works on second try in many of these cases.
* Do try the build command one more time as experience shows it often works on second try in many cases.
### Windows build error reports in atom/atom
* If all fails, use [this search](https://github.com/atom/atom/search?q=label%3Abuild-error+label%3Awindows&type=Issues) to get a list of reports about build errors on Windows, and see if yours has already been reported.
* If it hasn't, please open a new issue with your Windows version, architecture (x86 or amd64), and a screenshot of your build output, including the Node.js and Python versions.
* If it hasn't, please open a new issue with your Windows version, architecture (x86 or x64), and a screenshot of your build output, including the Node.js and Python versions.

View File

@@ -1,4 +1,4 @@
# Profiling the Atom Render Process on OS X with Instruments
# Profiling the Atom Render Process on macOS with Instruments
![Instruments](https://cloud.githubusercontent.com/assets/1789/14193295/d503db7a-f760-11e5-88bf-fe417c0cd913.png)
@@ -6,7 +6,7 @@
* Open the dev tools with `alt-cmd-i`
* Evaluate `process.versions.electron` in the console.
* Based on this version, download the appropriate Electron symbols from the [releases](https://github.com/atom/electron/releases) page.
* The file name should look like `electron-v0.X.Y-darwin-x64-dsym.zip`.
* The file name should look like `electron-v1.X.Y-darwin-x64-dsym.zip`.
* Decompress these symbols in your `~/Downloads` directory.
* Now create a time profile in Instruments.
* Open `Instruments.app`.

1
dot-atom/.gitignore vendored
View File

@@ -2,5 +2,6 @@ blob-store
compile-cache
dev
storage
.apm
.node-gyp
.npm

View File

@@ -18,15 +18,15 @@
# 'ctrl-p': 'core:move-down'
#
# You can find more information about keymaps in these guides:
# * http://flight-manual.atom.io/using-atom/sections/basic-customization/#_customizing_keybindings
# * http://flight-manual.atom.io/using-atom/sections/basic-customization/#customizing-keybindings
# * http://flight-manual.atom.io/behind-atom/sections/keymaps-in-depth/
#
# If you're having trouble with your keybindings not working, try the
# Keybinding Resolver: `Cmd+.` on OS X and `Ctrl+.` on other platforms. See the
# Keybinding Resolver: `Cmd+.` on macOS and `Ctrl+.` on other platforms. See the
# Debugging Guide for more information:
# * http://flight-manual.atom.io/hacking-atom/sections/debugging/#check-the-keybindings
#
# This file uses CoffeeScript Object Notation (CSON).
# If you are unfamiliar with CSON, you can read more about it in the
# Atom Flight Manual:
# http://flight-manual.atom.io/using-atom/sections/basic-customization/#_cson
# http://flight-manual.atom.io/using-atom/sections/basic-customization/#configuring-with-cson

View File

@@ -26,7 +26,7 @@ atom-text-editor {
// background-color: hsl(180, 24%, 12%);
}
// To style other content in the text editor's shadow DOM, use the ::shadow expression
atom-text-editor::shadow .cursor {
// style UI elements inside atom-text-editor
atom-text-editor .cursor {
// border-color: red;
}

View File

@@ -1,41 +0,0 @@
TextBuffer = require 'text-buffer'
{Point, Range} = TextBuffer
{File, Directory} = require 'pathwatcher'
{Emitter, Disposable, CompositeDisposable} = require 'event-kit'
Grim = require 'grim'
module.exports =
BufferedNodeProcess: require '../src/buffered-node-process'
BufferedProcess: require '../src/buffered-process'
GitRepository: require '../src/git-repository'
GitRepositoryAsync: require '../src/git-repository-async'
Notification: require '../src/notification'
TextBuffer: TextBuffer
Point: Point
Range: Range
File: File
Directory: Directory
Emitter: Emitter
Disposable: Disposable
CompositeDisposable: CompositeDisposable
# The following classes can't be used from a Task handler and should therefore
# only be exported when not running as a child node process
unless process.env.ATOM_SHELL_INTERNAL_RUN_AS_NODE
module.exports.Task = require '../src/task'
TextEditor = (params) ->
atom.workspace.buildTextEditor(params)
TextEditor.prototype = require('../src/text-editor').prototype
Object.defineProperty module.exports, 'TextEditor',
enumerable: true
get: ->
Grim.deprecate """
The `TextEditor` constructor is no longer public.
To construct a text editor, use `atom.workspace.buildTextEditor()`.
To check if an object is a text editor, use `atom.workspace.isTextEditor(object)`.
"""
TextEditor

45
exports/atom.js Normal file
View File

@@ -0,0 +1,45 @@
/** @babel */
import TextBuffer, {Point, Range} from 'text-buffer'
import {File, Directory} from 'pathwatcher'
import {Emitter, Disposable, CompositeDisposable} from 'event-kit'
import BufferedNodeProcess from '../src/buffered-node-process'
import BufferedProcess from '../src/buffered-process'
import GitRepository from '../src/git-repository'
import Notification from '../src/notification'
import {watchPath} from '../src/path-watcher'
const atomExport = {
BufferedNodeProcess,
BufferedProcess,
GitRepository,
Notification,
TextBuffer,
Point,
Range,
File,
Directory,
Emitter,
Disposable,
CompositeDisposable,
watchPath
}
// Shell integration is required by both Squirrel and Settings-View
if (process.platform === 'win32') {
Object.defineProperty(atomExport, 'WinShell', {
enumerable: true,
get () {
return require('../src/main-process/win-shell')
}
})
}
// The following classes can't be used from a Task handler and should therefore
// only be exported when not running as a child node process
if (process.type === 'renderer') {
atomExport.Task = require('../src/task')
atomExport.TextEditor = require('../src/text-editor')
}
export default atomExport

7
exports/clipboard.js Normal file
View File

@@ -0,0 +1,7 @@
module.exports = require('electron').clipboard
const Grim = require('grim')
Grim.deprecate('Use `require("electron").clipboard` instead of `require("clipboard")`')
// Ensure each package that requires this shim causes a deprecation warning
delete require.cache[__filename]

7
exports/ipc.js Normal file
View File

@@ -0,0 +1,7 @@
module.exports = require('electron').ipcRenderer
const Grim = require('grim')
Grim.deprecate('Use `require("electron").ipcRenderer` instead of `require("ipc")`')
// Ensure each package that requires this shim causes a deprecation warning
delete require.cache[__filename]

7
exports/remote.js Normal file
View File

@@ -0,0 +1,7 @@
module.exports = require('electron').remote
const Grim = require('grim')
Grim.deprecate('Use `require("electron").remote` instead of `require("remote")`')
// Ensure each package that requires this shim causes a deprecation warning
delete require.cache[__filename]

7
exports/shell.js Normal file
View File

@@ -0,0 +1,7 @@
module.exports = require('electron').shell
const Grim = require('grim')
Grim.deprecate('Use `require("electron").shell` instead of `require("shell")`')
// Ensure each package that requires this shim causes a deprecation warning
delete require.cache[__filename]

7
exports/web-frame.js Normal file
View File

@@ -0,0 +1,7 @@
module.exports = require('electron').webFrame
const Grim = require('grim')
Grim.deprecate('Use `require("electron").webFrame` instead of `require("web-frame")`')
// Ensure each package that requires this shim causes a deprecation warning
delete require.cache[__filename]

View File

@@ -7,13 +7,13 @@
'atom-text-editor:not([mini])':
# Atom Specific
'ctrl-C': 'editor:copy-path'
'ctrl-shift-c': 'editor:copy-path'
# Sublime Parity
'tab': 'editor:indent'
'enter': 'editor:newline'
'shift-tab': 'editor:outdent-selected-rows'
'ctrl-K': 'editor:delete-line'
'ctrl-shift-k': 'editor:delete-line'
'.select-list atom-text-editor[mini]':
'enter': 'core:confirm'
@@ -24,7 +24,7 @@
'atom-text-editor !important, atom-text-editor[mini] !important':
'escape': 'editor:consolidate-selections'
# allow standard input fields to work correctly
# Allow standard input fields to work correctly
'body .native-key-bindings':
'tab': 'core:focus-next'
'shift-tab': 'core:focus-previous'
@@ -66,7 +66,7 @@
'ctrl-shift-right': 'native!'
'ctrl-b': 'native!'
'ctrl-f': 'native!'
'ctrl-F': 'native!'
'ctrl-B': 'native!'
'ctrl-shift-f': 'native!'
'ctrl-shift-b': 'native!'
'ctrl-h': 'native!'
'ctrl-d': 'native!'

View File

@@ -10,10 +10,10 @@
'ctrl-n': 'core:move-down'
'ctrl-b': 'core:move-left'
'ctrl-f': 'core:move-right'
'ctrl-P': 'core:select-up'
'ctrl-N': 'core:select-down'
'ctrl-F': 'core:select-right'
'ctrl-B': 'core:select-left'
'ctrl-shift-p': 'core:select-up'
'ctrl-shift-n': 'core:select-down'
'ctrl-shift-f': 'core:select-right'
'ctrl-shift-b': 'core:select-left'
'ctrl-h': 'core:backspace'
'ctrl-d': 'core:delete'
@@ -34,19 +34,19 @@
# Sublime Parity
'cmd-,': 'application:show-settings'
'cmd-N': 'application:new-window'
'cmd-W': 'window:close'
'cmd-shift-n': 'application:new-window'
'cmd-shift-w': 'window:close'
'cmd-o': 'application:open'
'cmd-O': 'application:add-project-folder'
'cmd-T': 'pane:reopen-closed-item'
'cmd-shift-o': 'application:add-project-folder'
'cmd-shift-t': 'pane:reopen-closed-item'
'cmd-n': 'application:new-file'
'cmd-s': 'core:save'
'cmd-S': 'core:save-as'
'cmd-shift-s': 'core:save-as'
'cmd-alt-s': 'window:save-all'
'cmd-w': 'core:close'
'cmd-ctrl-f': 'window:toggle-full-screen'
'cmd-z': 'core:undo'
'cmd-Z': 'core:redo'
'cmd-shift-z': 'core:redo'
'cmd-y': 'core:redo'
'cmd-x': 'core:cut'
'cmd-c': 'core:copy'
@@ -116,8 +116,8 @@
'cmd-backspace': 'editor:delete-to-beginning-of-line'
'cmd-shift-backspace': 'editor:delete-to-beginning-of-line'
'cmd-delete': 'editor:delete-to-end-of-line'
'ctrl-A': 'editor:select-to-first-character-of-line'
'ctrl-E': 'editor:select-to-end-of-line'
'ctrl-shift-a': 'editor:select-to-first-character-of-line'
'ctrl-shift-e': 'editor:select-to-end-of-line'
'cmd-left': 'editor:move-to-first-character-of-line'
'cmd-right': 'editor:move-to-end-of-screen-line'
'cmd-shift-left': 'editor:select-to-first-character-of-line'
@@ -129,10 +129,24 @@
'ctrl-k': 'editor:cut-to-end-of-line'
# Atom Specific
'ctrl-W': 'editor:select-word'
'ctrl-shift-w': 'editor:select-word'
'cmd-ctrl-left': 'editor:move-selection-left'
'cmd-ctrl-right': 'editor:move-selection-right'
# Emacs
'alt-f': 'editor:move-to-end-of-word'
'alt-ctrl-f': 'editor:move-to-next-subword-boundary'
'alt-shift-f': 'editor:select-to-end-of-word'
'alt-ctrl-shift-f': 'editor:select-to-next-subword-boundary'
'alt-b': 'editor:move-to-beginning-of-word'
'alt-ctrl-b': 'editor:move-to-previous-subword-boundary'
'alt-shift-b': 'editor:select-to-beginning-of-word'
'alt-ctrl-shift-b': 'editor:select-to-previous-subword-boundary'
'alt-h': 'editor:delete-to-beginning-of-word'
'alt-ctrl-h': 'editor:delete-to-beginning-of-subword'
'alt-d': 'editor:delete-to-end-of-word'
'alt-ctrl-d': 'editor:delete-to-end-of-subword'
# Sublime Parity
'cmd-a': 'core:select-all'
'cmd-alt-p': 'editor:log-cursor-scope'
@@ -164,8 +178,8 @@
'ctrl-cmd-down': 'editor:move-line-down'
'cmd-/': 'editor:toggle-line-comments'
'cmd-j': 'editor:join-lines'
'cmd-D': 'editor:duplicate-lines'
'cmd-L': 'editor:split-selections-into-lines'
'cmd-shift-d': 'editor:duplicate-lines'
'cmd-shift-l': 'editor:split-selections-into-lines'
'ctrl-shift-up': 'editor:add-selection-above'
'ctrl-shift-down': 'editor:add-selection-below'
@@ -188,10 +202,10 @@
'cmd-alt-=': 'pane:increase-size'
'cmd-alt--': 'pane:decrease-size'
# allow standard input fields to work correctly
# Allow standard input fields to work correctly
'body .native-key-bindings':
'cmd-z': 'native!'
'cmd-Z': 'native!'
'cmd-shift-z': 'native!'
'cmd-x': 'native!'
'cmd-c': 'native!'
'cmd-v': 'native!'

View File

@@ -1,13 +0,0 @@
'atom-text-editor':
'alt-f': 'editor:move-to-end-of-word'
'alt-ctrl-f': 'editor:move-to-next-subword-boundary'
'alt-F': 'editor:select-to-end-of-word'
'alt-ctrl-F': 'editor:select-to-next-subword-boundary'
'alt-b': 'editor:move-to-beginning-of-word'
'alt-ctrl-b': 'editor:move-to-previous-subword-boundary'
'alt-B': 'editor:select-to-beginning-of-word'
'alt-ctrl-B': 'editor:select-to-previous-subword-boundary'
'alt-h': 'editor:delete-to-beginning-of-word'
'alt-ctrl-h': 'editor:delete-to-beginning-of-subword'
'alt-d': 'editor:delete-to-end-of-word'
'alt-ctrl-d': 'editor:delete-to-end-of-subword'

View File

@@ -6,11 +6,11 @@
'down': 'core:move-down'
'left': 'core:move-left'
'right': 'core:move-right'
'ctrl-alt-r': 'window:reload'
'ctrl-shift-f5': 'window:reload'
'ctrl-shift-i': 'window:toggle-dev-tools'
'ctrl-alt-p': 'window:run-package-specs'
'ctrl-shift-y': 'window:run-package-specs'
'ctrl-shift-o': 'application:open-folder'
'ctrl-alt-o': 'application:add-project-folder'
'ctrl-shift-a': 'application:add-project-folder'
'ctrl-shift-pageup': 'pane:move-item-left'
'ctrl-shift-pagedown': 'pane:move-item-right'
'f11': 'window:toggle-full-screen'
@@ -19,14 +19,14 @@
# Sublime Parity
'ctrl-,': 'application:show-settings'
'ctrl-N': 'application:new-window'
'ctrl-W': 'window:close'
'ctrl-shift-n': 'application:new-window'
'ctrl-shift-w': 'window:close'
'ctrl-o': 'application:open-file'
'ctrl-q': 'application:quit'
'ctrl-T': 'pane:reopen-closed-item'
'ctrl-shift-t': 'pane:reopen-closed-item'
'ctrl-n': 'application:new-file'
'ctrl-s': 'core:save'
'ctrl-S': 'core:save-as'
'ctrl-shift-s': 'core:save-as'
'ctrl-f4': 'core:close'
'ctrl-w': 'core:close'
'ctrl-z': 'core:undo'
@@ -70,12 +70,12 @@
'ctrl-k left': 'pane:split-left-and-copy-active-item' # Atom Specific
'ctrl-k right': 'pane:split-right-and-copy-active-item' # Atom Specific
'ctrl-k ctrl-w': 'pane:close' # Atom Specific
'ctrl-k alt-ctrl-w': 'pane:close-other-items' # Atom Specific
'ctrl-k ctrl-alt-w': 'pane:close-other-items' # Atom Specific
'ctrl-k ctrl-p': 'window:focus-previous-pane'
'ctrl-k ctrl-n': 'window:focus-next-pane'
'ctrl-k ctrl-up': 'window:focus-pane-above'
'ctrl-k ctrl-down': 'window:focus-pane-below'
'ctrl-k ctrl-left': 'window:focus-pane-on-left'
'ctrl-k ctrl-up': 'window:focus-pane-above'
'ctrl-k ctrl-down': 'window:focus-pane-below'
'ctrl-k ctrl-left': 'window:focus-pane-on-left'
'ctrl-k ctrl-right': 'window:focus-pane-on-right'
'alt-1': 'pane:show-item-1'
'alt-2': 'pane:show-item-2'
@@ -108,16 +108,14 @@
# Sublime Parity
'ctrl-a': 'core:select-all'
'ctrl-alt-shift-p': 'editor:log-cursor-scope'
'ctrl-k ctrl-u': 'editor:upper-case'
'ctrl-k ctrl-l': 'editor:lower-case'
'ctrl-l': 'editor:select-line'
'atom-workspace atom-text-editor:not([mini])':
# Atom specific
'alt-ctrl-z': 'editor:checkout-head-revision'
'ctrl-<': 'editor:scroll-to-cursor'
'alt-ctrl-f': 'editor:fold-selection'
'ctrl-alt-shift-[': 'editor:fold-selection'
# Sublime Parity
'ctrl-enter': 'editor:newline-below'
@@ -128,7 +126,7 @@
'ctrl-down': 'editor:move-line-down'
'ctrl-/': 'editor:toggle-line-comments'
'ctrl-j': 'editor:join-lines'
'ctrl-D': 'editor:duplicate-lines'
'ctrl-shift-d': 'editor:duplicate-lines'
'alt-shift-up': 'editor:add-selection-above'
'alt-shift-down': 'editor:add-selection-below'
@@ -151,10 +149,10 @@
'ctrl-alt-=': 'pane:increase-size'
'ctrl-alt--': 'pane:decrease-size'
# allow standard input fields to work correctly
# Allow standard input fields to work correctly
'body .native-key-bindings':
'ctrl-z': 'native!'
'ctrl-Z': 'native!'
'ctrl-shift-z': 'native!'
'ctrl-x': 'native!'
'ctrl-c': 'native!'
'ctrl-v': 'native!'

View File

@@ -12,11 +12,11 @@
'ctrl-down': 'core:move-down'
'left': 'core:move-left'
'right': 'core:move-right'
'ctrl-alt-r': 'window:reload'
'ctrl-alt-i': 'window:toggle-dev-tools'
'ctrl-alt-p': 'window:run-package-specs'
'ctrl-shift-f5': 'window:reload'
'ctrl-shift-i': 'window:toggle-dev-tools'
'ctrl-shift-y': 'window:run-package-specs'
'ctrl-shift-o': 'application:open-folder'
'ctrl-alt-o': 'application:add-project-folder'
'ctrl-shift-a': 'application:add-project-folder'
'ctrl-shift-left': 'pane:move-item-left'
'ctrl-shift-right': 'pane:move-item-right'
'f11': 'window:toggle-full-screen'
@@ -25,13 +25,13 @@
# Sublime Parity
'ctrl-,': 'application:show-settings'
'ctrl-N': 'application:new-window'
'ctrl-W': 'window:close'
'ctrl-shift-n': 'application:new-window'
'ctrl-shift-w': 'window:close'
'ctrl-o': 'application:open-file'
'ctrl-T': 'pane:reopen-closed-item'
'ctrl-shift-t': 'pane:reopen-closed-item'
'ctrl-n': 'application:new-file'
'ctrl-s': 'core:save'
'ctrl-S': 'core:save-as'
'ctrl-shift-s': 'core:save-as'
'ctrl-f4': 'core:close'
'ctrl-w': 'core:close'
'ctrl-z': 'core:undo'
@@ -75,12 +75,12 @@
'ctrl-k left': 'pane:split-left-and-copy-active-item' # Atom Specific
'ctrl-k right': 'pane:split-right-and-copy-active-item' # Atom Specific
'ctrl-k ctrl-w': 'pane:close' # Atom Specific
'ctrl-k alt-ctrl-w': 'pane:close-other-items' # Atom Specific
'ctrl-k ctrl-alt-w': 'pane:close-other-items' # Atom Specific
'ctrl-k ctrl-p': 'window:focus-previous-pane'
'ctrl-k ctrl-n': 'window:focus-next-pane'
'ctrl-k ctrl-up': 'window:focus-pane-above'
'ctrl-k ctrl-down': 'window:focus-pane-below'
'ctrl-k ctrl-left': 'window:focus-pane-on-left'
'ctrl-k ctrl-up': 'window:focus-pane-above'
'ctrl-k ctrl-down': 'window:focus-pane-below'
'ctrl-k ctrl-left': 'window:focus-pane-on-left'
'ctrl-k ctrl-right': 'window:focus-pane-on-right'
'alt-1': 'pane:show-item-1'
'alt-2': 'pane:show-item-2'
@@ -113,16 +113,14 @@
# Sublime Parity
'ctrl-a': 'core:select-all'
'ctrl-alt-shift-p': 'editor:log-cursor-scope'
'ctrl-k ctrl-u': 'editor:upper-case'
'ctrl-k ctrl-l': 'editor:lower-case'
'ctrl-l': 'editor:select-line'
'atom-workspace atom-text-editor:not([mini])':
# Atom specific
'alt-ctrl-z': 'editor:checkout-head-revision'
'ctrl-<': 'editor:scroll-to-cursor'
'alt-ctrl-f': 'editor:fold-selection'
'ctrl-alt-shift-[': 'editor:fold-selection'
# Sublime Parity
'ctrl-enter': 'editor:newline-below'
@@ -133,7 +131,7 @@
'ctrl-down': 'editor:move-line-down'
'ctrl-/': 'editor:toggle-line-comments'
'ctrl-j': 'editor:join-lines'
'ctrl-D': 'editor:duplicate-lines'
'ctrl-shift-d': 'editor:duplicate-lines'
'ctrl-alt-[': 'editor:fold-current-row'
'ctrl-alt-]': 'editor:unfold-current-row'
@@ -154,10 +152,10 @@
'ctrl-alt-=': 'pane:increase-size'
'ctrl-alt--': 'pane:decrease-size'
# allow standard input fields to work correctly
# Allow standard input fields to work correctly
'body .native-key-bindings':
'ctrl-z': 'native!'
'ctrl-Z': 'native!'
'ctrl-shift-z': 'native!'
'ctrl-x': 'native!'
'ctrl-c': 'native!'
'ctrl-v': 'native!'

View File

@@ -36,6 +36,13 @@
{ label: 'New File', command: 'application:new-file' }
{ label: 'Open…', command: 'application:open' }
{ label: 'Add Project Folder…', command: 'application:add-project-folder' }
{
label: 'Reopen Project',
submenu: [
{ label: 'Clear Project History', command: 'application:clear-project-history' }
{ type: 'separator' }
]
}
{ label: 'Reopen Last Item', command: 'pane:reopen-closed-item' }
{ type: 'separator' }
{ label: 'Save', command: 'core:save' }
@@ -101,9 +108,9 @@
submenu: [
{ label: 'Fold', command: 'editor:fold-current-row' }
{ label: 'Unfold', command: 'editor:unfold-current-row' }
{ label: 'Fold All', command: 'editor:fold-all' }
{ label: 'Unfold All', command: 'editor:unfold-all' }
{ type: 'separator' }
{ label: 'Fold All', command: 'editor:fold-all' }
{ label: 'Fold Level 1', command: 'editor:fold-at-indent-level-1' }
{ label: 'Fold Level 2', command: 'editor:fold-at-indent-level-2' }
{ label: 'Fold Level 3', command: 'editor:fold-at-indent-level-3' }
@@ -125,10 +132,10 @@
{
label: 'Panes'
submenu: [
{ label: 'Split Up', command: 'pane:split-up' }
{ label: 'Split Down', command: 'pane:split-down' }
{ label: 'Split Left', command: 'pane:split-left' }
{ label: 'Split Right', command: 'pane:split-right' }
{ label: 'Split Up', command: 'pane:split-up-and-copy-active-item' }
{ label: 'Split Down', command: 'pane:split-down-and-copy-active-item' }
{ label: 'Split Left', command: 'pane:split-left-and-copy-active-item' }
{ label: 'Split Right', command: 'pane:split-right-and-copy-active-item' }
{ type: 'separator' }
{ label: 'Focus Next Pane', command: 'window:focus-next-pane' }
{ label: 'Focus Previous Pane', command: 'window:focus-previous-pane' }
@@ -147,6 +154,7 @@
{ label: 'Open In Dev Mode…', command: 'application:open-dev' }
{ label: 'Reload Window', command: 'window:reload' }
{ label: 'Run Package Specs', command: 'window:run-package-specs' }
{ label: 'Run Benchmarks', command: 'window:run-benchmarks' }
{ label: 'Toggle Developer Tools', command: 'window:toggle-dev-tools' }
]
}
@@ -237,10 +245,10 @@
]
'atom-pane': [
{type: 'separator'}
{label: 'Split Up', command: 'pane:split-up'}
{label: 'Split Down', command: 'pane:split-down'}
{label: 'Split Left', command: 'pane:split-left'}
{label: 'Split Right', command: 'pane:split-right'}
{label: 'Split Up', command: 'pane:split-up-and-copy-active-item'}
{label: 'Split Down', command: 'pane:split-down-and-copy-active-item'}
{label: 'Split Left', command: 'pane:split-left-and-copy-active-item'}
{label: 'Split Right', command: 'pane:split-right-and-copy-active-item'}
{label: 'Close Pane', command: 'pane:close'}
{type: 'separator'}
]

View File

@@ -7,6 +7,13 @@
{ label: '&Open File…', command: 'application:open-file' }
{ label: 'Open Folder…', command: 'application:open-folder' }
{ label: 'Add Project Folder…', command: 'application:add-project-folder' }
{
label: 'Reopen Project',
submenu: [
{ label: 'Clear Project History', command: 'application:clear-project-history' }
{ type: 'separator' }
]
}
{ label: 'Reopen Last &Item', command: 'pane:reopen-closed-item' }
{ type: 'separator' }
{ label: '&Save', command: 'core:save' }
@@ -74,9 +81,9 @@
submenu: [
{ label: '&Fold', command: 'editor:fold-current-row' }
{ label: '&Unfold', command: 'editor:unfold-current-row' }
{ label: 'Fol&d All', command: 'editor:fold-all' }
{ label: 'Unfold &All', command: 'editor:unfold-all' }
{ type: 'separator' }
{ label: 'Fol&d All', command: 'editor:fold-all' }
{ label: 'Fold Level 1', command: 'editor:fold-at-indent-level-1' }
{ label: 'Fold Level 2', command: 'editor:fold-at-indent-level-2' }
{ label: 'Fold Level 3', command: 'editor:fold-at-indent-level-3' }
@@ -108,10 +115,10 @@
{
label: 'Panes'
submenu: [
{ label: 'Split Up', command: 'pane:split-up' }
{ label: 'Split Down', command: 'pane:split-down' }
{ label: 'Split Left', command: 'pane:split-left' }
{ label: 'Split Right', command: 'pane:split-right' }
{ label: 'Split Up', command: 'pane:split-up-and-copy-active-item' }
{ label: 'Split Down', command: 'pane:split-down-and-copy-active-item' }
{ label: 'Split Left', command: 'pane:split-left-and-copy-active-item' }
{ label: 'Split Right', command: 'pane:split-right-and-copy-active-item' }
{ type: 'separator' }
{ label: 'Focus Next Pane', command: 'window:focus-next-pane' }
{ label: 'Focus Previous Pane', command: 'window:focus-previous-pane' }
@@ -130,6 +137,7 @@
{ label: 'Open In &Dev Mode…', command: 'application:open-dev' }
{ label: '&Reload Window', command: 'window:reload' }
{ label: 'Run Package &Specs', command: 'window:run-package-specs' }
{ label: 'Run &Benchmarks', command: 'window:run-benchmarks' }
{ label: 'Toggle Developer &Tools', command: 'window:toggle-dev-tools' }
]
}
@@ -213,10 +221,10 @@
]
'atom-pane': [
{type: 'separator'}
{label: 'Split Up', command: 'pane:split-up'}
{label: 'Split Down', command: 'pane:split-down'}
{label: 'Split Left', command: 'pane:split-left'}
{label: 'Split Right', command: 'pane:split-right'}
{label: 'Split Up', command: 'pane:split-up-and-copy-active-item'}
{label: 'Split Down', command: 'pane:split-down-and-copy-active-item'}
{label: 'Split Left', command: 'pane:split-left-and-copy-active-item'}
{label: 'Split Right', command: 'pane:split-right-and-copy-active-item'}
{label: 'Close Pane', command: 'pane:close'}
{type: 'separator'}
]

View File

@@ -7,6 +7,13 @@
{ label: '&Open File…', command: 'application:open-file' }
{ label: 'Open Folder…', command: 'application:open-folder' }
{ label: 'Add Project Folder…', command: 'application:add-project-folder' }
{
label: 'Reopen Project',
submenu: [
{ label: 'Clear Project History', command: 'application:clear-project-history' }
{ type: 'separator' }
]
}
{ label: 'Reopen Last &Item', command: 'pane:reopen-closed-item' }
{ type: 'separator' }
{ label: 'Se&ttings', command: 'application:show-settings' }
@@ -82,9 +89,9 @@
submenu: [
{ label: '&Fold', command: 'editor:fold-current-row' }
{ label: '&Unfold', command: 'editor:unfold-current-row' }
{ label: 'Fol&d All', command: 'editor:fold-all' }
{ label: 'Unfold &All', command: 'editor:unfold-all' }
{ type: 'separator' }
{ label: 'Fol&d All', command: 'editor:fold-all' }
{ label: 'Fold Level 1', command: 'editor:fold-at-indent-level-1' }
{ label: 'Fold Level 2', command: 'editor:fold-at-indent-level-2' }
{ label: 'Fold Level 3', command: 'editor:fold-at-indent-level-3' }
@@ -107,10 +114,10 @@
{
label: 'Panes'
submenu: [
{ label: 'Split Up', command: 'pane:split-up' }
{ label: 'Split Down', command: 'pane:split-down' }
{ label: 'Split Left', command: 'pane:split-left' }
{ label: 'Split Right', command: 'pane:split-right' }
{ label: 'Split Up', command: 'pane:split-up-and-copy-active-item' }
{ label: 'Split Down', command: 'pane:split-down-and-copy-active-item' }
{ label: 'Split Left', command: 'pane:split-left-and-copy-active-item' }
{ label: 'Split Right', command: 'pane:split-right-and-copy-active-item' }
{ type: 'separator' }
{ label: 'Focus Next Pane', command: 'window:focus-next-pane' }
{ label: 'Focus Previous Pane', command: 'window:focus-previous-pane' }
@@ -129,6 +136,7 @@
{ label: 'Open In &Dev Mode…', command: 'application:open-dev' }
{ label: '&Reload Window', command: 'window:reload' }
{ label: 'Run Package &Specs', command: 'window:run-package-specs' }
{ label: 'Run &Benchmarks', command: 'window:run-benchmarks' }
{ label: 'Toggle Developer &Tools', command: 'window:toggle-dev-tools' }
]
}
@@ -216,10 +224,10 @@
]
'atom-pane': [
{type: 'separator'}
{label: 'Split Up', command: 'pane:split-up'}
{label: 'Split Down', command: 'pane:split-down'}
{label: 'Split Left', command: 'pane:split-left'}
{label: 'Split Right', command: 'pane:split-right'}
{label: 'Split Up', command: 'pane:split-up-and-copy-active-item'}
{label: 'Split Down', command: 'pane:split-down-and-copy-active-item'}
{label: 'Split Left', command: 'pane:split-left-and-copy-active-item'}
{label: 'Split Right', command: 'pane:split-right-and-copy-active-item'}
{label: 'Close Pane', command: 'pane:close'}
{type: 'separator'}
]

View File

@@ -1,7 +1,7 @@
{
"name": "atom",
"productName": "Atom",
"version": "1.9.0-dev",
"version": "1.22.0-dev",
"description": "A hackable text editor for the 21st Century.",
"main": "./src/main-process/main.js",
"repository": {
@@ -12,146 +12,163 @@
"url": "https://github.com/atom/atom/issues"
},
"license": "MIT",
"electronVersion": "0.37.8",
"electronVersion": "1.6.9",
"dependencies": {
"@atom/source-map-support": "^0.3.4",
"async": "0.2.6",
"atom-keymap": "6.3.2",
"babel-core": "^5.8.21",
"bootstrap": "^3.3.4",
"atom-keymap": "8.2.5",
"atom-select-list": "^0.1.0",
"atom-ui": "0.4.1",
"babel-core": "5.8.38",
"cached-run-in-this-context": "0.4.1",
"chai": "3.5.0",
"clear-cut": "^2.0.1",
"coffee-script": "1.8.0",
"chart.js": "^2.3.0",
"clear-cut": "^2.0.2",
"coffee-script": "1.11.1",
"color": "^0.7.3",
"devtron": "1.1.0",
"event-kit": "^1.5.0",
"dedent": "^0.6.0",
"devtron": "1.3.0",
"etch": "^0.12.6",
"event-kit": "^2.4.0",
"find-parent-dir": "^0.3.0",
"first-mate": "^5.1.1",
"fs-plus": "^2.8.0",
"first-mate": "7.0.7",
"focus-trap": "^2.3.0",
"fs-admin": "^0.1.6",
"fs-plus": "^3.0.1",
"fstream": "0.1.24",
"fuzzaldrin": "^2.1",
"git-utils": "^4.1.2",
"git-utils": "5.0.0",
"glob": "^7.1.1",
"grim": "1.5.0",
"jasmine-json": "~0.0",
"jasmine-reporters": "1.1.0",
"jasmine-tagged": "^1.1.4",
"jquery": "2.1.4",
"key-path-helpers": "^0.4.0",
"less-cache": "0.23",
"line-top-index": "0.2.0",
"marked": "^0.3.5",
"less-cache": "1.1.0",
"line-top-index": "0.3.1",
"marked": "^0.3.6",
"minimatch": "^3.0.3",
"mocha": "2.5.1",
"mocha-junit-reporter": "^1.13.0",
"mocha-multi-reporters": "^1.1.4",
"mock-spawn": "^0.2.6",
"normalize-package-data": "^2.0.0",
"nsfw": "^1.0.15",
"nslog": "^3",
"ohnogit": "0.0.12",
"oniguruma": "^5",
"pathwatcher": "~6.5",
"oniguruma": "6.2.1",
"pathwatcher": "8.0.1",
"postcss": "5.2.4",
"postcss-selector-parser": "2.2.1",
"property-accessors": "^1.1.3",
"random-words": "0.0.1",
"resolve": "^1.1.6",
"runas": "^3.1",
"scandal": "^2.2",
"scandal": "^3.1.0",
"scoped-property-store": "^0.17.0",
"scrollbar-style": "^3.2",
"season": "^5.3",
"season": "^6.0.1",
"semver": "^4.3.3",
"service-hub": "^0.7.0",
"source-map-support": "^0.3.2",
"temp": "0.8.1",
"text-buffer": "9.1.0",
"service-hub": "^0.7.4",
"sinon": "1.17.4",
"temp": "^0.8.3",
"text-buffer": "13.3.1",
"typescript-simple": "1.0.0",
"underscore-plus": "^1.6.6",
"winreg": "^1.2.1",
"yargs": "^3.23.0"
},
"packageDependencies": {
"atom-dark-syntax": "0.27.0",
"atom-dark-ui": "0.51.0",
"atom-light-syntax": "0.28.0",
"atom-light-ui": "0.43.0",
"base16-tomorrow-dark-theme": "1.1.0",
"base16-tomorrow-light-theme": "1.1.1",
"one-dark-ui": "1.3.1",
"one-light-ui": "1.3.1",
"one-dark-syntax": "1.2.0",
"one-light-syntax": "1.2.0",
"solarized-dark-syntax": "1.0.2",
"solarized-light-syntax": "1.0.2",
"about": "1.5.2",
"archive-view": "0.61.1",
"autocomplete-atom-api": "0.10.0",
"autocomplete-css": "0.11.1",
"autocomplete-html": "0.7.2",
"autocomplete-plus": "2.31.0",
"autocomplete-snippets": "1.11.0",
"autoflow": "0.27.0",
"autosave": "0.23.1",
"background-tips": "0.26.0",
"bookmarks": "0.41.0",
"bracket-matcher": "0.82.1",
"command-palette": "0.38.0",
"deprecation-cop": "0.54.1",
"dev-live-reload": "0.47.0",
"encoding-selector": "0.22.0",
"exception-reporting": "0.38.1",
"fuzzy-finder": "1.2.0",
"git-diff": "1.0.1",
"find-and-replace": "0.198.0",
"go-to-line": "0.30.0",
"grammar-selector": "0.48.1",
"image-view": "0.57.0",
"incompatible-packages": "0.26.1",
"keybinding-resolver": "0.35.0",
"line-ending-selector": "0.5.0",
"link": "0.31.1",
"markdown-preview": "0.158.0",
"metrics": "0.53.1",
"notifications": "0.64.1",
"open-on-github": "1.1.0",
"package-generator": "1.0.0",
"settings-view": "0.237.0",
"snippets": "1.0.2",
"spell-check": "0.67.1",
"status-bar": "1.2.6",
"styleguide": "0.45.2",
"symbols-view": "0.113.0",
"tabs": "0.97.0",
"timecop": "0.33.1",
"tree-view": "0.208.0",
"update-package-dependencies": "0.10.0",
"welcome": "0.34.0",
"whitespace": "0.32.2",
"wrap-guide": "0.38.1",
"language-c": "0.52.0",
"language-clojure": "0.20.0",
"language-coffee-script": "0.47.0",
"language-csharp": "0.12.1",
"language-css": "0.36.1",
"language-gfm": "0.86.0",
"language-git": "0.13.0",
"language-go": "0.42.0",
"language-html": "0.44.1",
"language-hyperlink": "0.16.0",
"language-java": "0.19.0",
"language-javascript": "0.110.0",
"language-json": "0.18.0",
"language-less": "0.29.3",
"language-make": "0.22.0",
"language-mustache": "0.13.0",
"atom-dark-syntax": "0.28.0",
"atom-dark-ui": "0.53.0",
"atom-light-syntax": "0.29.0",
"atom-light-ui": "0.46.0",
"base16-tomorrow-dark-theme": "1.5.0",
"base16-tomorrow-light-theme": "1.5.0",
"one-dark-ui": "1.10.8",
"one-light-ui": "1.10.8",
"one-dark-syntax": "1.8.0",
"one-light-syntax": "1.8.0",
"solarized-dark-syntax": "1.1.2",
"solarized-light-syntax": "1.1.2",
"about": "1.7.8",
"archive-view": "0.63.3",
"autocomplete-atom-api": "0.10.3",
"autocomplete-css": "0.17.3",
"autocomplete-html": "0.8.1",
"autocomplete-plus": "2.35.10",
"autocomplete-snippets": "1.11.1",
"autoflow": "0.29.0",
"autosave": "0.24.3",
"background-tips": "0.27.1",
"bookmarks": "0.44.4",
"bracket-matcher": "0.88.0",
"command-palette": "0.41.1",
"dalek": "0.2.1",
"deprecation-cop": "0.56.9",
"dev-live-reload": "0.47.1",
"encoding-selector": "0.23.6",
"exception-reporting": "0.41.4",
"find-and-replace": "0.212.3",
"fuzzy-finder": "1.6.0",
"github": "0.6.2",
"git-diff": "1.3.6",
"go-to-line": "0.32.1",
"grammar-selector": "0.49.5",
"image-view": "0.62.3",
"incompatible-packages": "0.27.3",
"keybinding-resolver": "0.38.0",
"line-ending-selector": "0.7.3",
"link": "0.31.3",
"markdown-preview": "0.159.13",
"metrics": "1.2.6",
"notifications": "0.69.2",
"open-on-github": "1.2.1",
"package-generator": "1.1.1",
"settings-view": "0.251.8",
"snippets": "1.1.4",
"spell-check": "0.72.2",
"status-bar": "1.8.13",
"styleguide": "0.49.7",
"symbols-view": "0.118.0",
"tabs": "0.107.2",
"timecop": "0.36.0",
"tree-view": "0.218.0",
"update-package-dependencies": "0.12.0",
"welcome": "0.36.5",
"whitespace": "0.37.3",
"wrap-guide": "0.40.2",
"language-c": "0.58.1",
"language-clojure": "0.22.4",
"language-coffee-script": "0.49.0",
"language-csharp": "0.14.2",
"language-css": "0.42.6",
"language-gfm": "0.90.1",
"language-git": "0.19.1",
"language-go": "0.44.2",
"language-html": "0.47.7",
"language-hyperlink": "0.16.2",
"language-java": "0.27.4",
"language-javascript": "0.127.3",
"language-json": "0.19.1",
"language-less": "0.33.0",
"language-make": "0.22.3",
"language-mustache": "0.14.1",
"language-objective-c": "0.15.1",
"language-perl": "0.35.0",
"language-php": "0.37.0",
"language-property-list": "0.8.0",
"language-python": "0.44.0",
"language-ruby": "0.68.5",
"language-ruby-on-rails": "0.25.0",
"language-sass": "0.52.0",
"language-shellscript": "0.22.2",
"language-perl": "0.37.0",
"language-php": "0.42.0",
"language-property-list": "0.9.1",
"language-python": "0.45.4",
"language-ruby": "0.71.3",
"language-ruby-on-rails": "0.25.2",
"language-sass": "0.61.1",
"language-shellscript": "0.25.3",
"language-source": "0.9.0",
"language-sql": "0.21.1",
"language-text": "0.7.1",
"language-todo": "0.27.0",
"language-toml": "0.18.0",
"language-xml": "0.34.6",
"language-yaml": "0.26.0"
"language-sql": "0.25.8",
"language-text": "0.7.3",
"language-todo": "0.29.2",
"language-toml": "0.18.1",
"language-typescript": "0.2.1",
"language-xml": "0.35.2",
"language-yaml": "0.31.0"
},
"private": true,
"scripts": {
@@ -159,25 +176,15 @@
"test": "node script/test"
},
"standard": {
"ignore": [],
"parser": "babel-eslint",
"env": {
"atomtest": true,
"browser": true,
"jasmine": true,
"node": true
},
"globals": [
"atom",
"afterEach",
"beforeEach",
"describe",
"fdescribe",
"xdescribe",
"expect",
"it",
"fit",
"xit",
"jasmine",
"runs",
"spyOn",
"waitsFor",
"waitsForPromise",
"indexedDB"
"snapshotResult"
]
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 629 KiB

After

Width:  |  Height:  |  Size: 355 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 907 B

After

Width:  |  Height:  |  Size: 838 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 192 KiB

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 601 KiB

After

Width:  |  Height:  |  Size: 325 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 905 B

After

Width:  |  Height:  |  Size: 809 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 184 KiB

After

Width:  |  Height:  |  Size: 111 KiB

Some files were not shown because too many files have changed in this diff Show More