Load js External with Meteor

1

Sirs, I'm new to the meteor, ... in my project I use bootbox.js to open a more beautiful prompt, how do I refer to this file in the meteor? I have others too

Since many thanks to all

    
asked by anonymous 10.12.2017 / 00:15

1 answer

0

In a newly created project for this test ...

meteor create --bare teste
meteor npm install --save jquery bootstrap bootbox

in /client/main.html

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
</head>

in /client/main.js

import 'bootstrap/dist/css/bootstrap.min.css';
window.$ = jQuery = require('jquery');
$(document).ready(() => {
  require('bootstrap');
  window.bootbox = require('bootbox');
  bootbox.alert("This is the default alert!");
});

Open the browser console and test the other examples from the bootboxjs.com site

    
24.12.2017 / 20:00