diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css deleted file mode 100644 index d05ea0f..0000000 --- a/app/assets/stylesheets/application.css +++ /dev/null @@ -1,15 +0,0 @@ -/* - * This is a manifest file that'll be compiled into application.css, which will include all the files - * listed below. - * - * Any CSS and SCSS file within this directory, lib/assets/stylesheets, or any plugin's - * vendor/assets/stylesheets directory can be referenced here using a relative path. - * - * You're free to add application-wide styles to this file and they'll appear at the bottom of the - * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS - * files in this directory. Styles in this file should be added after the last require_* statement. - * It is generally better to create a new file per style scope. - * - *= require_tree . - *= require_self - */ diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss deleted file mode 100644 index d05ea0f..0000000 --- a/app/assets/stylesheets/application.scss +++ /dev/null @@ -1,15 +0,0 @@ -/* - * This is a manifest file that'll be compiled into application.css, which will include all the files - * listed below. - * - * Any CSS and SCSS file within this directory, lib/assets/stylesheets, or any plugin's - * vendor/assets/stylesheets directory can be referenced here using a relative path. - * - * You're free to add application-wide styles to this file and they'll appear at the bottom of the - * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS - * files in this directory. Styles in this file should be added after the last require_* statement. - * It is generally better to create a new file per style scope. - * - *= require_tree . - *= require_self - */ diff --git a/app/javascript/packs/application.js b/app/javascript/packs/application.js index 54b106e..a18eca2 100644 --- a/app/javascript/packs/application.js +++ b/app/javascript/packs/application.js @@ -7,4 +7,5 @@ // To reference this file, add <%= javascript_pack_tag 'application' %> to the appropriate // layout file, like app/views/layouts/application.html.erb -console.log('Hello World from Webpacker') +import 'bootstrap' +import './src/application.scss' diff --git a/app/javascript/packs/src/application.scss b/app/javascript/packs/src/application.scss new file mode 100644 index 0000000..5de3350 --- /dev/null +++ b/app/javascript/packs/src/application.scss @@ -0,0 +1 @@ +@import '~bootstrap/scss/bootstrap'; diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 0b09464..4f32288 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -5,7 +5,7 @@ <%= csrf_meta_tags %> <%= csp_meta_tag %> - <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %> + <%= stylesheet_pack_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %> <%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %> diff --git a/package.json b/package.json index e136514..bae2ca7 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,10 @@ "name": "chexpire", "private": true, "dependencies": { - "@rails/webpacker": "3.5" + "@rails/webpacker": "3.5", + "bootstrap": "^4.1.1", + "jquery": "^3.3.1", + "popper.js": "^1.14.3" }, "devDependencies": { "webpack-dev-server": "2.11.2" diff --git a/yarn.lock b/yarn.lock index d49652d..d51071e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -879,6 +879,10 @@ boom@2.x.x: dependencies: hoek "2.x.x" +bootstrap@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-4.1.1.tgz#3aec85000fa619085da8d2e4983dfd67cf2114cb" + brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -3014,6 +3018,10 @@ isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" +jquery@^3.3.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.3.1.tgz#958ce29e81c9790f31be7792df5d4d95fc57fbca" + js-base64@^2.1.8, js-base64@^2.1.9: version "2.4.5" resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.4.5.tgz#e293cd3c7c82f070d700fc7a1ca0a2e69f101f92" @@ -3973,6 +3981,10 @@ pleeease-filters@^4.0.0: onecolor "^3.0.4" postcss "^6.0.1" +popper.js@^1.14.3: + version "1.14.3" + resolved "https://registry.yarnpkg.com/popper.js/-/popper.js-1.14.3.tgz#1438f98d046acf7b4d78cd502bf418ac64d4f095" + portfinder@^1.0.9: version "1.0.13" resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.13.tgz#bb32ecd87c27104ae6ee44b5a3ccbf0ebb1aede9"