-
-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allow platform from manifest to overwrite platform #168
base: master
Are you sure you want to change the base?
allow platform from manifest to overwrite platform #168
Conversation
Tests:
|
I still fail to understand why this is necessary. Why would Alloy be looking inside the npm packages holding native modules? If you're looking to copy node_modules into the app, any npm packages with the special |
I believe the tests may be failing because I think the platform values are meaningful - they expect our typical naming schemes used for platform specific contents: |
I need to package JavaScript code inside the same package as the native modules. If I have to put the JavaScript in one package and the native code in the other and make the one with the native dependent on the one with the JavaScript, I don't think it will be found by the current logic because it only looks in the root Plus, having all the code you need in one package is much more convenient and easier to manage and install. Sometimes the native API for an iOS module is different than the API for an Android module. The JavaScript files can wrap them and help make them appear to be the same and save developers a lot of |
I'm OK with a single npm package containing multiple platform-specific modules, hence the subdirectories. I'm not OK with the We should completely ignore the Instead, if the If the I have no idea why |
This change allows for the
platform
property in the manifest to override anything that was passed in frompackage.json
.The reason for this is the current code does not allow the native module to exist in a sub-directory of the package. This can conflict with Alloy code with gives meaning to the
ios
andandroid
directories. If those directories are needed for the JavaScript files, there will be a conflict.With the code change, you can now specify a
package.json
with atitanium
property like this:where the native modules exist in a sub-directory named
modules
.