diff --git a/brunch-config.js b/brunch-config.js index d2fe679..f4ed4ad 100644 --- a/brunch-config.js +++ b/brunch-config.js @@ -1,69 +1,77 @@ exports.config = { // See http://brunch.io/#documentation for docs. files: { javascripts: { joinTo: "js/app.js" // To use a separate vendor.js bundle, specify two files path // http://brunch.io/docs/config#-files- // joinTo: { // "js/app.js": /^(web\/static\/js)/, // "js/vendor.js": /^(web\/static\/vendor)|(deps)/ // } // // To change the order of concatenation of files, explicitly mention here // order: { // before: [ // "web/static/vendor/js/jquery-2.1.1.js", // "web/static/vendor/js/bootstrap.min.js" // ] // } }, stylesheets: { joinTo: "css/app.css", order: { after: ["web/static/css/app.css"] // concat app.css last } }, templates: { joinTo: "js/app.js" } }, conventions: { // This option sets where we should place non-css and non-js assets in. // By default, we set this to "/web/static/assets". Files in this directory // will be copied to `paths.public`, which is "priv/static" by default. assets: /^(web\/static\/assets)/ }, // Phoenix paths configuration paths: { // Dependencies and current project directories to watch watched: [ "web/static", "test/static" ], // Where to compile files to public: "priv/static" }, // Configure your plugins plugins: { babel: { // Do not use ES6 compiler in vendor code ignore: [/web\/static\/vendor/] + }, + copycat: { + fonts: ["node_modules/bootstrap/fonts"] } }, modules: { autoRequire: { "js/app.js": ["web/static/js/app"] } }, npm: { - enabled: true + enabled: true, + globals: { + $: "jquery", + jQuery: "jquery", + bootstrap: "bootstrap" + } } }; diff --git a/package.json b/package.json index 13de858..0af9f90 100644 --- a/package.json +++ b/package.json @@ -1,20 +1,23 @@ { "repository": {}, "license": "MIT", "scripts": { "deploy": "brunch build --production", "watch": "brunch watch --stdin" }, "dependencies": { "phoenix": "file:deps/phoenix", - "phoenix_html": "file:deps/phoenix_html" + "phoenix_html": "file:deps/phoenix_html", + "jquery": ">=2.1", + "bootstrap": "~3.3.7" }, "devDependencies": { "babel-brunch": "~6.0.0", "brunch": "2.7.4", "clean-css-brunch": "~2.0.0", "css-brunch": "~2.0.0", "javascript-brunch": "~2.0.0", - "uglify-js-brunch": "~2.0.1" + "uglify-js-brunch": "~2.0.1", + "copycat-brunch": "~1.1.0" } } diff --git a/web/templates/layout/app.html.eex b/web/templates/layout/app.html.eex index 17443c1..e2510f9 100644 --- a/web/templates/layout/app.html.eex +++ b/web/templates/layout/app.html.eex @@ -1,47 +1,45 @@
<%= get_flash(@conn, :info) %>
<%= get_flash(@conn, :error) %>