From 69821cdb96a88ab2f99ec848d886a93bf3785771 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Sun, 4 May 2014 18:32:12 +0800 Subject: [PATCH] :memo: Separate the application distribution chapter out. --- docs/README.md | 1 + docs/tutorial/application-distribution.md | 34 +++++++++++++++++++++++ docs/tutorial/quick-start.md | 22 ++------------- 3 files changed, 38 insertions(+), 19 deletions(-) create mode 100644 docs/tutorial/application-distribution.md diff --git a/docs/README.md b/docs/README.md index 8fa068516052..0a3d89b9b3bf 100644 --- a/docs/README.md +++ b/docs/README.md @@ -3,6 +3,7 @@ ## Tutorials * [Quick start](tutorial/quick-start.md) +* [Application distribution](tutorial/application-distribution.md) * [Use native node modules](tutorial/use-native-node-modules.md) ## Development diff --git a/docs/tutorial/application-distribution.md b/docs/tutorial/application-distribution.md new file mode 100644 index 000000000000..a3173cdea4b0 --- /dev/null +++ b/docs/tutorial/application-distribution.md @@ -0,0 +1,34 @@ +# Application distribution + +To distribute your app with atom-shell, you should name the folder of your app +as `app`, and put it under atom-shell's resources directory (on OS X it is +`Atom.app/Contents/Resources/`, and on Linux and Windows it is `resources/`), +like this: + +On Mac OS X: + +```text +atom-shell/Atom.app/Contents/Resources/app/ +├── package.json +├── main.js +└── index.html +``` + +On Windows and Linux: + +```text +atom-shell/resources/app +├── package.json +├── main.js +└── index.html +``` + +Then execute `Atom.app` (or `atom` on Linux, and `atom.exe` on Window), and +atom-shell will start as your app. The `atom-shell` directory would then be +your distribution that should be delivered to final users. + +## Build with grunt + +If you build your application with `grunt`, then there is a grunt task that can +download atom-shell for current platform automatically: +[grunt-download-atom-shell](https://github.com/atom/grunt-download-atom-shell). diff --git a/docs/tutorial/quick-start.md b/docs/tutorial/quick-start.md index 7cee03da4c23..3e7ce4f94874 100644 --- a/docs/tutorial/quick-start.md +++ b/docs/tutorial/quick-start.md @@ -124,8 +124,9 @@ Finally the `index.html` is the web page you want to show: ## Run your app After done writing your app, you could create a distribution of your app by -following next section and then execute the packaged binary, or you can just -use the downloaded atom-shell binary to execute your app. +following the [Application distribution](./application-distribution.md) guide +and then execute the packaged app, or you can just use the downloaded atom-shell +binary to execute your app directly. On Window: @@ -144,20 +145,3 @@ On Mac OS X: ```bash $ ./Atom.app/Contents/MacOS/Atom app ``` - -## Distribute your app - -To distribute your app with atom-shell, you should name the folder of your app -as `app`, and put it under atom-shell's resources directory (on OS X it is -`Atom.app/Contents/Resources/`, and on Linux and Windows it is `resources/`), -like this: - -```text -Atom.app/Contents/Resources/app/ -├── package.json -├── main.js -└── index.html -``` - -Then execute `Atom.app` (or `atom` on Linux, and `atom.exe` on Window), and -atom-shell will start as your app.