Skip to content

Commit

Permalink
Working bootstrap Javascript
Browse files Browse the repository at this point in the history
  • Loading branch information
marick committed Jul 28, 2016
1 parent 7010313 commit 699c0e8
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
8 changes: 7 additions & 1 deletion brunch-config.js
Expand Up @@ -64,6 +64,12 @@ exports.config = {
},

npm: {
enabled: true
enabled: true,
whitelist: [
"jquery",
"bootstrap",
"bootstrap-select",
"phoenix",
"phoenix_html"],
}
};
3 changes: 3 additions & 0 deletions package.json
Expand Up @@ -6,6 +6,9 @@
"watch": "brunch watch --stdin"
},
"dependencies": {
"bootstrap": ">=3.3.7",
"bootstrap-select": ">=1.10.0",
"jquery": ">=3.0",
"phoenix": "file:deps/phoenix",
"phoenix_html": "file:deps/phoenix_html"
},
Expand Down
12 changes: 12 additions & 0 deletions web/static/js/app.js
Expand Up @@ -13,6 +13,18 @@
// to also remove its path from "config.paths.watched".
import "phoenix_html"

import $ from "jquery"
import "jquery"
import "bootstrap-select"

// Original version had this note about next line:
// "Needed for tether or bootstrap..."
// Because I don't know how/when the problem would
// show up if it's required for bootstrap, I'm leaving
// it in.
global.jQuery = require("jquery")
global.bootstrap = require("bootstrap")

// Import local files
//
// Local files can be imported directly using relative
Expand Down

0 comments on commit 699c0e8

Please sign in to comment.