Migrate to css bundling [SCI-8773]

This commit is contained in:
Anton 2023-07-06 13:19:28 +02:00
parent 93a6a0bdc5
commit f071e482d8
66 changed files with 248 additions and 424 deletions

View file

@ -14,7 +14,6 @@ gem 'psych', '< 4.0'
gem 'rails', '~> 7.0.5'
gem 'recaptcha', require: 'recaptcha/rails'
gem 'sanitize'
gem 'sassc-rails'
gem 'sprockets-rails'
gem 'view_component'
gem 'yomu', git: 'https://github.com/scinote-eln/yomu', branch: 'master'
@ -87,6 +86,7 @@ gem 'discard'
gem 'graphviz'
gem 'jsbundling-rails'
gem 'cssbundling-rails'
gem 'tailwindcss-rails', '~> 2.0'

View file

@ -230,6 +230,8 @@ GEM
crack (0.4.5)
rexml
crass (1.0.6)
cssbundling-rails (1.1.2)
railties (>= 6.0.0)
cucumber (8.0.0)
builder (~> 3.2, >= 3.2.4)
cucumber-ci-environment (~> 9.0, >= 9.0.4)
@ -600,14 +602,6 @@ GEM
sanitize (6.0.1)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
sassc (2.4.0)
ffi (~> 1.9)
sassc-rails (2.1.2)
railties (>= 4.0.0)
sassc (>= 2.0)
sprockets (> 3.0)
sprockets-rails
tilt
scenic (1.7.0)
activerecord (>= 4.0.0)
railties (>= 4.0.0)
@ -710,6 +704,7 @@ DEPENDENCIES
capybara
capybara-email
caracal!
cssbundling-rails
cucumber-rails
database_cleaner
deface (~> 1.9)
@ -772,7 +767,6 @@ DEPENDENCIES
rubyzip (>= 2.3.0)
rufus-scheduler
sanitize
sassc-rails
scenic (~> 1.4)
sdoc (~> 1.0)
selenium-webdriver

View file

@ -1,4 +1,3 @@
//= link_tree ../images
//= link application.js
//= link application.css
//= link_tree ../builds/

View file

@ -0,0 +1,139 @@
@import "sn-inter-font";
@import "sn-icon-font";
@import "shared_styles/constants";
@import "constants";
@import "mixins";
@import "bootstrap-datetimepicker";
@import "bootstrap-colorselector";
@import "bootstrap-tagsinput";
@import "bootstrap-tagsinput-typeahead";
@import "jstree_style.min";
@import "shared_styles/global_elements";
@import "handsontable.full.sass.scss";
@import "emojionearea.min";
@import "ajax-bootstrap-select.min";
@import "extend/bootstrap";
@import "extend/datatable";
@import "extend/perfect-scrollbar";
@import "access_permissions/access_modal";
@import "hooks/tinymce";
@import "hooks/tui_image_editor";
@import "partials/_inline_editing";
@import "partials/_tree_view";
@import "my_modules/protocols/index";
@import "my_modules/results/index";
@import "my_modules/protocol";
@import "my_modules/repositories";
@import "my_modules/status_flow";
@import "my_modules/stock_consumption_modal";
@import "protocols/index";
@import "protocols/preview_modal";
@import "protocols/protocol";
@import "protocols/tinymce_editor";
@import "dashboard/calendar";
@import "dashboard/create_task_modal";
@import "dashboard/current_tasks";
@import "dashboard/recent_work";
@import "dashboard/show";
@import "repository/assign_items_to_task_modal";
@import "repository/bmt_filters";
@import "repository/filters";
@import "repository/index";
@import "repository/print_progress_modal";
@import "repository/repository_print_label_modal";
@import "repository/repository_row_modal";
@import "repository/repository_table";
@import "repository/repository_toolbar";
@import "repository/stock_modal";
@import "experiment/canvas";
@import "experiment/show";
@import "experiment/table";
@import "repository_columns/date_type";
@import "repository_columns/index";
@import "repository_columns/list_type";
@import "repository_columns/status_type";
@import "repository_columns/stock_type";
@import "label_templates/index";
@import "label_templates/label_preview";
@import "label_templates/promo";
@import "label_templates/show";
@import "reports/new";
@import "settings/addons";
@import "settings/connected_accounts";
@import "settings/device_table";
@import "settings/label_printers";
@import "settings/preferences";
@import "settings/teams";
@import "settings/users";
@import "settings/webhooks";
@import "shared/action_toolbar";
@import "shared/assets";
@import "shared/avatar";
@import "shared/breadcrumbs";
@import "shared/cards";
@import "shared/comments_sidebar";
@import "shared/comments";
@import "shared/content_pane";
@import "shared/datatable";
@import "shared/datetime_picker";
@import "shared/dropdown_menu";
@import "shared/dropdown_selector";
@import "shared/file_preview";
@import "shared/filter_dropdown";
@import "shared/form_errors";
@import "shared/icons";
@import "shared/image_edit_modal";
@import "shared/inline_edit";
@import "shared/jstree_override";
@import "shared/kaminari_pagination";
@import "shared/mobile";
@import "shared/my_modules_list_partial";
@import "shared/pdf_preview";
@import "shared/select";
@import "shared/smart_annotation";
@import "steps/step";
@import "steps/step_attachments";
@import "themes/main_navigation";
@import "themes/menu_bar";
@import "themes/projects";
@import "themes/repositories";
@import "themes/scinote";
@import "navigation/general";
@import "navigation/breadcrumbs";
@import "navigation/left_menu";
@import "navigation/navigator";
@import "navigation/notifications";
@import "navigation/top_menu";
@import "bio_eddie";
@import "experiments";
@import "forgot_password";
@import "global_activities";
@import "marvinjs";
@import "my_modules";
@import "notifications";
@import "projects";
@import "protocol_management";
@import "report_index";
@import "reports_pdf.sass.scss";
@import "reports_print";
@import "repositories";
@import "search";
@import "session_expired";
@import "sign_up";
@import "sign_in";
@import "steps";
@import "system_notifications";
@import "tiny_mce";
body {
font-family: "SN Inter", "Open Sans", Arial, Helvetica, sans-serif;
}

