0

I was looking at Differential's meteor-boilerplate app and noticed that they do not use a bootstrap package and also saw a directory/file in the client directory that is related - client/compatibility/bootstrap.js

I was wondering if anyone had an explanation for why/when you'd want to avoid using a package like twbs:bootstrap and when you'd need to create a compatibility file.

MBRCO
  • 3
  • 3

1 Answers1

0

I would say that it's the lazy path to include external libraries in a Meteor application.

You basically have two ways to achieve this include:

  1. The road of glory. Create a package (meteor create --package), clone the source inside it, then edit and "Meteorize" the source (declare package-scoped variables instead of window-scoped, ...). You can then publish this package on Atmosphere so that others can benefit of it.

  2. Copy/paste everything in a client/compatibility folder.

As explained in the docs, everything in this folder is not embraced with an IIFE and is executed before the other code files.

When you have the time to, be brave and take the heroes path.

Kyll
  • 7,036
  • 7
  • 41
  • 64