doc05 - KoreaSenchaUserGroup/Lab1 GitHub Wiki
DOC 5. [Overview] Using Sencha Command
์๋ฌธ : http://docs.sencha.com/touch/2-0/#!/guide/command
๋ฒ์ญ : ์ ๊ฑด์ฐ [Github:NangChun]
Using Sencha Command
Sencha Command is a cross-platform command line tool that helps make developing applications with Sencha SDKs full of enjoyment. The tool consists of many useful automated tasks around the full life-cycle of your applications, from generating a fresh new project to deploying for production.
์ผ์ฐจ ๋ช ๋ น์ด ์ฌ์ฉํ๊ธฐ
์ผ์ฐจ ๋ช ๋ น์ด๋ ๊ฐ๋ฐํ๋ ์ดํ๋ฆฌ์ผ์ด์ ์ ๋ง๋๋๋ฐ ๋์์ด ๋๋ ๋์์ ์ผ์ฐจ SDKs๋ฅผ ์ต๋ํ ์ฆ๊ธธ์ ์๋ ํฌ๋ก์ค ํ๋ซํผ ์ปค๋งจ๋ ๋ผ์ธ ๋๊ตฌ์ ๋๋ค. ์ด ๋๊ตฌ๋ ์ ์์ ์ํ ์๋ก์ด ํ๋ก์ ํธ๋ฅผ ์์ฑ์์ ๋ฐฐํฌํ๊ธฐ๊น์ง์, ์์ฉํ๋ก๊ทธ๋จ์ ๋๋ฌ์ผ ์๋ช ์ฃผ๊ธฐ ์ ์ฒด์ ์ ์ฉํ ๋ง์ ์๋ํ๋ ์์ ์ผ๋ก ๊ตฌ์ฑ๋์ด ์์ต๋๋ค.
Requirements
Please note that all commands only apply to Sencha Touch 2. Only OS X or Windows operating systems are currently supported.
Step 1: Setup an HTTP server on your computer if you don't have one running. This guide assumes that the host name is localhost
, and the document root is at /path/to/www
Step 2: Download and install the latest SDK Tools on your development machine. The latest version as of this writing is 2.0.0 beta.
Step 3: Download the latest Sencha Touch 2 SDK. Extract the SDK to a local directory.
Step 4: Verify that Sencha Command is working properly onp your machine:
Open a command line terminal, and run the following commands. Replace /path/to/sencha-touch-2-sdk
with the actual path to the SDK that you extracted to previously, as mentioned in Step 2.
cd /path/to/sencha-touch-2-sdk
sencha
If a help message appears with the first line that says: "Sencha Command v2.0.0 for Sencha Touch 2", you are all set.
์๊ฒฉ์๊ฑด
๋ชจ๋ ๋ช ๋ น์ด ์ผ์ฐจํฐ์น 2๋ก ์ ์ฉ ๋๋ค๋ ์ ์ ์ ์ํ์ญ์์ค. ํ์ฌ OS X ๋๋ Windows ์ด์์ฒด์ ๋ง ์ง์๋ฉ๋๋ค.
1 ๋จ๊ณ : ๋ง์ฝ ์คํ์ด ๋์ง ์๋๋ค๋ฉด ์ปดํจํฐ์ http์๋ฒ๋ฅผ ์ค์นํฉ๋๋ค. ๋ณธ ๊ฐ์ด๋๋ ํธ์คํธ ์ด๋ฆ์ด '๋ก์ปฌํธ์คํธ' ์์ ๊ฐ์ ํ๊ณ , ๋ฌธ์ ๋ฃจํธ๋ /path/to/www
์ ์์ต๋๋ค.
2 ๋จ๊ณ : (http://www.sencha.com/products/sdk-tools) ๊ฐ๋ฐ ์ปดํจํฐ์ ๋ค์ด๋ก๋ [์ต์ SDK ๋๊ตฌ]๋ฅผ ์ค์นํฉ๋๋ค.
3 ๋จ๊ณ : [์ต์ Sencha ํฐ์น 2 SDK] (http://www.sencha.com/products/touch/)์ ๋ค์ด๋ก๋ ํฉ๋๋ค. ๋ก์ปฌ ๋๋ ํ ๋ฆฌ์ SDK๋ฅผ ์ถ์ถํฉ๋๋ค.
4 ๋จ๊ณ : ์ผ์ฐจ ๋ช ๋ น์ด ์ปดํจํฐ์์ ์ ๋๋ก ์๋ํ๋์ง ํ์ธํฉ๋๋ค:
์ปค๋งจ๋ ๋ผ์ธ ํฐ๋ฏธ๋์ ์ด๊ณ ๋ค์ ๋ช
๋ น์ ์คํํฉ๋๋ค. 2 ๋จ๊ณ ์์์ ๊ฐ์ด ์ธ๊ธํ, ์ด์ ์ ์ถ์ถํ ๊ฒ์ผ๋ก SDK์ ์ค์ ๊ฒฝ๋ก์/
path/to/sencha-touch-2-sdk๋ฅผ ๊ต์ฒดํฉ๋๋ค.
cd /path/to/sencha-touch-2-sdk
sencha
์ฒซ ๋ฒ์งธ ๋ผ์ธ๊ณผ ํจ๊ป ๋์๋ง ๋ฉ์์ง๊ฐ : "Sencha Command v2.0.0 Sencha Touch 2 '์ด๋ผ๊ณ ๋ํ๋๋ฉด, ๋ชจ๋ ์ค์ ๋ฉ๋๋ค.
Getting Started
All commands have the exact same syntax as follows:
sencha [module] [action] [arguments...]
Some typical examples:
# Minify app.js and write the output to app.minified.js
sencha fs minify app.js app.minified.js
# Create a new project based on the current SDK with namespace 'MyApp' and store inside '/path/to/www/myapp'
sencha app create MyApp /path/to/www/myapp
To see a list of all available modules, simply type: sencha
(when the current working directory is either the SDK directory or a project directory)
Similarly, to see a list of all available actions for a specific module, run: sencha [module]
, for example: sencha app
Lastly, typing sencha [module] [action]
prints out the full list of arguments for that typical action, for example: sencha app create
์์ํ๊ธฐ
๋ชจ๋ ๋ช ๋ น์ ๋ค์๊ณผ ๊ฐ์ ๊ตฌ๋ฌธ์ ๊ฐ์ง๋๋ค :
sencha [module] [action] [arguments...]
์ ํ์ ์ธ ๋ช๊ฐ์ง ์์ ๋๋ค :
# app.js๋ฅผ ์ถ์ํ๊ณ app.minified.js์ผ๋ก ์ถ๋ ฅํ๋๋ก ์์ฑํฉ๋๋ค.
sencha fs minify app.js app.minified.js
# ์ง๊ธ์ SDK๋ฅผ ๊ธฐ๋ฐ์ผ๋ก ์๋ก์ด ํ๋ก์ ํธ๋ฅผ ๋ค์์คํ์ด์ค 'MyApp'๊ณผ '/path/to/www/myapp' ์์์ ์ ์ฅ์๋ฅผ ๋ง๋ญ๋๋ค.
sencha app create MyApp /path/to/www/myapp
์ฌ์ฉ ๊ฐ๋ฅํ ๋ชจ๋ ๋ชจ๋์ ๋ชฉ๋ก์ ๋ณด๋ ค๋ฉด, ๊ฐ๋จํ ์ ๋ ฅํฉ๋๋ค : 'sencha' (ํ์ฌ ์์ ์ค์ธ ๋ํ ํฐ๋ฆฌ๋ sdk๋ํ ํฐ๋ฆฌ ๋๋ ํ๋ก์ ํธ ํฐํ ํฐ๋ฆฌ ์ค ํ๋)
์ ์ฌํ๊ฒ, ํน์ ๋ชจ๋์ ๋ํ ๋ชจ๋ ๊ฐ๋ฅํ ๋์์ ๋ชฉ๋ก์ ๋ณด๋ ค๋ฉด, ์คํํฉ๋๋ค : sencha [module]
, ์๋ฅผ ๋ค๋ฉด : sencha app
๋ง์ง๋ง์ผ๋ก, ์
๋ ฅ sencha [module] [action]
์ ํ์ ์ธ ๋์์ ๋ํ ์ธ์์ ์ ์ฒด ๋ชฉ๋ก์ ์ถ๋ ฅํฉ๋๋ค, ์๋ฅผ๋ค๋ฉด : sencha app create
Creating a New Application
The following command generates a new application with the namespace MyApp
to /path/to/www/myapp
:
# Make sure the current working directory is the Sencha Touch 2 SDK
cd /path/to/sencha-touch-2-sdk
sencha app create MyApp /path/to/www/myapp
To try it out, simply point your (WebKit-based) browser to http://localhost/myapp
.
Congratulations, you have just created a fully working Sencha Touch 2 application in seconds!
์ ์์ฉํ๋ก๊ทธ๋จ ๋ง๋ค๊ธฐ
๋ค์ ๋ช
๋ น์ /path/to/www/myapp
๋ก ๋ค์์คํ์ด์ค MyApp
๊ณผ ์๋ก์ด ์ ํ๋ฆฌ์ผ์ด์
์ ์์ฑํฉ๋๋ค :
# ์ผ์ฐจํฐ์น 2SDK ๋ํ
ํฐ๋ฆฌ๊ฐ ํ์ฌ ์์
์ค์ธ์ง ํ์ธํ์ญ์์ค
cd /path/to/sencha-touch-2-sdk
sencha app create MyApp /path/to/www/myapp
์๋ํ๋ค๋ฉด, ๊ฐ๋จํ๊ฒ http://localhost/myapp๋ก (์นํท-๊ธฐ๋ฐ) ๋ธ๋ผ์ฐ์ ๋ก ์ง์ ๋ฉ๋๋ค.
์ถํํฉ๋๋ค, ๋ฐฉ๊ธ ๋๋ฒ์งธ๋ก ์๋ฒฝํ๊ฒ ์๋ํ๋ ์ผ์ฐจํฐ์น2 ์์ฉํ๋ก๊ทธ๋จ์ ๋ง๋ค์์ต๋๋ค!
Understanding Your Application's Structure
The generated application should have the following file structure:
app # Your application's source code in MVC structure
controller
model
profile
store
view
Main.js # The main view of the application
resources
css
app.css # The main stylesheet, compiled from app.scss
sass
app.scss # The SASS file which compiles to app.css above,
# includes Sencha Touch 2 theme by default
icons # Application icons for all mobile devices
# When replacing these default images with your own,
# make sure the file name and the dimension stays exactly the same
...
loading # Application start-up screens for iOS devices
# Similarly to icons, make sure the file names and
# dimension stays the same
...
images # Put other images used by your application here
sdk # A copy of the SDK from which this application was generated
...
index.html
app.js # Contains application's initialization logics
app.json # Configuration for deployment
packager.json # Configuration for native packaging
Both app.json and packager.json have inline documentation for each configurable item. Simply open the files and edit them as you need.
์์ฉํ๋ก๊ทธ๋จ์ ๊ตฌ์กฐ ์ดํดํ๊ธฐ
์์ฑ๋ ์์ฉํ๋ก๊ทธ๋จ์ ๋ค์๊ณผ ๊ฐ์ ํ์ผ๊ตฌ์กฐ๋ฅผ ๊ฐ์ง๊ณ ์์ด์ผ ํฉ๋๋ค :
app # MVC ๊ตฌ์กฐ์์์์ ์์ฉํ๋ก๊ทธ๋จ์ ์์ค์ฝ๋
controller
model
profile
store
view
Main.js # ์์ฉํ๋ก๊ทธ๋จ์ ๋ฉ์ธ ๋ทฐ
resources
css
app.css # app.scss์์ ์ปดํ์ผ๋ ๊ธฐ๋ณธ ์คํ์ผ ์ํธ
sass
app.scss # ์์ app.scss๋ฅผ sassํ์ผ๋ก ์ปดํ์ผ
# ๊ธฐ๋ณธ์ ์ผ๋ก ์ผ์ฐจํฐ์น2 ํ
๋ง๋ฅผ ํฌํจ
icons # ๋ชจ๋ ๋ชจ๋ฐ์ผ ์ฅ์น๋ฅผ์ํ ์์ฉํ๋ก๊ทธ๋จ ์์ด์ฝ
# ํผ์์ ๊ธฐ๋ณธ์ ์ธ ์ด๋ฏธ์ง๋ฅผ ๋์ฒดํ ๋,
# ํ์ผ ์ด๋ฆ๊ณผ ํฌ๊ธฐ๊ฐ ์์ ํ ๋์ผํ๊ฒ ์ ์งํ๋์ง ํ์ธ
...
loading # iOS์ฅ์น๋ฅผ ์ํ ์์ฉํ๋ก๊ทธ๋จ ์๋ํ๋ฉด
# ๋ง์ฐฌ๊ฐ์ง๋ก ์์ด์ฝ์์, ํ์ผ์ด๋ฆ์ ํ์ธ
# ํฌ๊ธฐ๋ ๋์ผํ๊ฒ ์ ์ง
...
images # ์ฌ๊ธฐ์์ ์์ฉํ๋ก๊ทธ๋จ์ ์ํด ์ฌ์ฉ๋๋ ๋ค๋ฅธ ์ด๋ฏธ์ง ๋ฃ๊ธฐ
sdk # ์์ฉํ๋ก๊ทธ๋จ์ด ์์ฑ๋์ด์๋ SDK์ ์ฌ๋ณธ
...
index.html
app.js # ์์ฉํ๋ก๊ทธ๋จ์ ์ด๊ธฐํ logics์ ํฌํจ
app.json # ๋ฐฐํฌ๋ฅผ ์ํ ๊ตฌ์ฑ
packager.json # ๋ค์ดํฐ๋ธ ํฌ์ฅ์ ์ํ ๊ตฌ์ฑ
app.json๊ณผ packager.json ๋๋ค ๊ฐ๊ฐ ์ค์ ๊ฐ๋ฅํ ํญ๋ชฉ์ ์ํ ๋ณธ๋ฌธ ์ค๋ช ์๋ฅผ ๊ฐ์ก์ต๋๋ค. ๊ฐ๋จํ ์ด๊ณ ํ์ํ๋๋ก ํธ์งํ ์ ์์ต๋๋ค.
Developing Your Application
sencha generate
helps you quickly generate common MVC components such as: Controller, Model and Profile.
For example:
# Make sure the current working directory is the application's directory, i.e 'cd /path/to/www/myapp'
sencha generate model User --fields=id:int,name,email
The command above will automatically generate a new Model class named User
with 3 fields of id
, name
and email
to app/model/User.js, and add its reference to your app.js.
์์ฉํ๋ก๊ทธ๋จ ๊ฐ๋ฐํ๊ธฐ
'sencha generate'๋ ๋น ๋ฅด๊ณ ๊ณตํต์ ์ธ MVC ์ปดํฌ๋ํธ๋ฅผ ์์ฑํ๋๋ฐ ๋์์ด ๋ฉ๋๋ค : ์ปจํธ๋กค๋ฌ, ๋ชจ๋ธ ๊ทธ๋ฆฌ๊ณ ํ๋กํ์ผ ๋ฑ.
์๋ฅผ๋ค์ด:
# ํ์ฌ ์์
๋ํ
ํฐ๋ฆฌ๊ฐ ์์ฉํ๋ก๊ทธ๋จ์ ๋ํ
ํ ๋ฆฌ ์ธ์ง ํ์ธํฉ๋๋ค, i.e 'cd /path/to/www/myapp'
sencha generate model User --fields=id:int,name,email
์์ ๋ช ๋ น์ ์๋์ผ๋ก ์ ํด๋์ค ๋ชจ๋ธ์ app/model/User.js ์์ 'User' ํจ๊ป 'id', 'name' ๊ทธ๋ฆฌ๊ณ 'email'์ ์ด๋ฆ์ผ๋ก 3๊ฐ์ง ์ ๋ ฅ๋์ด ์์ฑ๋ ๊ฒ์ด๋ฉฐ, app.js์ ์ฐธ์กฐ๋ฅผ ์ถ๊ฐํฉ๋๋ค.
Deploying Your Application
Developing your application simply means editing source code and refreshing the browser. All source files are dynamically loaded on demand. There's no building process involved.
When it comes to deployment, Sencha Command provides 4 different build environment options, namely 'testing', 'package', 'production' and 'native':
-
'testing' is meant for QA prior to production. All JavaScript and CSS source Files are bundled, but not minified, which makes it easier for debugging if needed
-
'package' creates a self-contained, re-distributable production build that normally runs from local file system without the need for a web server
-
'production' creates a production build that is normally hosted on a web server and serves multiple clients (devices). The build is offline-capable using HTML 5 application cache, and has built-in over-the-air delta updating feature
-
'native' first generates a 'package' build, then packages it as a native application, ready to be deployed to native platforms
As an example, the following command generates a 'testing' build for your application:
# Make sure the current working directory is the application's directory you're deploying, i.e 'cd /path/to/www/myapp'
sencha app build testing
And similarly when you're ready for production deployment:
sencha app build production
The default deployment paths are taken from the buildPaths
item inside app.json
. For more details on optional arguments, run
Sencha Command automates all optimizations for your application, including but not limited to:
- Resolving dependencies required by the application and only including exactly what is used for optimal file size / performance
- Enabling HTML 5 application cache via automatic generation of cache.manifest and resources checksum
- Minifying all JavaScript and CSS assets
- Storing all JavaScript and CSS assets inside Local Storage on first load, and patches them via delta updates between releases
As a result, your production build can load instantly on subsequent access and updates on-the-fly with minimal network transfer.
Important Note: The cache.manifest
file is automatically generated for you. However, please make sure that your web server serves it with the correct Content-Type
header of text/cache-manifest
. To learn more about HTML 5 application cache, please refer to this article.
์์ฉํ๋ก๊ทธ๋จ ๋ฐฐํฌํ๊ธฐ
์์ฉํ๋ก๊ทธ๋จ ๊ฐ๋ฐ์ ๋จ์ํ ์์ค์ฝ๋ ํธ์งํ๊ธฐ์ ๋ธ๋ผ์ฐ์ ์ ์๋ก๊ณ ์นจ์ ์๋ฏธํฉ๋๋ค. ๋ชจ๋ ์์คํ์ผ์ ์๊ตฌ๋๋ฉด ๋์ ์ผ๋ก ๋ก๋๋ฉ๋๋ค. ๋ณต์กํ ๋น๋ฉ๊ณผ์ ์ ์์ต๋๋ค.
๋ฐฐํฌ๋๋ฉด, ์ผ์ฐจ ์ปค๋งจ๋๋ 4๊ฐ์ง์ ์๋ก ๋ค๋ฅธ ๋น๋ ํ๊ฒฝ ์ต์ ์ ์ ๊ณต ํฉ๋๋ค, ์ฆ 'testing', 'package', 'production' ๊ทธ๋ฆฌ๊ณ 'native' ์ ๋๋ค :
-
'testing'์ ์ ์ ์ด์ ์ QA๋ฅผ ๋ํ๋ ๋๋ค. ๋ชจ๋ ์๋ฐ์คํฌ๋ฆฝํธ์ CSS ์์ค ํ์ผ์ ๋ฒ๋ค๋ก ์ ๊ณต๋๊ณ , ๊ทธ๋ฌ๋ ์ถ์ํ์ง ์์ผ๋ฉฐ, ํ์ํ ๊ฒฝ์ฐ ๋๋ฒ๊น ์ ์ํด ์ฌ์์ง๊ฒ ๋๋ค.
-
'ํจํค์ง'๋ ๋ ๋ฆฝ์ ์ผ๋ก ๋ง๋ค์ด์ง๋ฉฐ, ์ผ๋ฐ์ ์ผ๋ก ์น์๋ฒ ์์ด ๋ก์ปฌ ํ์ผ ์์คํ ์์ ์ฌ ๋ฐฐํฌํ์ฌ ์ ์๋๋ ๋น๋.
-
'production'์ ์น ์๋ฒ์์ ์ ์์ ์ผ๋ก ํธ์คํธ๋ ๋น๋๋ฅผ ์ ์ํ์ฌ ๋ง๋ค์ด์ง๋ฉฐ ์ฌ๋ฌ ํด๋ผ์ด์ธํธ(์ฅ์น)๋ฅผ ์ ๊ณต. ๋น๋๋ HTML 5์ ์์ฉํ๋ก๊ทธ๋จ ์บ์๋ก ์คํ๋ผ์ธ ์ํ์์ ์ฌ์ฉ ๊ฐ๋ฅํ๋ฉฐ, ๋ฌด์ ๋ธํ ์ ๋ฐ์ดํธ ๊ธฐ๋ฅ์ ๋ด์ฅ.
-
'native' ๋จผ์ 'package'๋น๋๋ฅผ ์์ฑํฉ๋๋ค, ๊ทธ๋ฆฌ๊ณ ๋ค์ดํฐ๋ธ ์์ฉํ๋ก๊ทธ๋จ์ผ๋ก ํฌ์ฅํ๊ณ , ๋ค์ดํฐ๋ธ ํ๋ซํผ์์ ๋ฐฐํฌํ ์ค๋น.
์๋ฅผ ๋ค์ด, ๋ค์ ๋ช ๋ น์ ์์ฉํ๋ก๊ทธ๋จ์ ์ํด 'testing' ๋น๋๋ฅผ ์์ฑํฉ๋๋ค :
# ํ์ฌ ์์
ํ๋ ๋ํ
ํ ๋ฆฌ๋ ๋ฐฐํฌํ๋ ์์ฉํ๋ก๊ทธ๋จ์ ๋ํ
ํ ๋ฆฌ์ ์๋์ง ํ์ธ, i.e 'cd /path/to/www/myapp'
sencha app build testing
๊ทธ๋ฆฌ๊ณ ์ ์ ๋ฐฐํฌ๋ฅผ ์ํ ์ค๋น๊ฐ ๋น์ทํ๊ฒ ๋์์๋ ์ ๋๋ค :
sencha app build production
๊ธฐ๋ณธ ๋ฐฐํฌ ๊ฒฝ๋ก๋ 'app.js' ๋ด๋ถ 'buildPaths' ํญ๋ชฉ์์ ๊ฐ์ ธ์ต๋๋ค. ์ ํ์ ์ธ์์ ๋ํ ๋ ์์ธํ ๋ด์ฉ์ ์ํ๋ฉด, ์คํํฉ๋๋ค.
์ผ์ฐจ ๋ช ๋ น์ ํฌํจํ ์์ฉํ๋ก๊ทธ๋จ์ ๋ชจ๋ ์ต์ ํ๋ฅผ ์๋ํ, ํฌํจํ์ง๋ง ์ ํ๋์ง ์์ต๋๋ค :
- ์์ฉํ๋ก๊ทธ๋จ์ ํ์ํ ์์กด์ฑ์ ํด๊ฒฐ์๋ง ์ต์ ํ๋ ํ์ผ ํฌ๊ธฐ / ์ฑ๋ฅ์ ์ํด ์ฌ์ฉ๋๋ ์ ํํ ํฌํจ.
- cache.manifest ๋ฐ ์์ ๊ฒ์ฌ๊ฐ ์๋ ์์ฑ์ ํตํด HTML 5์ ์์ฉ ํ๋ก๊ทธ๋จ ์บ์๋ฅผ ํ์ฑํ.
- ๋ชจ๋ JavaScript์ CSS์ ์์ฐ์ ์ถ์.
- ๋จผ์ ๋ถํ์ ๋ํ ๋ก์ปฌ ์ ์ฅ์ ์์์ ๋ชจ๋ JavaScript์ CSS์ ์์ฐ์ ์ ์ฅํ๊ณ ํ๋ ๊ฒ์ ๋ฆด๋ฆฌ์ค ์ฌ์ด ๋ธํ ์ ๋ฐ์ดํธ๋ฅผ ํตํด ๊ทธ๋ค์ ํจ์น.
๊ฒฐ๊ณผ์ ์ผ๋ก ์ ์ ๋น๋๋ ์ต์ํ์ ๋คํธ์ํฌ ์ ์ก๊ณผ-The-Fly ๋ฐฉ์์ ๋ํ ํ์ ์ก์ธ์ค ๋ฐ ์ ๋ฐ์ดํธ๋ฅผ ์ฆ์ ๋ก๋ํ ์ ์์ต๋๋ค.
์ค์ ** ์ฐธ๊ณ ** : cache.manifest
ํ์ผ์ด ์๋์ผ๋ก ์์ฑ๋ฉ๋๋ค. ๊ทธ๋ฌ๋, ์น ์๋ฒ๊ฐ text/cache-manifest
์ ์ฌ๋ฐ๋ฅธ Content-Type
์ ํค๋์ ํจ๊ป ์ ๊ณตํ๊ณ ์๋์ง ํ์ธํ์ญ์์ค. HTML 5 ์์ฉ ํ๋ก๊ทธ๋จ ์บ์์ ๋ํ ์์ธํ ๋ด์ฉ์ ๋ณด๋ ค๋ฉด, [๋ฌธ์] (http://www.html5rocks.com/en/tutorials/appcache/beginner/)๋ฅผ ์ฐธ์กฐํ์ญ์์ค.
Packaging Your Application for Distribution on App Stores
packager.json
contains all configurable values to package your application.
If you are using OS X and have Xcode installed, this one-liner will automatically package your application and run it on iOS Simulator:
sencha app build native
For more details on working with packager.json
, please refer to the Native Package guide
์ฑ ์คํ ์ด๋ก์ ๋ฐฐํฌ๋ฅผ ์ํ ์์ฉํ๋ก๊ทธ๋จ ํฌ์ฅ
packager.json
์ ์์ฉ ํ๋ก๊ทธ๋จ์ ํฌ์ฅํ๊ธฐ์ํ ๋ชจ๋ ๊ตฌ์ฑ ๊ฐ์ด ๋ค์ด ์์ต๋๋ค.
OS X์ ์ฌ์ฉํ๊ณ Xcode๊ฐ ์ค์น๋์ด์๋ค๋ฉด, ์ด ๋จ์ผ ๋ผ์ด๋๋ ์๋์ผ๋ก ์์ฉํ๋ก๊ทธ๋จ์ ํจํค์ง ๋ฐ iOS ์๋ฎฌ๋ ์ดํฐ์์ ์คํํฉ๋๋ค :
sencha app build native
packager.json
๊ณผ ์์
์ ๋ํ ์์ธํ ๋ด์ฉ์, [๋ค์ดํฐ๋ธ ํจํค์ง ๊ฐ์ด๋] (#! / ๊ฐ์ด๋ / native_packaging)๋ฅผ ์ฐธ์กฐํ์๊ธฐ ๋ฐ๋๋๋ค.