Remove LSG gem as it is will be replaced by a frontend-compiled solution. Thus we can also remove sassc and autoprefixer.

pull/8484/head
Henriette Darge 4 years ago
parent 37e653d881
commit 2bec452167
  1. 4
      Gemfile
  2. 26
      Gemfile.lock
  3. 0
      app/assets/stylesheets/styleguide.css
  4. 33
      config/initializers/sass.rb
  5. 4
      frontend/src/global_styles/fonts/_openproject_icon_definitions.scss
  6. 66
      lib/open_project/living_style_guide/template.rb

@ -156,10 +156,8 @@ group :production do
gem 'unicorn-worker-killer', require: false
end
gem 'autoprefixer-rails', '~> 9.7.4'
gem 'i18n-js', '~> 3.6.0'
gem 'rails-i18n', '~> 6.0.0'
gem 'sassc-rails', '~> 2.1.0'
gem 'sprockets', '~> 3.7.0'
# required by Procfile, for deployment on heroku or packaging with packager.io.
@ -244,8 +242,6 @@ group :development do
gem 'faker'
gem 'letter_opener'
# Todo for task #33508
#gem 'livingstyleguide', '~> 2.1.0'
gem 'spring'
gem 'spring-commands-rspec'

@ -283,8 +283,6 @@ GEM
attr_required (1.0.1)
auto_strip_attributes (2.5.0)
activerecord (>= 4.0)
autoprefixer-rails (9.7.4)
execjs
awesome_nested_set (3.2.0)
activerecord (>= 4.0.0, < 7.0)
aws-eventstream (1.0.3)
@ -313,8 +311,6 @@ GEM
debug_inspector (>= 0.0.1)
bootsnap (1.4.6)
msgpack (~> 1.0)
bourbon (6.0.0)
thor (~> 0.19)
brakeman (4.8.0)
browser (2.6.1)
builder (3.2.4)
@ -478,7 +474,6 @@ GEM
eventmachine (1.2.7)
eventmachine_httpserver (0.2.1)
excon (0.72.0)
execjs (2.7.0)
factory_bot (5.1.1)
activesupport (>= 4.2.0)
factory_bot_rails (5.1.1)
@ -582,12 +577,6 @@ GEM
listen (3.2.1)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
livingstyleguide (2.1.0)
minisyntax (>= 0.2.5)
redcarpet
sassc
thor
tilt
lobby_boy (0.1.3)
omniauth (~> 1.1)
omniauth-openid-connect (>= 0.2.1)
@ -614,7 +603,6 @@ GEM
mimemagic (0.3.5)
mini_mime (1.0.2)
mini_portile2 (2.4.0)
minisyntax (0.2.5)
minitest (5.14.1)
mixlib-shellout (2.1.0)
msgpack (1.3.3)
@ -782,7 +770,6 @@ GEM
rdoc (6.2.1)
recaptcha (5.5.0)
json
redcarpet (3.5.0)
reform (2.2.4)
disposable (>= 0.4.1)
representable (>= 2.4.0, < 3.1.0)
@ -865,15 +852,6 @@ GEM
crass (~> 1.0.2)
nokogiri (>= 1.8.0)
nokogumbo (~> 2.0)
sassc (2.0.1)
ffi (~> 1.9)
rake
sassc-rails (2.1.0)
railties (>= 4.0.0)
sassc (>= 2.0)
sprockets (> 3.0)
sprockets-rails
tilt
sawyer (0.8.2)
addressable (>= 2.3.5)
faraday (> 0.8, < 2.0)
@ -983,13 +961,11 @@ DEPENDENCIES
addressable (~> 2.7.0)
airbrake (~> 9.4.3)
auto_strip_attributes (~> 2.5)
autoprefixer-rails (~> 9.7.4)
awesome_nested_set (~> 3.2.0)
aws-sdk-core (~> 3.91.0)
aws-sdk-s3 (~> 1.61.0)
bcrypt (~> 3.1.6)
bootsnap (~> 1.4.5)
bourbon (~> 6.0.0)
brakeman (~> 4.8.0)
browser (~> 2.6.1)
capybara (~> 3.32.0)
@ -1032,7 +1008,6 @@ DEPENDENCIES
launchy (~> 2.5.0)
letter_opener
listen (~> 3.2.1)
livingstyleguide (~> 2.1.0)
lograge (~> 0.11.0)
meta-tags (~> 2.13.0)
multi_json (~> 1.14.1)
@ -1111,7 +1086,6 @@ DEPENDENCIES
ruby-progressbar (~> 1.10.0)
rubytree (~> 1.0.0)
sanitize (~> 5.2.1)
sassc-rails (~> 2.1.0)
secure_headers (~> 6.3.0)
selenium-webdriver (~> 3.14)
semantic (~> 1.6.1)

@ -1,33 +0,0 @@
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) 2012-2020 the OpenProject GmbH
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License version 3.
#
# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
# Copyright (C) 2006-2017 Jean-Philippe Lang
# Copyright (C) 2010-2013 the ChiliProject Team
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# See docs/COPYRIGHT.rdoc for more details.
#++
if defined?(LivingStyleGuide)
LivingStyleGuide.default_options[:scss_template] = OpenProject::LivingStyleGuide::Template
end
Rails.application.config.sass.load_paths << Rails.root.join('app', 'assets', 'stylesheets', 'vendor', 'foundation-apps', 'scss')

@ -1,7 +1,7 @@
@font-face {
font-family: "openproject-icon-font";
src: url("assets/fonts/openproject_icon/openproject-icon-font.woff2") format("woff2"),
url("assets/fonts/openproject_icon/openproject-icon-font.woff") format("woff");
src: url("~assets/fonts/openproject_icon/openproject-icon-font.woff2") format("woff2"),
url("~assets/fonts/openproject_icon/openproject-icon-font.woff") format("woff");
}
@mixin icon-mixin-accessibility {

@ -1,66 +0,0 @@
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) 2012-2020 the OpenProject GmbH
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License version 3.
#
# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
# Copyright (C) 2006-2017 Jean-Philippe Lang
# Copyright (C) 2010-2013 the ChiliProject Team
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# See docs/COPYRIGHT.rdoc for more details.
#++
module OpenProject
module LivingStyleGuide
class Template < SassC::Rails::SassTemplate
attr_accessor :filename
attr_accessor :data
def initialize(filename, options = {}, &block)
self.filename = filename
self.data = yield.gsub(/\n/, '')
super(options, &block)
end
def render(scope = nil, *)
engine = ::SassC::Engine.new(data, engine_options(scope))
Sprockets::Utils.module_include(::SassC::Script::Functions, @functions) do
engine.render
end
end
def engine_options(scope)
{
filename: filename,
line_comments: line_comments?,
syntax: self.class.syntax,
load_paths: scope.environment.paths,
importer: SassC::Rails::Importer,
sprockets: {
context: scope,
environment: scope.environment,
dependencies: scope.metadata[:dependency_paths]
}
}.merge!(config_options) { |key, left, right| safe_merge(key, left, right) }
end
end
end
end
Loading…
Cancel
Save