Skip to content

Commit

Permalink
[TRA-1723] Move all assets to webpack (#541)
Browse files Browse the repository at this point in the history
Filipe Chagas authored Jun 30, 2021
1 parent b29164a commit 63b88dc
Showing 12 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion Public/assets/main.css

Large diffs are not rendered by default.

12 changes: 2 additions & 10 deletions Public/assets/main.js

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions Public/external/jquery-3.6.0/jquery.min.js

This file was deleted.

5 changes: 1 addition & 4 deletions Resources/Views/index.leaf
Original file line number Diff line number Diff line change
@@ -103,10 +103,7 @@
</div>

<!-- Footer Scripts -->
<script async src="external/url-search-params-1.1.0/url-search-params.min.js"></script>
<script src="external/jquery-3.6.0/jquery.min.js"></script>
<script async src="external/select2-4.0.13/select2.min.js"></script>
<script async src="js/app.js"></script>
<script async src="assets/main.js"></script>
<script async>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -17,6 +17,7 @@
"css-loader": "^5.2.6",
"css-minimizer-webpack-plugin": "^3.0.1",
"file-loader": "^6.2.0",
"jquery": "^3.6.0",
"less": "^4.1.1",
"less-loader": "^10.0.0",
"mini-css-extract-plugin": "^1.6.0",
4 changes: 4 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -2,3 +2,7 @@ import "./css/bootstrap-extract.css";
import "./css/select2.min.css";
import "./less/select2-toptal-theme.less";
import "./less/app.less";

import "./js/select2-4.0.13/select2.min.js"
import "./js/url-search-params-1.1.0/url-search-params.min.js"
import "./js/app.js"
2 changes: 2 additions & 0 deletions Public/js/app.js → src/js/app.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import $ from 'jquery';

$(function () {

$.ajax(window.BASE_PREFIX + '/dropdown/templates.json').done(function(data) {
File renamed without changes.
1 change: 1 addition & 0 deletions src/less/app.less
Original file line number Diff line number Diff line change
@@ -140,6 +140,7 @@ main {

img {
width: 100%;
height: auto;
max-width: 370px;
}

2 changes: 1 addition & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
@@ -48,7 +48,7 @@ module.exports = {
optimization: {
minimizer: [
// For webpack@5 you can use the `...` syntax to extend existing minimizers (i.e. `terser-webpack-plugin`), uncomment the next line
// `...`,
`...`,
new CssMinimizerPlugin(),
],
},
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
@@ -3133,6 +3133,11 @@ jest@^25.1.0:
import-local "^3.0.2"
jest-cli "^25.5.4"

jquery@^3.6.0:
version "3.6.0"
resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.6.0.tgz#c72a09f15c1bdce142f49dbf1170bdf8adac2470"
integrity sha512-JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw==

js-tokens@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"

0 comments on commit 63b88dc

Please sign in to comment.