Revert "Revert "Update APIs, check grammars""

This reverts commit 5e083473e7b4d3a6014d35e68618594765151afe.
This commit is contained in:
Plusb Preco 2015-07-12 13:23:54 +09:00
parent eb81810a52
commit e510384375
19 changed files with 235 additions and 232 deletions

View file

@ -99,7 +99,7 @@ MyApp.app/Contents
실행파일 `electron`의 이름을 원하는 대로 바꿀 수 있습니다.
리눅스 어플리케이션의 아이콘은 [.desktop](https://developer.gnome.org/integration-guide/stable/desktop-files.html.en) 파일을 사용하여 지정할 수 있습니다.
### 역주-자동화
### 역주-자동화
배포시에 Electron의 리소스를 일일이 수정하는 것은 매우 귀찮고 복잡합니다.
하지만 이 작업을 자동화 시킬 수 있는 몇가지 방법이 있습니다:

View file

@ -75,6 +75,8 @@ var mainWindow = null;
// 모든 창이 닫히면 어플리케이션 종료.
app.on('window-all-closed', function() {
// OSX의 대부분의 어플리케이션에선 유저가 Cmd + Q 커맨드로 확실하게 종료하기 전까지는
// 어플리케이션이 메뉴바에 남아 계속 실행됩니다.
if (process.platform != 'darwin') {
app.quit();
}
@ -112,16 +114,16 @@ app.on('ready', function() {
</head>
<body>
<h1>헬로 월드!</h1>
우리는 io.js <script>document.write(process.version)</script> 버전
Electron <script>document.write(process.versions['electron'])</script> 버전을 사용합니다.
이 어플리케이션은 io.js <script>document.write(process.version)</script>
Electron <script>document.write(process.versions['electron'])</script>을 사용합니다.
</body>
</html>
```
## 앱 실행하기
앱을 작성한 후 [어플리케이션 배포](./application-distribution-ko.md) 가이드를 따라 앱을 패키징 하고
패키징한 앱을 실행해 볼 수 있습니다. 또한 Electron 실행파일을 다운로드 받아 바로 실행해 볼 수도 있습니다.
앱을 작성한 후 [어플리케이션 배포](./application-distribution-ko.md) 가이드를 따라 앱을 패키징 하고 패키징한 앱을 실행할 수 있습니다.
또는 Electron 실행파일을 다운로드 받아 바로 실행해 볼 수도 있습니다.
Windows의 경우:

View file

@ -1,6 +1,6 @@
# 네이티브 node 모듈 사용하기
__역주: 현재 Electron은 node.js대신 io.js를 사용합니다. 문서에 기재된 버전과 다를 수 있습니다__
__역주: 현재 Electron은 node.js대신 io.js를 사용합니다. 문서에 기재된 버전과 다를 수 있습니다__
Electron에선 node.js 네이티브 모듈이 지원됩니다. 하지만 Electron은 공식 node.js의 V8 엔진과는 달리 다른 V8 버전을 사용합니다.
그런 이유로 네이티브 모듈을 사용하기 위해선 Electron의 V8 버전에 맞춰 네이티브 모듈을 다시 빌드하고 헤더를 변경해야 합니다.
@ -34,11 +34,11 @@ Node 모듈을 `node-gyp`를 사용하여 Electron을 타겟으로 빌드할 땐
```bash
$ cd /path-to-module/
$ HOME=~/.electron-gyp node-gyp rebuild --target=0.25.0 --arch=ia64 --dist-url=https://atom.io/download/atom-shell
$ HOME=~/.electron-gyp node-gyp rebuild --target=0.29.1 --arch=x64 --dist-url=https://atom.io/download/atom-shell
```
`HOME=~/.electron-gyp`은 변경할 헤더의 위치를 찾습니다. `--target=0.25.0`은 Electron의 버전입니다.
`--dist-url=...`은 헤더를 다운로드 하는 주소입니다. `--arch=ia64`는 64비트 시스템을 타겟으로 빌드 한다는 것을 `node-gyp`에게 알려줍니다.
`HOME=~/.electron-gyp`은 변경할 헤더의 위치를 찾습니다. `--target=0.29.1`은 Electron의 버전입니다.
`--dist-url=...`은 헤더를 다운로드 하는 주소입니다. `--arch=x64`는 64비트 시스템을 타겟으로 빌드 한다는 것을 `node-gyp`에게 알려줍니다.
### npm을 이용한 방법
@ -47,7 +47,7 @@ $ HOME=~/.electron-gyp node-gyp rebuild --target=0.25.0 --arch=ia64 --dist-url=h
```bash
export npm_config_disturl=https://atom.io/download/atom-shell
export npm_config_target=0.25.0
export npm_config_target=0.29.1
export npm_config_arch=x64
HOME=~/.electron-gyp npm install module-name
```