# Generated from mindful_sass-0.0.3.gem by gem2rpm -*- rpm-spec -*- %global gem_name mindful_sass Name: rubygem-%{gem_name} Version: 0.0.3 Release: 1%{?dist} Summary: provides a recursive observer for sass command line tool. Takes the same arguments as sass, using the sass single file syntax License: GPL-3 Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem BuildRequires: ruby(release) BuildRequires: rubygems-devel BuildRequires: ruby BuildArch: noarch %description
Sass or the much better approach of scss is really helpful and a big silver bullet for my css structuring in ruby projects.
Standard sass command works for whole directories or single files only. In general it gets the jobs we want done, but in practical usage i think the sass command tool is a little bit unconvinient. A common scenario for me is, that you have whole bunch of sass files, which you want to compile to a single compressed output file. But if you have splitted your sass files in component based modules and you want to watch the complete folder you have to care for dependency handling in each file, because each file will be compiled for its own.
# compiling a complete folder with scss ~ $ sass css/scss:css/compiled
So converting the whole folder is not what i want, because i don\'t want to import for example my color.sass config file in each module again. Compiling a single file seems to be the better solution, and it works in general, as expected, but the devil is in the detail.
# compiling a single file where the other files are imported. ~ $ sass css/scss/main.scss:css/compiled/main.css
If we change a file with impact to our main.sass file, the --watch handle will not get it, because it observes only the timestamp of the given main.sass.
Here is it, where mindful_sass tries to help out. You use it according to the single file variant of sass, but it tries to observe the whole folder the given sass file is placed. If a timestamp of file in the sass folder or its children changes it will compile the specified main.sass again.
This gem is not aimed to replace anything in the sass universe. It is only a wrapper to avoid the described unconvinience, and i hope that it gets useless as fast as possible, because the sass development gets this feature done for themselves.
Thanks anyway to the sass developer team.
. %package doc Summary: Documentation for %{name} Requires: %{name} = %{version}-%{release} BuildArch: noarch %description doc Documentation for %{name}. %prep %setup -q -n %{gem_name}-%{version} %build # Create the gem as gem install only works on a gem file gem build ../%{gem_name}-%{version}.gemspec # %%gem_install compiles any C extensions and installs the gem into ./%%gem_dir # by default, so that we can move it into the buildroot in %%install %gem_install %install mkdir -p %{buildroot}%{gem_dir} cp -a .%{gem_dir}/* \ %{buildroot}%{gem_dir}/ mkdir -p %{buildroot}%{_bindir} cp -a .%{_bindir}/* \ %{buildroot}%{_bindir}/ find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x %check pushd .%{gem_instdir} # Run the test suite. popd %files %dir %{gem_instdir} %{_bindir}/mindful_sass %{gem_instdir}/bin %{gem_libdir} %exclude %{gem_cache} %{gem_spec} %files doc %doc %{gem_docdir} %changelog * Tue Apr 19 2022 mockbuilder - 0.0.3-1 - Initial package