Topic: How to install MDB in Meteor 1.4?
akiarostami
pro
asked 8 years ago
Hi,
Is there a document on how to install MDB Pro on Meteor 1.4?
Also, would it be possible to select which libraries to load, since I don't use and don't want to load all libraries included.
Thanks.
Add comment
Merlz
pro
answered 8 years ago
Excellent write up @akiarostami, it's a great help!
Thank you very much.
akiarostami
pro
answered 8 years ago
After reading some post in this forum, it seems that Meteor is not officially supported.
I managed to install MDB Pro on Meteor 1.4. This is what I did:
1. Install Tether (needed by Boostrap 4 alpha 6):
npm install tether --save
2. Make Tether available globally:
meteor add orgztion:meteor-global-tether
3. Install Boostrap 4 alpha.6:
meteor npm install --save bootstrap@4.0.0-alpha.6
4. Install Hammer (needed by MDB):
meteor npm install --save hammerjs
5. Under '/client' create a folder called 'compatibility'
6. Copy all of MDB modules (from 'js/modules (optional)' folder) here. Files in 'compatibility' folder get loaded alphabetically, so they should be renamed, and a number should be added to the beginning of the files to set the load order. You can check the order of the files in mdb.js.
6.1. Make sure to remove mdb.js (and the minified version). This is specifically helpful because you can remove the modules you don't need (600K is a large size only for the template modules).
6.2. You also don't need 'hammer' because it's already installed.
7. Under '/client' create a folder called 'lib'. In this folder, create a file 'import.js' (if you don't have one already) and add this line to the file:
import 'bootstrap';
8. Copy mdb.css (or scss) under '/imports/ui/stylesheets/'
9. Import bootstrap css using @import
"{}/node_modules/bootstrap/scss/bootstrap.scss";
or
"{}/node_modules/bootstrap/dist/css/bootstrap.min.css";
This should do the job.
I may have some mistakes as it's pretty late night here, but this should be good enough to give everyone a way to start.
Please free to add your suggestions for improving this!
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Status
Specification of the issue
- ForumUser: Pro
- Premium support: No
- Technology: General Bootstrap questions
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No
Tags