View file

@ -1,45 +0,0 @@
/*
*= require_self
*= require sn-icon-font
*= require sn-inter-font
*= stub reports_pdf
*/
@import "shared_styles/constants/*";
@import "constants";
@import "bootstrap-datetimepicker";
@import "bootstrap-colorselector";
@import "bootstrap-tagsinput";
@import "bootstrap-tagsinput-typeahead";
@import "jstree_style.min";
@import "shared_styles/elements/*";
@import "handsontable.full";
@import "emojionearea.min";
@import "ajax-bootstrap-select.min";
@import "extend/bootstrap";
@import "access_permissions/*";
@import "extend/*";
@import "hooks/*";
@import "partials/*";
@import "my_modules/protocols/*";
@import "my_modules/results/*";
@import "my_modules/*";
@import "protocols/*";
@import "dashboard/*";
@import "repository/*";
@import "experiment/*";
@import "repository_columns/*";
@import "label_templates/*";
@import "reports/*";
@import "settings/*";
@import "shared/*";
@import "steps/*";
@import "themes/*";
@import "navigation/*";
@import "*"

View file

@ -4,8 +4,6 @@
// scss-lint:disable ImportantRule
// scss-lint:disable IdSelector
@import "constants";
@import "mixins";
// MarvinJs modal
.modal-bio-eddie {

View file

@ -1,7 +1,5 @@
/* Extending Bootstrap */
@import 'constants';
/* navbar avatar image */
.navbar-nav .dropdown-toggle[title="Account"] {
align-items: center;

View file

@ -1,6 +1,4 @@
// scss-lint:disable all
@import "constants";
.ps {
overflow: hidden !important;
overflow-anchor: none;

View file

@ -1,8 +1,6 @@
// scss-lint:disable SelectorDepth
// scss-lint:disable NestingDepth
@import "constants";
@import "mixins";
.global-activities-container {
background: $color-white;

View file

@ -1,6 +1,3 @@
@import "constants";
@import "mixins";
.mce-image-loader {
display: none !important;

View file

@ -1,6 +1,3 @@
@import "constants";
@import "mixins";
#tui-image-editor {
.tui-image-editor {
top: 0 !important;

View file

@ -1,7 +1,7 @@
// scss-lint:disable SelectorDepth
// scss-lint:disable NestingDepth
@import "../shared_styles/constants/*";
@import "../shared_styles/constants";
@import "../constants";
@page {

View file

@ -4,8 +4,6 @@
// scss-lint:disable ImportantRule
// scss-lint:disable IdSelector
@import "constants";
@import "mixins";
// MarvinJs modal
.modal-marvin-js {

View file

@ -4,8 +4,6 @@
// scss-lint:disable SelectorDepth SelectorFormat
// scss-lint:disable NestingDepth QualifyingElement
@import "constants";
// Fix for elements being scrolled to being hidden behind sticky navigation
html {
scroll-padding-top: 128px;

View file

@ -4,8 +4,8 @@
// scss-lint:disable ImportantRule
// scss-lint:disable IdSelector
@import "constants";
@import "mixins";
.my-module-header {
.my-module-title-row {

View file

@ -3,8 +3,8 @@
// scss-lint:disable SelectorFormat
// scss-lint:disable ImportantRule
@import "constants";
@import "mixins";
#results-toolbar {
align-items: center;

View file

@ -3,9 +3,6 @@
// scss-lint:disable SelectorFormat
// scss-lint:disable ImportantRule
@import "constants";
@import "mixins";
.content-pane.my-modules-protocols-index {
.status-flow-dropdown {
.dropdown-toggle {

View file

@ -1,5 +1,5 @@
@import 'constants';
@import "mixins";
.notifications-container {
margin-bottom: 20px;

View file

@ -1,6 +1,3 @@
@import "constants";
@import "mixins";
.inline-editing-container {
line-height: 32px;
position: relative;

View file

@ -1,236 +0,0 @@
/*!
* Start Bootstrap - Simple Sidebar HTML Template (http://startbootstrap.com)
* Code licensed under the Apache License v2.0.
* For details, see http://www.apache.org/licenses/LICENSE-2.0.
*/
// scss-lint:disable SelectorDepth
// scss-lint:disable NestingDepth
@import "constants";
@import "mixins";
:root {
--wrapper-width: 280px;
}
#wrapper {
display: none;
padding-left: var(--wrapper-width);
padding-right: 0;
transition: .4s $timing-function-sharp;
}
.sidebar-container {
background-color: $color-concrete;
display: flex;
flex-direction: column;
height: calc(100vh - var(--navbar-height));
left: var(--menu-bar-width);
position: fixed;
transition: .4s $timing-function-sharp;
width: var(--wrapper-width);
z-index: 999;
.show-sidebar {
display: none;
}
.sidebar-header {
align-items: center;
color: $color-silver-chalice;
display: flex;
flex-shrink: 0;
height: 2.5em;
padding: 0 1em;
.sidebar-title {
@include font-small;
}
.close-sidebar {
cursor: pointer;
display: inline-block;
line-height: 2em;
margin-left: auto;
text-align: center;
width: 2em;
}
}
.sidebar-body {
background: linear-gradient($color-concrete 30%, hsla(0, 0%, 100%, 0)),
linear-gradient(rgba(0, 0, 0, .1), transparent 70%);
background-attachment: local, scroll;
background-repeat: no-repeat;
background-size: 100% 1em, 100% .5em;
flex-basis: calc(100% - 2.5em);
flex-grow: 1;
overflow: auto;
position: relative;
}
.sidebar-footer {
flex-grow: 1;
flex-shrink: 0;
}
&.collapsed {
left: calc(var(--menu-bar-width) - var(--wrapper-width));
.show-sidebar {
background: $color-concrete;
border-radius: 0 $border-radius-default $border-radius-default 0;
cursor: pointer;
display: block;
line-height: 3em;
margin-right: -2em;
position: absolute;
right: 0;
text-align: center;
top: .5em;
width: 2em;
}
}
.sidebar-branch {
flex-basis: 100%;
flex-grow: 1;
list-style-type: none;
padding-left: 2.5em;
}
.delimiter {
background: $color-alto;
height: 1px;
margin: .5em 2.5em .5em 0;
}
.sidebar-leaf {
align-items: center;
display: flex;
flex-wrap: wrap;
.fa-map-marker-alt {
color: $color-alto;
}
&:hover .fa-map-marker-alt,
.fa-map-marker-alt.module-hover {
color: $color-concrete;
}
.toggle-branch {
cursor: pointer;
display: inline-block;
line-height: 4em;
margin-left: -2em;
margin-right: .5em;
position: relative;
text-align: center;
width: 1.5em;
&:hover ~ .sidebar-link:not(.selected) {
background: $color-alto;
}
&.collapsed ~ .sidebar-branch {
display: none;
}
}
.sidebar-link {
color: $color-black;
display: inline-block;
flex-grow: 1;
line-height: 2em;
margin-left: -2.5em;
max-width: var(--wrapper-width);
overflow: hidden;
padding: 1em 2.5em;
text-decoration: none;
text-overflow: ellipsis;
white-space: nowrap;
&:hover,
&.module-hover {
background: $color-alto;
}
&.selected {
background: $color-white;
color: $brand-primary;
font-weight: normal;
}
.fas {
margin-right: .5em;
}
.fa-folder {
color: $brand-primary-light;
}
&.back-button::before {
@include font-awesome;
content: "\f060";
left: 1em;
line-height: 26px;
position: absolute;
}
}
.canvas-center-on {
cursor: pointer;
display: inline-block;
line-height: 4em;
margin-left: -2.5em;
position: relative;
text-align: center;
width: 2.5em;
&:hover {
color: $brand-primary;
}
}
.repository-link {
padding-right: 3em;
position: relative;
.repository-share-status {
display: contents !important;
position: absolute;
right: -3em;
&.hidden {
display: none !important;
}
}
.fas-custom {
height: 4em;
padding: 1.25em .75em;
position: absolute;
right: 0;
top: 0;
width: 3em;
}
}
}
}
.my-module-group-element::before {
border-left: 1px dotted $color-emperor;
bottom: 20px;
content: "";
left: 34px;
position: absolute;
top: 25px;
}
.sidebar-no-module-group {
color: $color-silver-chalice;
}

View file

@ -1,9 +1,5 @@
// scss-lint:disable SelectorDepth
// scss-lint:disable NestingDepth
@import "constants";
@import "mixins";
.tree {
height: calc(100% - 30px);
padding-bottom: 30px;

View file

@ -1,8 +1,8 @@
// scss-lint:disable SelectorDepth
// scss-lint:disable NestingDepth
// scss-lint:disable IdSelector
@import "constants";
@import "mixins";
// Some color definitions
$color-group-hover: $color-alabaster;

View file

@ -1,6 +1,6 @@
// scss-lint:disable SelectorDepth, NestingDepth, SelectorFormat, ImportantRule, QualifyingElement, IdSelector
@import "constants";
#protocolsioModal {
.modal-body {

View file

@ -1,9 +1,6 @@
// scss-lint:disable SelectorDepth
// scss-lint:disable NestingDepth
@import "constants";
@import "mixins";
#protocol-preview-modal .modal-dialog {
.modal-body {
max-height: 75vh;

View file

@ -1,8 +1,6 @@
// scss-lint:disable SelectorDepth
// scss-lint:disable NestingDepth
@import "constants";
@import "mixins";
.content-pane.protocols-show {
background-color: $color-alto;

View file

@ -1,7 +1,7 @@
// scss-lint:disable SelectorDepth
// scss-lint:disable NestingDepth
@import 'constants';
@import "mixins";
/* Index page */
.report-table {

View file

@ -1,5 +1,5 @@
@import 'constants';
@import "mixins";
/** Custom CSS for report print (& PDF) */
body.print-report-body {

View file

@ -1,10 +1,6 @@
// scss-lint:disable SelectorDepth SelectorFormat QualifyingElement
// scss-lint:disable NestingDepth ImportantRule
@import "constants";
@import "layouts/reminders";
.repository-show {
margin: 0;

View file

@ -1,8 +1,8 @@
// scss-lint:disable SelectorDepth SelectorFormat QualifyingElement
// scss-lint:disable NestingDepth ImportantRule
@import "constants";
@import "layouts/reminders";
@import "../layouts/reminders";
.repository-table {
--content-header-size: 3.5rem;

View file

@ -2,7 +2,7 @@
// scss-lint:disable SelectorDepth
// scss-lint:disable NestingDepth
@import "constants";
#manage-repository-column {
.modal-content {

View file

@ -1,6 +1,6 @@
// scss-lint:disable NestingDepth
@import "constants";
#manage-repository-column {
.dropdown-preview {

View file

@ -1,7 +1,5 @@
// scss-lint:disable SelectorFormat
@import "constants";
.status-item-list {
max-height: 350px;
overflow-y: auto;

View file

@ -1,8 +1,6 @@
// scss-lint:disable SelectorDepth SelectorFormat
// scss-lint:disable NestingDepth ImportantRule
@import "constants";
@import "mixins";
.user-account-preferences {
.content-pane {

View file

@ -1,8 +1,6 @@
// scss-lint:disable SelectorDepth SelectorFormat
// scss-lint:disable NestingDepth ImportantRule
@import "constants";
@import "mixins";
.team-settings-pane {
.settings-team-name {

View file

@ -1,5 +1,3 @@
@import "constants";
@import "mixins";
.user-settings {
.settings-row {

View file

@ -1,8 +1,6 @@
// scss-lint:disable SelectorDepth SelectorFormat QualifyingElement
// scss-lint:disable NestingDepth ImportantRule
@import "constants";
@import "mixins";
.global-avatar-container {
border-radius: 15px;

View file

@ -1,8 +1,6 @@
// scss-lint:disable SelectorDepth SelectorFormat
// scss-lint:disable NestingDepth ImportantRule
@import "constants";
@import "mixins";
.comments-container {
// Comment item

View file

@ -1,8 +1,6 @@
// scss-lint:disable SelectorDepth
// scss-lint:disable NestingDepth
@import "constants";
.select-container--with-search .dropdown-selector-container {
&.active,
&.open {

View file

@ -1,4 +1,4 @@
@import "constants";
.fas-custom {
background-repeat: no-repeat;

View file

@ -1,7 +1,7 @@
// scss-lint:disable SelectorDepth
// scss-lint:disable NestingDepth
// scss-lint:disable IdSelector
@import "constants";
.folders-tree-container {
--row-height: 36px;

View file

@ -1 +1,7 @@
@import "constants/*";
@import "constants/borders";
@import "constants/colors";
@import "constants/fonts";
@import "constants/shadows";
@import "constants/transition";

View file

@ -1,7 +1,5 @@
// scss-lint:disable SelectorDepth, NestingDepth, ImportantRule
@import "constants";
.dropdown-menu .divider {
margin: 5px 0;
}

View file

@ -1,7 +1,15 @@
// scss-lint:disable Comment
@import "constants/*";
@import "elements/*";
@import "elements/alerts";
@import "elements/bootstrap_tabs";
@import "elements/checkboxes";
@import "elements/dialogs";
@import "elements/dropdown";
@import "elements/input_fields";
@import "elements/modal";
@import "elements/navigation";
@import "elements/radio_buttons";
@import "elements/toggles";
// Examples

View file

@ -6,11 +6,6 @@
// scss-lint:disable SelectorFormat
// scss-lint:disable ImportantRule
// scss-lint:disable Unknown
@import "constants";
@import "mixins";
#steps {
// hack only for firefox
@-moz-document url-prefix() {

View file

@ -1,7 +1,9 @@
// scss-lint:disable SelectorDepth
// scss-lint:disable NestingDepth
@import "components/*";
@import "components/checklist";
@import "components/table";
@import "components/text";
.step-container {
--left-component-padding: 24px;

View file

@ -1,5 +1,3 @@
@import "constants";
@import "mixins";
// System notification partial
.system-notification {

View file

@ -1,5 +1,4 @@
@import 'constants';
@import "mixins";
#main-nav {
box-shadow: $flyout-shadow;

View file

@ -1,5 +1,4 @@
@import "constants";
@import "mixins";
:root {
--menu-bar-width: 83px;

View file

@ -1,4 +1,4 @@
@import "constants";
// Projects overview table

View file

@ -1,4 +1,4 @@
@import "constants";
.repository-columns-body {
margin-top: 50px;

View file

@ -1,8 +1,6 @@
// scss-lint:disable SelectorDepth
// scss-lint:disable NestingDepth
@import "constants";
@import "mixins";
@import "main_navigation";
@import "repositories";
/** Layout **/

View file

@ -1,5 +1,5 @@
// scss-lint:disable ImportantRule SelectorDepth
@import "constants";
@font-face {
font-family: "tinymce";

View file

@ -10,8 +10,8 @@
<meta name="expiration-url" content="<%= users_expire_in_path %>">
<meta name="revive-url" content="<%= users_revive_session_path %>">
<% end %>
<%= stylesheet_link_tag "tailwind", "data-turbo-track": "reload" %>
<%= stylesheet_link_tag 'bootstrap', media: 'all' %>
<%= stylesheet_link_tag "tailwind", "data-turbo-track": "reload" %>
<%= stylesheet_link_tag 'application', media: 'all' %>
<%= stylesheet_link_tag 'application_pack', media: 'all' %>
<%= csp_meta_tag %>

View file

@ -7,7 +7,7 @@
<%= javascript_include_tag 'application' %>
<%= javascript_include_tag "handsontable.full" %>
<%= render 'shared/formulas_libraries' %>
<%= stylesheet_link_tag 'layouts/print_protocol', media: 'print, screen' %>
<%= stylesheet_link_tag 'print_protocol', media: 'print, screen' %>
<body>
<%= yield %>
<div id="handson"

View file

@ -10,6 +10,7 @@
html, body { height: 100%; min-height: 100%; }
</style>
<%= stylesheet_link_tag 'bootstrap', media: 'all' %>
<%= stylesheet_link_tag "tailwind", "data-turbo-track": "reload" %>
<%= stylesheet_link_tag 'application', media: 'all' %>
<%= stylesheet_link_tag 'application_pack', media: 'all' %>
<%= javascript_include_tag 'jquery_bundle' %>

13
bin/build-css Executable file
View file

@ -0,0 +1,13 @@
#!/usr/bin/env bash
./node_modules/sass/sass.js \
./app/assets/stylesheets/application.sass.scss:./app/assets/builds/application.css \
./vendor/assets/stylesheets/handsontable.sass.scss:./app/assets/builds/handsontable.css \
./vendor/assets/stylesheets/handsontable.formula.sass.scss:./app/assets/builds/handsontable.formula.css \
./app/assets/stylesheets/layouts/print_protocol.sass.scss:./app/assets/builds/print_protocol.css \
./vendor/assets/stylesheets/datatables.sass.scss:./app/assets/builds/datatables.css \
./app/assets/stylesheets/reports_pdf.sass.scss:./app/assets/builds/reports_pdf.css \
--no-source-map \
--load-path=node_modules \
--load-path=vendor/assets/stylesheets \
$@

View file

@ -0,0 +1,11 @@
class AssetUrlProcessor
def self.call(input)
context = input[:environment].context_class.new(input)
data = input[:data].gsub(/(\w*)-url\(\s*["']?(?!(?:\#|data|http))([^"'\s)]+)\s*["']?\)/) do |_match|
"url(#{context.asset_path($2, type: $1)})"
end
{data: data}
end
end
Sprockets.register_postprocessor "text/css", AssetUrlProcessor

View file

@ -15,7 +15,6 @@ Rails.application.config.assets.precompile += %w(underscore.js)
Rails.application.config.assets.precompile += %w(jsPlumb-2.0.4-min.js)
Rails.application.config.assets.precompile += %w(jsnetworkx.js)
Rails.application.config.assets.precompile += %w(handsontable.full.js)
Rails.application.config.assets.precompile += %w(handsontable.full.css)
Rails.application.config.assets.precompile += %w(sugar.min.js jquerymy-1.2.14.min.js)
Rails.application.config.assets.precompile += %w(users/settings/list_toggle.js.erb)
Rails.application.config.assets.precompile += %w(users/settings/account/preferences/index.js)
@ -64,15 +63,12 @@ Rails.application.config.assets.precompile += %w(protocols/import_export/eln_tab
Rails.application.config.assets.precompile += %w(protocols/import_export/import.js)
Rails.application.config.assets.precompile += %w(protocols/import_export/export.js)
Rails.application.config.assets.precompile += %w(protocols/handson.js)
Rails.application.config.assets.precompile += %w(layouts/print_protocol.css)
Rails.application.config.assets.precompile += %w(datatables.js)
Rails.application.config.assets.precompile += %w(search/index.js)
Rails.application.config.assets.precompile += %w(global_activities/side_pane.js)
Rails.application.config.assets.precompile += %w(navigation.js)
Rails.application.config.assets.precompile += %w(datatables.css)
Rails.application.config.assets.precompile += %w(my_modules.js)
Rails.application.config.assets.precompile += %w(Sortable.min.js)
Rails.application.config.assets.precompile += %w(reports_pdf.css)
Rails.application.config.assets.precompile += %w(jszip.min.js)
Rails.application.config.assets.precompile += %w(comments.js)
Rails.application.config.assets.precompile += %w(projects/show.js)
@ -136,7 +132,6 @@ Rails.application.config.assets.precompile += %w(formula.js)
Rails.application.config.assets.precompile += %w(parser.js)
Rails.application.config.assets.precompile += %w(ruleJS.js)
Rails.application.config.assets.precompile += %w(handsontable.formula.js)
Rails.application.config.assets.precompile += %w(handsontable.formula.css)
Rails.application.config.assets.precompile += %w(big.min.js)
# JQuery related includes

View file

@ -52,6 +52,23 @@ services:
- scinote_development_bundler:/usr/local/bundle/
- scinote_development_files:/usr/src/app/public/system
css_bundling:
build:
context: .
dockerfile: Dockerfile
image: scinote_web_development
container_name: scinote_css_bundling_development
stdin_open: true
tty: true
command: >
bash -c "yarn build:css --watch"
environment:
- NODE_ENV=development
volumes:
- .:/usr/src/app
- scinote_development_bundler:/usr/local/bundle/
- scinote_development_files:/usr/src/app/public/system
tailwind:
build:
context: .

View file

@ -19,7 +19,8 @@
"scripts": {
"flow": "flow",
"lint": "eslint .",
"build": "webpack --config ./config/webpack/webpack.config.js"
"build": "webpack --config ./config/webpack/webpack.config.js",
"build:css": "./bin/build-css"
},
"postinstall": "./engines_yarn_install.js",
"devDependencies": {
@ -81,7 +82,7 @@
"postcss": "8.2.15",
"postcss-loader": "5.3.0",
"raw-loader": "^4.0.2",
"sass": "1.60.0",
"sass": "^1.63.6",
"sass-loader": "^10.4.1",
"style-loader": "2.0.0",
"tinymce": "^6.1.2",

View file

@ -1,9 +1,9 @@
/*!
* (The MIT License)
*
*
* Copyright (c) 2012-2014 Marcin Warpechowski
* Copyright (c) 2015 Handsoncode sp. z o.o. <hello@handsoncode.net>
*
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* 'Software'), to deal in the Software without restriction, including
@ -11,10 +11,10 @@
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
*
* THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@ -22,7 +22,7 @@
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*
* Version: 6.2.2
* Release date: 19/12/2018 (built at 18/12/2018 14:40:17)
*/
@ -369,7 +369,7 @@
content: '*';
display: inline-block;
position: relative;
/* The multi-line header and header with longer text need more padding to not hide arrow,
/* The multi-line header and header with longer text need more padding to not hide arrow,
we make header wider in `GhostTable` to make some space for arrow which is positioned absolutely in the main table */
padding-right: 20px;
}

View file

@ -2000,7 +2000,7 @@ bootstrap-select@^1.13.18:
resolved "https://registry.yarnpkg.com/bootstrap-select/-/bootstrap-select-1.13.18.tgz#4557119d58dc1159189977161c803962220e4dda"
integrity sha512-V1IzK4rxBq5FrJtkzSH6RmFLFBsjx50byFbfAf8jYyXROWs7ZpprGjdHeoyq2HSsHyjJhMMwjsQhRoYAfxCGow==
bootstrap@^3.3, bootstrap@^3.4.1:
bootstrap@^3.4.1:
version "3.4.1"
resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-3.4.1.tgz#c3a347d419e289ad11f4033e3c4132b87c081d72"
integrity sha512-yN5oZVmRCwe5aKwzRj6736nSmKDX7pLYwsXiCj/EYmo16hODaBiT4En5btW/jhBF/seV+XMx3aYwukYC3A49DA==
@ -2946,16 +2946,6 @@ envinfo@^7.7.3:
resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.8.1.tgz#06377e3e5f4d379fea7ac592d5ad8927e0c4d475"
integrity sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw==
eonasdan-bootstrap-datetimepicker@^4.17.49:
version "4.17.49"
resolved "https://registry.yarnpkg.com/eonasdan-bootstrap-datetimepicker/-/eonasdan-bootstrap-datetimepicker-4.17.49.tgz#5534ba581c1e7eb988dbf773e2fed8a7f48cc76a"
integrity sha512-7KZeDpkj+A6AtPR3XjX8gAnRPUkPSfW0OmMANG1dkUOPMtLSzbyoCjDIdEcfRtQPU5X0D9Gob7wWKn0h4QWy7A==
dependencies:
bootstrap "^3.3"
jquery "^3.5.1"
moment "^2.10"
moment-timezone "^0.4.0"
err-code@^2.0.2:
version "2.0.3"
resolved "https://registry.yarnpkg.com/err-code/-/err-code-2.0.3.tgz#23c2f3b756ffdfc608d30e27c9a941024807e7f9"
@ -4433,7 +4423,7 @@ jquery@2.2.4:
resolved "https://registry.yarnpkg.com/jquery/-/jquery-2.2.4.tgz#2c89d6889b5eac522a7eea32c14521559c6cbf02"
integrity sha512-lBHj60ezci2u1v2FqnZIraShGgEXq35qCzMv4lITyHGppTnA13rwR0MgwyNJh9TnDs3aXUvd1xjAotfraMHX/Q==
"jquery@>=1.8.0 <4.0.0", jquery@^3.5.1:
"jquery@>=1.8.0 <4.0.0":
version "3.7.0"
resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.7.0.tgz#fe2c01a05da500709006d8790fe21c8a39d75612"
integrity sha512-umpJ0/k8X0MvD1ds0P9SfowREz2LenHsQaxSohMZ5OMNEU2r0tf8pdeEFTHMFxWVxKNyU9rTtK3CWzUCTKJUeQ==
@ -4972,14 +4962,7 @@ mkdirp@^1.0.3, mkdirp@^1.0.4:
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e"
integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==
moment-timezone@^0.4.0:
version "0.4.1"
resolved "https://registry.yarnpkg.com/moment-timezone/-/moment-timezone-0.4.1.tgz#81f598c3ad5e22cdad796b67ecd8d88d0f5baa06"
integrity sha512-5cNPVUwaVJDCe9JM8m/qz17f9SkaI8rpnRUyDJi2K5HAd6EwhuQ3n5nLclZkNC/qJnomKgQH2TIu70Gy2dxFKA==
dependencies:
moment ">= 2.6.0"
"moment@>= 2.6.0", moment@^2.10, moment@^2.29.4:
moment@^2.29.4:
version "2.29.4"
resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.4.tgz#3dbe052889fe7c1b2ed966fcb3a77328964ef108"
integrity sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==
@ -6196,10 +6179,10 @@ sass-loader@^10.4.1:
schema-utils "^3.0.0"
semver "^7.3.2"
sass@1.60.0:
version "1.60.0"
resolved "https://registry.yarnpkg.com/sass/-/sass-1.60.0.tgz#657f0c23a302ac494b09a5ba8497b739fb5b5a81"
integrity sha512-updbwW6fNb5gGm8qMXzVO7V4sWf7LMXnMly/JEyfbfERbVH46Fn6q02BX7/eHTdKpE7d+oTkMMQpFWNUMfFbgQ==
sass@^1.63.6:
version "1.63.6"
resolved "https://registry.yarnpkg.com/sass/-/sass-1.63.6.tgz#481610e612902e0c31c46b46cf2dad66943283ea"
integrity sha512-MJuxGMHzaOW7ipp+1KdELtqKbfAWbH7OLIdoSMnVe3EXPMTmxTmlaZDCTsgIpPCs3w99lLo9/zDKkOrJuT5byw==
dependencies:
chokidar ">=3.0.0 <4.0.0"
immutable "^4.0.0"