mirror of
https://github.com/astuto/astuto.git
synced 2025-12-16 03:37:56 +01:00
Switch from webpacker to (css|js)bundling-rails (#227)
* Install jsbundling-rails, uninstall rails/webpacker * Remove outdated step from run-tests workflow * Use cssbundling-rails for CSS
This commit is contained in:
committed by
GitHub
parent
e79d550070
commit
d8cf46c351
0
app/assets/builds/.keep
Normal file
0
app/assets/builds/.keep
Normal file
@@ -1,2 +1,2 @@
|
||||
//= link_tree ../images
|
||||
//= link_directory ../stylesheets .css
|
||||
//= link_tree ../builds
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
@@ -1,7 +1,12 @@
|
||||
// Entry point for your Sass build
|
||||
|
||||
/* Booststrap */
|
||||
@import 'vendors/bootstrap_custom';
|
||||
|
||||
/* Constants */
|
||||
@import 'constants/colors';
|
||||
|
||||
/* Common */
|
||||
@import 'common/index';
|
||||
@import 'common/custom_texts';
|
||||
@import 'common/form';
|
||||
38
app/assets/stylesheets/vendors/bootstrap_custom.scss
vendored
Normal file
38
app/assets/stylesheets/vendors/bootstrap_custom.scss
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
@import 'bootstrap/scss/_functions.scss';
|
||||
@import 'bootstrap/scss/_variables.scss';
|
||||
@import 'bootstrap/scss/_mixins.scss';
|
||||
@import 'bootstrap/scss/_root.scss';
|
||||
@import 'bootstrap/scss/_reboot.scss';
|
||||
@import 'bootstrap/scss/_type.scss';
|
||||
@import 'bootstrap/scss/_alert.scss';
|
||||
@import 'bootstrap/scss/_badge';
|
||||
@import 'bootstrap/scss/_breadcrumb';
|
||||
@import 'bootstrap/scss/_button-group';
|
||||
@import 'bootstrap/scss/_buttons';
|
||||
@import 'bootstrap/scss/_buttons.scss';
|
||||
@import 'bootstrap/scss/_card.scss';
|
||||
@import 'bootstrap/scss/_carousel.scss';
|
||||
@import 'bootstrap/scss/_close.scss';
|
||||
@import 'bootstrap/scss/_code.scss';
|
||||
@import 'bootstrap/scss/_custom-forms.scss';
|
||||
@import 'bootstrap/scss/_dropdown.scss';
|
||||
@import 'bootstrap/scss/_forms.scss';
|
||||
@import 'bootstrap/scss/_grid.scss';
|
||||
@import 'bootstrap/scss/_images.scss';
|
||||
@import 'bootstrap/scss/_input-group.scss';
|
||||
@import 'bootstrap/scss/_jumbotron.scss';
|
||||
@import 'bootstrap/scss/_list-group.scss';
|
||||
@import 'bootstrap/scss/_media.scss';
|
||||
@import 'bootstrap/scss/_modal.scss';
|
||||
@import 'bootstrap/scss/_nav.scss';
|
||||
@import 'bootstrap/scss/_navbar.scss';
|
||||
@import 'bootstrap/scss/_pagination.scss';
|
||||
@import 'bootstrap/scss/_popover.scss';
|
||||
@import 'bootstrap/scss/_print.scss';
|
||||
@import 'bootstrap/scss/_progress.scss';
|
||||
@import 'bootstrap/scss/_spinners.scss';
|
||||
@import 'bootstrap/scss/_tables.scss';
|
||||
@import 'bootstrap/scss/_toasts.scss';
|
||||
@import 'bootstrap/scss/_tooltip.scss';
|
||||
@import 'bootstrap/scss/_transitions.scss';
|
||||
@import 'bootstrap/scss/_utilities.scss';
|
||||
19
app/javascript/application.js
Normal file
19
app/javascript/application.js
Normal file
@@ -0,0 +1,19 @@
|
||||
// Entry point for the build script in your package.json
|
||||
|
||||
// turbolinks
|
||||
require("turbolinks").start();
|
||||
|
||||
// react-rails
|
||||
var componentRequireContext = require.context("./components", true);
|
||||
var ReactRailsUJS = require("react_ujs");
|
||||
ReactRailsUJS.useContext(componentRequireContext);
|
||||
|
||||
// bootstrap (js only)
|
||||
require('bootstrap/js/dist/alert');
|
||||
require('bootstrap/js/dist/button');
|
||||
require('bootstrap/js/dist/collapse');
|
||||
require('bootstrap/js/dist/dropdown');
|
||||
require('bootstrap/js/dist/util');
|
||||
|
||||
// i18n-js translations
|
||||
require('./translations/index.js.erb');
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.9 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.9 KiB |
@@ -1,28 +0,0 @@
|
||||
// This file is automatically compiled by Webpack, along with any other files
|
||||
// present in this directory. You're encouraged to place your actual application logic in
|
||||
// a relevant structure within app/javascript and only use these pack files to reference
|
||||
// that code so it'll be compiled.
|
||||
|
||||
require("@rails/ujs").start()
|
||||
require("turbolinks").start()
|
||||
require("@rails/activestorage").start()
|
||||
require("channels")
|
||||
|
||||
// i18n-js translations
|
||||
require('translations/index.js.erb')
|
||||
|
||||
require("./bootstrap_custom")
|
||||
require("../stylesheets/main")
|
||||
require("../images/favicon.png")
|
||||
require("../images/logo.png")
|
||||
|
||||
// Uncomment to copy all static images under ../images to the output folder and reference
|
||||
// them with the image_pack_tag helper in views (e.g <%= image_pack_tag 'rails.png' %>)
|
||||
// or the `imagePath` JavaScript helper below.
|
||||
//
|
||||
// const images = require.context('../images', true)
|
||||
// const imagePath = (name) => images(name, true)
|
||||
// Support component names relative to this directory:
|
||||
var componentRequireContext = require.context("components", true);
|
||||
var ReactRailsUJS = require("react_ujs");
|
||||
ReactRailsUJS.useContext(componentRequireContext);
|
||||
5
app/javascript/packs/bootstrap_custom.js
vendored
5
app/javascript/packs/bootstrap_custom.js
vendored
@@ -1,5 +0,0 @@
|
||||
import 'bootstrap/js/dist/alert'
|
||||
import 'bootstrap/js/dist/button'
|
||||
import 'bootstrap/js/dist/collapse'
|
||||
import 'bootstrap/js/dist/dropdown'
|
||||
import 'bootstrap/js/dist/util'
|
||||
@@ -1,5 +0,0 @@
|
||||
// By default, this pack is loaded for server-side rendering.
|
||||
// It must expose react_ujs as `ReactRailsUJS` and prepare a require context.
|
||||
var componentRequireContext = require.context("components", true);
|
||||
var ReactRailsUJS = require("react_ujs");
|
||||
ReactRailsUJS.useContext(componentRequireContext);
|
||||
@@ -1,38 +0,0 @@
|
||||
@import '~bootstrap/scss/_functions.scss';
|
||||
@import '~bootstrap/scss/_variables.scss';
|
||||
@import '~bootstrap/scss/_mixins.scss';
|
||||
@import '~bootstrap/scss/_root.scss';
|
||||
@import '~bootstrap/scss/_reboot.scss';
|
||||
@import '~bootstrap/scss/_type.scss';
|
||||
@import '~bootstrap/scss/_alert.scss';
|
||||
@import '~bootstrap/scss/_badge';
|
||||
@import '~bootstrap/scss/_breadcrumb';
|
||||
@import '~bootstrap/scss/_button-group';
|
||||
@import '~bootstrap/scss/_buttons';
|
||||
@import '~bootstrap/scss/_buttons.scss';
|
||||
@import '~bootstrap/scss/_card.scss';
|
||||
@import '~bootstrap/scss/_carousel.scss';
|
||||
@import '~bootstrap/scss/_close.scss';
|
||||
@import '~bootstrap/scss/_code.scss';
|
||||
@import '~bootstrap/scss/_custom-forms.scss';
|
||||
@import '~bootstrap/scss/_dropdown.scss';
|
||||
@import '~bootstrap/scss/_forms.scss';
|
||||
@import '~bootstrap/scss/_grid.scss';
|
||||
@import '~bootstrap/scss/_images.scss';
|
||||
@import '~bootstrap/scss/_input-group.scss';
|
||||
@import '~bootstrap/scss/_jumbotron.scss';
|
||||
@import '~bootstrap/scss/_list-group.scss';
|
||||
@import '~bootstrap/scss/_media.scss';
|
||||
@import '~bootstrap/scss/_modal.scss';
|
||||
@import '~bootstrap/scss/_nav.scss';
|
||||
@import '~bootstrap/scss/_navbar.scss';
|
||||
@import '~bootstrap/scss/_pagination.scss';
|
||||
@import '~bootstrap/scss/_popover.scss';
|
||||
@import '~bootstrap/scss/_print.scss';
|
||||
@import '~bootstrap/scss/_progress.scss';
|
||||
@import '~bootstrap/scss/_spinners.scss';
|
||||
@import '~bootstrap/scss/_tables.scss';
|
||||
@import '~bootstrap/scss/_toasts.scss';
|
||||
@import '~bootstrap/scss/_tooltip.scss';
|
||||
@import '~bootstrap/scss/_transitions.scss';
|
||||
@import '~bootstrap/scss/_utilities.scss';
|
||||
@@ -59,7 +59,7 @@
|
||||
|
||||
<%= button_to t('common.forms.auth.cancel_account'),
|
||||
registration_path(resource_name),
|
||||
data: { confirm: "Are you sure?" },
|
||||
onclick: "return confirm('#{t('common.confirmation')}')",
|
||||
method: :delete,
|
||||
class: "btn btn-danger btn-block" %>
|
||||
</div>
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
<%= link_to t('header.menu.profile_settings'), edit_user_registration_path, class: 'dropdown-item' %>
|
||||
<div class="dropdown-divider"></div>
|
||||
|
||||
<%= link_to t('header.menu.sign_out'), destroy_user_session_path, method: :delete, class: 'dropdown-item' %>
|
||||
<%= button_to t('header.menu.sign_out'), destroy_user_session_path, method: :delete, class: 'dropdown-item' %>
|
||||
</div>
|
||||
</li>
|
||||
<% else %>
|
||||
|
||||
@@ -11,9 +11,8 @@
|
||||
|
||||
<%= render 'layouts/set_js_locale' %>
|
||||
|
||||
<%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %>
|
||||
|
||||
<%= favicon_link_tag asset_pack_path('media/images/favicon.png') %>
|
||||
<%= javascript_include_tag "application", "data-turbo-track": "reload" %>
|
||||
<%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
Reference in New Issue
Block a user