tisomorphic

1.1.1 • Public • Published

tisomorphic

Circle CI

Make npm modules available in Titanium.

installation

in your titanium project root

npm install --save-dev tisomorphic

requirements

  • Alloy project
  • app/lib must exist

usage

npm install --save superagent es6-promise # modules to use 
npm run tisomorphic

that's all. You can use superagent and es6-promise by Node.js way.

var Promise = require('es6-promise').Promise;
var superagent = require('superagent');
 
var p = new Promise(function(resolve, reject) {
  superagent.get('https://github.com/CureApp').end(function(err, res) {
    if (err) return reject(err);
    resolve(res);
  });
});
 
p.then(function(res) {
  console.log(res.text.slice(0, 400));
}, function(err) {
  console.log(err);
});

TODO

  • modify alloy.jmk in the project to insert files directly into Resources directory.

Package Sidebar

Install

npm i tisomorphic

Weekly Downloads

1

Version

1.1.1

License

MIT

Last publish

Collaborators

  • cureapp-admin