Giter Club home page Giter Club logo

Comments (6)

yuchi avatar yuchi commented on June 10, 2024

We extended the package.json spec to include references to native packages. It follows the shape of the other deps declarations:

{
  "dependencies": { "pkg": "^1.2.3" },
  "nativeDependencies": { "some.ti.module": "1.2.2" }
}

You get 2 boosts from using this notation:

  1. you can require() them and the call will pass to the Titanium implementation, therefore requiring the actual module, and
  2. once published, when your module is installed through gitTio it will also pull those modules if available.

from titaniumifier.

yuchi avatar yuchi commented on June 10, 2024

I hope it solves you issue. Re-open if you feel it's necessary.

from titaniumifier.

AppWerft avatar AppWerft commented on June 10, 2024

I have embedded by

"nativeDependencies": {
       "./lib/ts.httprequest" : "*",
       "./lib/ts.videoprovider" :"*",
       "./lib/ti.promises" : "*"
  },

In my module I have to use:

ar HTTPRequest = require('./lib/ts.httprequest/ts.httprequest');
var VideoProvider = require('./lib/ts.videoprovider/ts.videoprovider');
var Promise = require('./lib/org.favo.promise');

Without this double reference the modules are not found.

videoprovider depends on twice subsubmodules and now this subsub modules are not found:

Error: Cannot find module './lib/ts.cryptojs256/ts.cryptojs256.js' from '/Users/fuerst/Documents/Appcelerator_Studio_Workspace/Ti.YoutubeProxy/lib/ts.videoprovider'

Any ideas?

from titaniumifier.

yuchi avatar yuchi commented on June 10, 2024

Ok. So, first of all lets force some terms in the discussion:

  • Titanium module a zipfile that can be installed through Studio, gitTio or manually
  • package a directory that, if placed inside node_modules and has a package.json, can be require()d in JS that uses Node style require; can be installed with npm, jspm or manually.

If you want to use Titanium modules in your titaniumified package, follow the mini-guide above.
If those modules are titaniumified packages themselves you need to add theirs nativeDependencies on top of yours. Sad but required, consider it a workaround.

If those are packages (titaniumified or not) and they are published through npm (they should!) you can add them as simple deoendencies and let npm handle the installation.
If they are neither available through gitTio nor npm you are left with copy paste or got sub modules. Avoid this scenario as much as possible.

from titaniumifier.

yuchi avatar yuchi commented on June 10, 2024

I'm reopening as I'm pretty sure I'm not hitting your scenario 😖

I'll have a look at the source and try to be more specific and on point.

from titaniumifier.

yuchi avatar yuchi commented on June 10, 2024

Did you solve your issue?

Please re-open if you feel this is not ‘closed’ :)

from titaniumifier.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.