Comments (6)
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:
- you can
require()
them and the call will pass to the Titanium implementation, therefore requiring the actual module, and - once published, when your module is installed through gitTio it will also pull those modules if available.
from titaniumifier.
I hope it solves you issue. Re-open if you feel it's necessary.
from titaniumifier.
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.
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.
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.
Did you solve your issue?
Please re-open if you feel this is not ‘closed’ :)
from titaniumifier.
Related Issues (20)
- Zipfile should have lower case names HOT 1
- option to minify output HOT 8
- Strip “use strict” from code (3.5.0.GA) HOT 9
- Zip module issue HOT 7
- NPM unable to install or build HOT 3
- The generated package.json has a "main" script that doesn't exist HOT 8
- Requiring alloy modules HOT 10
- Support for platform dependent files HOT 1
- Using of external modules HOT 8
- Refactor transforms HOT 1
- Trying to titaniumifier AWS node sdk HOT 2
- Error building module throw e; ^ HOT 6
- nativeDependences if dependent module has different version for each platform HOT 10
- I cannot install it because of errors HOT 21
- Parse HOT 5
- Problem trying to titaniumifier sendemail HOT 1
- Uncaught SyntaxError HOT 1
- Support for SDK 8.x? HOT 5
- Support for newer node versions HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from titaniumifier.