Titanium SDK가 6.0.0.GA가 되면서 full NodeJS를 지원합니다.

( http://docs.appcelerator.com/platform/latest/#!/guide/Titanium_SDK_6.0.0.GA_Release_Note 중에서…)

NodeJS support
This release implemented full NodeJS support so users can use NPM modules for Android and iOS platforms (TIMOB-16078). This implementation includes the NodeJS require algorithm with some minor differences:

SDK doesn’t attempt to load *.node files
SDK doesn’t have replacements for Node’s core modules
If the require string doesn’t have the prefix of ./, /, or …/, and its not a native module, the SDK will fall back to legacy Titanium behavior of assuming the require is meant as “absolute” inside the app (as in starting at “Resources/”)
The SDK will load JSON files and directories (package.json’s main property (look at it, resolve it, and try to load it), index.js, and index.json)

알고는 있었는데 오늘 처음 써봤네요.

기존 타이타늄 폴더에서 npm init을 해서 package.json을 생성하시구요.

npm install alloy-sync-restapi --save

를 실행해보세요.

alloy-sync-restapi도 업데이트 되었기 때문에 해보시면 좋습니다. :slight_smile:

이제서야?!라는 감이 있긴 한데요.

NodeJS의 모듈들을 사용할 수 있으니 이것저것 시도해볼 수 있을거 같습니다.

redux를 붙여보고 싶네요!!

그동안 위젯들 버전관리가 나름 귀찮았는데 편리하겠구요.

당연히 appc-npm을 이용해서 npm으로 publish도 가능합니다.

역시 FokkeZB!!

1개의 좋아요