meteorite


How can I declare OR-Dependency in smart.json for Meteorite?


You define the packages your package is dependent on in the smart.json for example like this:
{
[...],
"packages": {
"package1": {},
"package2": {}
}
}
This means my package is dependent on package1 AND package2. Is it possible to declare my package dependent on package1 OR package2?
No, I would be highly suprised if there were such a way to include packages. If you really want to be dependent on one of two packages you are going to have to implement that in your package code (you would be dependant on both packages and your logic would have to choose which package to use).
The next best thing I can think of is editing the package.js file which allows you to create a weak dependency:
It is possible to create weak dependencies between packages. If
package A has a weak dependency on package B, it means that including
A in an app does not force B to be included too — but, if B is
included, say by the app developer or by another package, then B will
load before A. You can use this to make packages that optionally
integrate with or enhance other packages if those packages are
present. To create a weak dependency, pass {weak: true} as the third
argument to api.use. When you weakly depend on a package you don't see
its exports. You can detect if the possibly-present weakly-depended-on
package is there by seeing if Package.foo exists, and get its exports
from the same place.
Maybe there is an alternative soulution, care to elaborate why you want your package dependecies to be like this?
I have the same problem with one of packages I have developed. what I did was simply NOT indicating any dependancy in the smart.json file and let the user decide which package he/she wants to use, and I have mentioned it clearly on package's getting started guide.
in my case it is a bootstrap3 package I wanted

Related Links

Not able to run mrt command with meteor
How can I declare OR-Dependency in smart.json for Meteorite?
Heroku Toolbelt Stuck Administering Deleted App
“Error: not found: make” installing Meteorite on OS X

Categories

HOME
amazon-web-services
protocol-buffers
apple-push-notifications
long-integer
activex
add-on
foaf
iverilog
semantic-web
google-webmaster-tools
ontology
locationmanager
amazon-emr
bootstrap-switch
mpu6050
spring-jpa
squirrel-sql
mixpanel
word2vec
checkout
cpu-usage
significance
android-permissions
sharedpreferences
eclipse-emf
pdf.js
ratio
beego
ruby-daemons
basex
spring-annotations
mdns
commonsware-cwac
osx-lion
runtimeexception
unification
sbjson
swfupload
klee
optionaldataexception
latexml
bit-shift
linq-to-excel
cyanogenmod
cloudwatch
simple-schema
finder
dpkg
apache-pig-grunt
uibinder
processor
distributed-cache
verisign
management-studio-express
certificate-authority
webgrind
asp.net-web-api-helppages
canopy
hmisc
espresso
360-degrees
postal-code
roxygen2
swagger-maven-plugin
relational-model
phpredis
abstract-factory
dbmigrate
python-c-extension
dnsjava
configurable-product
wicket-1.5
ecos
git-reset
zend-search-lucene
cidr
accountmanager
autonumber
ax
email-verification
coordinate
opends
netstream
acpi
zend-server-ce
data-dump
reliability
aspbutton
bucket
tacit-programming
jboss-mdb
suggestbox
error-detection

Resources

Encrypt Message