Comments (10)
Hello,
I've not tested it myself but there are already packages on atmosphere that depends on meteor-bower. For instance https://github.com/ccll/meteor-angular-ui-router/blob/master/smart.json
I think the current package API provided by meteor doesn't allow to restrict bower exports to the package scope, so the side effect is that exports are visible from the main app. There is some work in the upcoming constraint-solver
core package that may help for that purpose in the future.
The other solution that currently works is to rely on git submodules and manually add the desired files in package.js
.
from meteor-bower.
I think it would be possible to improve imports/exports management in the same way that the linker
rewrite did it for meteor core packages. The idea is that each package is scoped inside a closure, if you want to access another package, you have to require it:
var backbone = Bower.require("backbone");
It will work only on the client side. The problem is that most of the code related to this is in the tools/
not packages/
so I need to see how feasible it is.
from meteor-bower.
So I have not tested it yet but I wanted to update this with my thoughts. I think the issue I am having is that I have not published my package on Atmosphere yet. Since meteor does not actually use smart.json the dependance is not being called.
It will be a little while until I am ready to put my work on Atmo. For a quick fix I found that if I called the dependency from my app then my smart package could use it. This is working fine for now but I think your idea to use linker
style may be more intuitive for meteor users. That said you may want to wait until the meteor/atmosphere merge? Its possible that this issue will be easy to resolved then. (assuming I am right about why things are not working)
from meteor-bower.
I don't understand what you think the problem is. Does it work with a bower.json
file instead of using smart.json
?
from meteor-bower.
So within my app smart.json
I am able to use bower just fine. But if I have a package with a smart.json
and I reference bower nothing happens. I just tested a bower.json
file, within the package, and had the same results.
In my smart package smart.json
:
"packages": {
"bower": "0.1.2"
},
"bower": {
"notify.js": "1.1.0"
}
from meteor-bower.
Is your package located in the packages/
directory, or anywhere else?
from meteor-bower.
Standard layout with all the packages in packages/
Meteor Release 0.7.1.2
Meteorite version 0.6.15
from meteor-bower.
You have to include it in your package.js:
// Install bower components.
api.add_files('smart.json', 'client');
from meteor-bower.
Any updates on this? Meteor is 1.1 now :-)
from meteor-bower.
Just FYI for anyone who isn't clear (it wasn't to me, I just spent some time beating my head on this): mquandalle:bower
does not currently support loading bower components specified by local packages (e.g. a package in your project's packages/
directory). So anyone needing bower components to be loaded for subpackages will currently need to duplicate those dependencies in a project-level bower.json
, even with meteor 1.2.
from meteor-bower.
Related Issues (20)
- ignoredDependencies does not work HOT 1
- Unknown error with empty dependency list HOT 7
- Remove installed package HOT 1
- JS load order with bower install --save
- Bower package loads in lib/main.jsx but not in lib/transit.jsx
- Fails silently in Meteor 1.2+ HOT 4
- Local Database Fails to Start after installing Polymer HOT 5
- Won't load despite main being defined
- Error while starting meteor HOT 7
- Using a specific js file from a dependency HOT 1
- Javascript files not loaded in client when _originalSource != name HOT 2
- Error when adding package on my meteor app HOT 2
- Question: Where can I put the bower folder in? HOT 2
- Bower dependencies list must be a dictionary HOT 1
- Excluding files from dependency
- ignoredDependencies not working HOT 3
- Meteor not loading bower package HOT 5
- After upgrade to 1.3: Packages not available anymore HOT 6
- Can't find dependencies modules anymore meteor 1.2 HOT 2
- bower old
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 meteor-bower.