Skip to content

Commit 82f525d

Browse files
committed
Docs - switch to using bootstrap from npm
1 parent 8035745 commit 82f525d

File tree

5 files changed

+39
-4
lines changed

5 files changed

+39
-4
lines changed

etc/docs/assets/css/app.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This file is for your main application css. */
2-
2+
@import "../node_modules/bootstrap/scss/bootstrap";
33
/* LiveView specific classes for your customizations */
44
.phx-no-feedback.invalid-feedback,
55
.phx-no-feedback .invalid-feedback {

etc/docs/assets/js/app.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// We need to import the CSS so that webpack will load it.
22
// The MiniCssExtractPlugin is used to separate it out into
33
// its own CSS file.
4+
import 'bootstrap';
45
import "../css/app.scss"
56

67
// webpack automatically bundles all modules in your

etc/docs/assets/package-lock.json

+35
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

etc/docs/assets/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"watch": "webpack --mode development --watch"
88
},
99
"dependencies": {
10+
"bootstrap": "^5.1.1",
1011
"phoenix": "file:../deps/phoenix",
1112
"phoenix_html": "file:../deps/phoenix_html",
1213
"phoenix_live_view": "file:../deps/phoenix_live_view",
@@ -20,8 +21,8 @@
2021
"css-loader": "^3.4.2",
2122
"hard-source-webpack-plugin": "^0.13.1",
2223
"mini-css-extract-plugin": "^0.9.0",
23-
"sass": "^1.37.5",
2424
"optimize-css-assets-webpack-plugin": "^5.0.1",
25+
"sass": "^1.37.5",
2526
"sass-loader": "^8.0.2",
2627
"terser-webpack-plugin": "^2.3.2",
2728
"webpack": "^4.41.5",

etc/docs/lib/docs_web/templates/layout/root.html.leex

-2
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,9 @@
77
<%= csrf_meta_tag() %>
88
<%= live_title_tag assigns[:page_title] || "Docs", suffix: " · Phoenix Framework" %>
99
<link phx-track-static rel="stylesheet" href="<%= Routes.static_path(@conn, "/css/app.css") %>"/>
10-
<link phx-track-static rel="stylesheet" href="<%= Routes.static_path(@conn, "/css/bootstrap.min.css") %>"/>
1110
<script defer phx-track-static type="text/javascript" src="<%= Routes.static_path(@conn, "/js/app.js") %>"></script>
1211
</head>
1312
<body>
1413
<%= @inner_content %>
15-
<script defer phx-track-static type="text/javascript" src="<%= Routes.static_path(@conn, "/js/bootstrap.bundle.min.js") %>"></script>
1614
</body>
1715
</html>

0 commit comments

Comments
 (0)