Closed agentVargas2012R closed 10 years ago
here here
I tried two approaches which both worked fine for me.
/* global Bootstrap */
.jshintrc
file:{
"predef": {
"document": true,
"window": true,
"location": true,
"setTimeout": true,
"Ember": true,
"Em": true,
"DS": true,
"$": true,
"Bootstrap": true
},
...
Ember App Kit / Ember CLI do it that way for Ember
, $
, etc., so I don't see a reason why we shouldn't do it like that for Bootstrap
.
I'm currently having the same issue, but the proposed solutions are not working for me:
Error:
Uncaught ReferenceError: Bootstrap is not defined vendor.js:75177
(anonymous function) vendor.js:75177
(anonymous function)
Specific line:
.jshintrc:
{
"predef": {
"document": true,
"window": true,
"Bootstrap": true,
"NetWorthENV": true
},
"browser" : true,
"boss" : true,
"curly": true,
"debug": false,
"devel": true,
"eqeqeq": true,
"evil": true,
"forin": false,
"immed": false,
"laxbreak": false,
"newcap": true,
"noarg": true,
"noempty": false,
"nonew": false,
"nomen": false,
"onevar": false,
"plusplus": false,
"regexp": false,
"undef": true,
"sub": true,
"strict": false,
"white": false,
"eqnull": true,
"esnext": true,
"unused": true
}
Brocfile:
/* global require, module */
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
var app = new EmberApp();
app.import('vendor/moment/moment.js');
app.import('vendor/bootstrap/dist/css/bootstrap.css');
var bsPath = 'vendor/ember-addons.bs_for_ember/dist/js/';
[
'bs-basic',
'bs-core',
'bs-alert'
].forEach(function(file){
app.import(bsPath + file + '.min.js');
});
module.exports = app.toTree();
Ember-CLI: version: 0.0.40
@agentVargas2012R Did the solution proposed above worked for you?
ahh never-mind, I had the wrong order while including the files (bs-core wasn't the first inclusion).
Hello Bootstrap-for-ember Team,
First off, I love this framework, its excellent!
All I'm trying to figure out at this point is the correct syntax for importing Bootstrap into my javascript file.
JSHint is having a fit about that.
Any help would be much appreciated!