meteor: how to change include order of packages - meteor

in this post on stackoverflow, the autor recommends to include the bootstrap.js before the jquery.js. in other circumstances he wrote, that the bootstrap modal won't work properly. So i had a look at the sources of my startpage, and i saw, that meteor includes bootstrap after jquery.
And now my question: How can i change the order of the included packages in meteor?
EDIT:
The reason, why i ask, is that i have problems with bootstrap modal. For example modals disappears when i press a button inside or type something into an input...

The order the packages are added depends on their filenames.
The default order should be fine, I also use the modal with both the jquery and bootstrap packages without issue. Are you adding these script tags yourself? You don't really need them.
Why not install the packages with meteor:
meteor add bootstrap
meteor add jquery

Related

EmberJS and a bower CSS

I am using a Bower package with Bootstrap and a theme in an ember app. The theme is called admin lte, and it looks like the it's loading adminlte.css and then bootstrap.css.
The problem is that Bootstrap is supposed to be first, according to the examples of the theme. How do I affect the CSS loading order?
You should be able to app.import them, and the ordering will be preserved.
See the see Ember CLI guides section on style for information on this.

Full instructions for Meteor Semantic-ui integration by a frustrated n00bie?

I wish there were better instructions for installing and getting started with Semantic-ui on Meteor....please see below.
Any improvements/feedback welcome.
I just decided to post these because of some difficulties I had getting semantic-ui to work with Meteor. I figured out the few things I was not getting from various answers across various forums:
Install via CLI: meteor add semantic:ui flemay:less-autoprefixer (You don't need to worry about LESS)
Create an empty custom.semantic.json file in /client/lib/semantic-ui/custom.semantic.json. (Note this is NOT the lib folder that is outside the client and server folders - make a new lib folder. Putting it in the original lib will cause your app to crash because jQuery hasn't been loaded
Start meteor - the custom.semantic.json file will populate and all the semantic-ui files will be added to your project in the same folder.
Edit the file custom.semantic.json to select only the definitions and themes you want
If you are happy with the default values you will need to remove .custom.semantic.json to generate Semantic UI - in all likelihood you will want to delete this file.
Save the file and it will generate Semantic UI
It hasn't been an issue for me yet but it appears that if you are changing theme you still need to leave the default theme setting as true. This seemed to be causing people confusion.
I wanted to use the accordion and couldn't figure how to get it working. The HTML from the docs is very straightforward but I needed this JS to get me going:
Template.yourTemplate.rendered = function() {
$('.ui.accordion').accordion();
}
If anyone knows a better way, please jump in.
Hope this helps someone avoid the minor frustrations I had earlier today.

Replace jquery with zepto in meteor

I can't seem to figure out how to remove jquery. I found this question How do I remove jquery from earlier this year, but I can't find any up to date information. Is it possible to remove jquery from meteor? meteor remove jquery says that jquery is not included in the project, but it is included in the generated html. I'd like to replace it with something a bit more lightweight like zepto.
At this moment this is probably not possible to do, as Meteor internals depend on JQuery. You can try to remove it and replace by Zepto, but most probably it won't work (this may change in a later release of Meteor).
jquery package is not included itself in a blank Meteor app. Instead, it's loaded by standard-app-packages. So to remove it, you need to remove standard-app-packages and then add all packages listed here, except of course JQuery.

How do I remove jquery

I don't need jquery in my meteor app. When I type meteor remove jquery, answer is jquery: not in project.
But jquery is still attached in html.
Meteor internals (domutils) depends on JQuery, but I believe the plan is to remove that dependency at some stage:
See: https://groups.google.com/forum/?fromgroups=#!topic/meteor-talk/21y9NbM9v90
Domutils seems to be able to cope without jQuery if sizzle is present (see findAllBySelector).
Doing a quick scan of the code I didn't see any other uses (other than on the server side - in the less parser).
To remove/replace jQuery with another version (2.x or 3.x).
Clone jquery package from official sources into your project folder /packages.
Replace contents of jquery.js with anything.
Downloaded package will have a higher priority and will be used instead of original one. Do on your own risk.
This is how I remove jQuery from Meteor.
Make sure your code really doesn't depend on jQuery before doing this. Also adding any Meteor packages depending on jQuery won't work as expected anymore (e.g: materialize:materialize).
So, if you want to make sure jQuery is removed from Meteor no matter what, just put
Package.describe({
summary: "Remove jQuery from meteor",
name: "jquery",
version: '1.999.999',
});
into packages/jquery/package.js. No need to clone. No need to add any other files.
Check your .meteor/versions file for the entry:
jquery#1.999.999
to confirm it worked.

Detect Customized Twitter Bootstrap Settings (CSS, Variables, & Plugins)

I have built a site using Twitter Bootstrap.
When I customized my Bootstrap download I set custom values for colors, gutter widths, etc.
Two months later, I would like to upgrade to Bootstrap Version 2.3.0 but have forgotten what values I set for these custom values.
Rather than going through all of my code and searching for these values and plugging them into my new customized download package, is there a way to "Import" my current bootstrap.css file, detect the settings, and then upgrade to the new version?
I have seen functionality such as this on the jQuery Mobile Themeroller whereby you import your CSS by copy & paste, and the site performs the upgrade for you.
Is there anything similar for Twitter Bootstrap? Or is there a way to do this without comparing hundreds of lines of code?
git clone the repository. Then git checkout <your original version>, then copy your changes over top and do a diff. This will allow you to see only the changes you made to the version you originally used without seeing all the changes in the new bootstrap version. You can then update to the HEAD and proceed to copy your changes into it.

Resources