042bb95
%{?nodejs_find_provides_and_requires}
042bb95
b61aa34
%global npm_name less
b61aa34
b61aa34
Name:           nodejs-%{npm_name}
b61aa34
Version:        4.1.2
b61aa34
Release:        1%{?dist}
5933895
Summary:        Less.js The dynamic stylesheet language
5933895
5933895
# cssmin.js is licensed under BSD license
5933895
# everything else is ASL 2.0
5933895
License:        ASL 2.0 and BSD
5933895
5933895
URL:            http://lesscss.org
9102456
Source0: http://registry.npmjs.org/less/-/less-%{version}.tgz
b61aa34
Source1: %{npm_name}-%{version}-nm-prod.tgz
5933895
5933895
BuildArch:      noarch
5933895
BuildRequires:  nodejs-devel
3b88f5d
BuildRequires:  nodejs-packaging
5933895
Requires:       nodejs
30492f4
ExclusiveArch: %{nodejs_arches} noarch
5933895
5933895
Provides:  lessjs = %{version}-%{release}
5933895
Obsoletes: lessjs < 1.3.3-2
5933895
b61aa34
5933895
%description
5933895
LESS extends CSS with dynamic behavior such as variables, mixins, operations
5933895
and functions. LESS runs on both the client-side (Chrome, Safari, Firefox)
5933895
and server-side, with Node.js and Rhino.
5933895
5933895
b61aa34
%prep
b61aa34
%autosetup -n package -p1
5933895
5933895
# Remove pre-built files from the dist/ directory
5933895
rm -f dist/*.js
5933895
b61aa34
tar xfz %{SOURCE1}
b61aa34
mkdir -p node_modules
b61aa34
pushd node_modules
b61aa34
ln -s ../node_modules_prod/* .
b61aa34
ln -s ../node_modules_prod/.bin .
b61aa34
popd
b61aa34
7ef7fa6
5933895
%build
5933895
# Nothing to be built, we're just carrying around flat files
5933895
b61aa34
5933895
%check
b61aa34
%{__nodejs} -e 'require("./")'
5933895
5933895
5933895
%install
5933895
mkdir -p %{buildroot}%{nodejs_sitelib}/less
b61aa34
b61aa34
cp -rp index.js \
b61aa34
       package.json \
b61aa34
       lib/ \
b61aa34
       %{buildroot}/%{nodejs_sitelib}/less
b61aa34
b61aa34
# Copy over bundled nodejs modules
b61aa34
cp -pr node_modules node_modules_prod \
b61aa34
    %{buildroot}%{nodejs_sitelib}/%{npm_name}
b61aa34
b61aa34
mkdir -p %{buildroot}%{nodejs_sitelib}/less/bin
b61aa34
install -p -D -m0755 bin/lessc %{buildroot}%{nodejs_sitelib}/less/bin/lessc
5933895
5933895
# Install /usr/bin/lessc
b61aa34
mkdir -p %{buildroot}%{_bindir}
b61aa34
ln -srf %{nodejs_sitelib}/less/bin/lessc \
b61aa34
        %{buildroot}%{_bindir}
5933895
5933895
5933895
%files
b61aa34
%doc README.md
5933895
%{_bindir}/lessc
5933895
%{nodejs_sitelib}/less
5933895
5933895
5933895
%changelog
b61aa34
* Mon Feb 28 2022 Stephen Gallagher <sgallagh@redhat.com> - 4.1.2-1
b61aa34
- Upgrade to 4.1.2 for support of recent Node.js versions
b61aa34
68054d3
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7.0-2
68054d3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
68054d3
37b45b9
* Wed Mar 05 2014 Stephen Gallagher <sgallagh@redhat.com> 1.7.0-1
37b45b9
- New upstream release 1.7.0
37b45b9
- https://github.com/less/less.js/blob/v1.7.0/CHANGELOG.md
37b45b9
- Add support for rulesets in variables and passed to mixins to allow wrapping
37b45b9
- Change luma to follow the w3c spec, luma is available as luminance. Contrast
37b45b9
  still uses luma so you may see differences if your threshold % is close to
37b45b9
  the existing calculated luma.
37b45b9
- Upgraded clean css which means the --selectors-merge-mode is now renamed
37b45b9
  --compatibility
37b45b9
- Add support for using variables with @keyframes, @namespace, @charset
37b45b9
- Support property merging with +_ when spaces are needed and keep + for comma
37b45b9
  separated
37b45b9
- Imports now always import once consistently- a race condition meant
37b45b9
  previously certain configurations would lead to a different ordering of
37b45b9
  files
37b45b9
- Fix support for `.mixin(@args...)` when called with no args (e.g.
37b45b9
  `.mixin();`)
37b45b9
- Do unit conversions with min and max functions. Don't pass through if not
37b45b9
  understood, throw an error
37b45b9
- Allow % to be passed on its own to the unit function e.g. `unit(10, %)`
37b45b9
- Fix a bug when comparing a unit value to a non-unit value if the unit-value
37b45b9
  was the multiple of another unit (e.g. cm, mm, deg etc.)
37b45b9
- Fix mixins with media queries in import reference files not being put into
37b45b9
  the output (they now output, they used to incorrectly not)
37b45b9
- Fix lint mode- now reports all errors
37b45b9
- Fixed a small scope issue with & {} selector rulesets incorrectly making
37b45b9
  mixins visible- regression from 1.6.2
37b45b9
- Browser- added log level "debug" at 3 to get less logging, The default has
37b45b9
  changed so unless you set the value to the default you won't see a
37b45b9
  difference
37b45b9
- Browser- logLevel takes effect regardless of the environment (production/dev)
37b45b9
- Browser- added postProcessor option, a function called to post-process the
37b45b9
  css before adding to the page
37b45b9
- Browser- use the right request for file access in IE
37b45b9
bebb8ca
* Tue Feb 25 2014 Stephen Gallagher <sgallagh@redhat.com> 1.6.3-1
bebb8ca
- New upstream release 1.6.3
bebb8ca
- https://github.com/less/less.js/blob/v1.6.3/CHANGELOG.md
bebb8ca
- Fix issue with calling toCSS twice not working in some situations (like with
bebb8ca
  bootstrap 2)
bebb8ca
- The Rhino release is fixed!
bebb8ca
- ability to use uppercase colours
bebb8ca
- Fix a nasty bug causing syntax errors when selector interpolation is preceded
bebb8ca
  by a long comment (and some other cases)
bebb8ca
- Fix a major bug with the variable scope in guards on selectors (e.g. not
bebb8ca
  mixins)
bebb8ca
- Fold in & when () { to the current selector rather than duplicating it
bebb8ca
- fix another issue with array prototypes
bebb8ca
- add a url-args option which adds a value to all urls (for cache busting)
bebb8ca
- Round numbers to 8 decimal places - thereby stopping javascript precision
bebb8ca
  errors
bebb8ca
- some improvements to the default() function in more complex scenarios
bebb8ca
- improved missing '{' and '(' detection
bebb8ca
3b88f5d
* Mon Jan 13 2014 Stephen Gallagher <sgallagh@redhat.com> - 1.6.1-1
3b88f5d
- New upstream release 1.6.1
3b88f5d
- https://github.com/less/less.js/blob/v1.6.1/CHANGELOG.md
3b88f5d
- support ^ and ^^ shadow dom selectors
3b88f5d
- fix sourcemap selector (used to report end of the element or selector) and
3b88f5d
  directive position (previously not supported)
3b88f5d
- fix parsing empty less files
3b88f5d
- error on (currently) ambiguous guards on multiple css selectors
3b88f5d
- older environments - protect against typeof regex returning function
3b88f5d
- Do not use default keyword
3b88f5d
- use innerHTML in tests, not innerText
3b88f5d
- protect for-in in case Array and Object prototypes have custom fields
3b88f5d
ccdf075
* Thu Jan 02 2014 Stephen Gallagher <sgallagh@redhat.com> - 1.6.0-1
ccdf075
- New upstream release 1.6.0
ccdf075
- https://github.com/less/less.js/blob/v1.6.0/CHANGELOG.md
ccdf075
- Properties can be interpolated, e.g. @{prefix}-property: value;
ccdf075
- a default function has been added only valid in mixin definitions to
ccdf075
  determine if no other mixins have been matched
ccdf075
- Added a plugins option that allows specifying an array of visitors run on the
ccdf075
  less AST
ccdf075
- Performance improvements that may result in approx 20-40% speed up
ccdf075
- Javascript evaluations returning numbers can now be used in
ccdf075
  calculations/functions
ccdf075
- fixed issue when adding colours, taking the alpha over 1 and breaking when
ccdf075
  used in colour functions
ccdf075
- when adding together 2 colours with non zero alpha, the alpha will now be
ccdf075
  combined rather than added
ccdf075
- the advanced colour functions no longer ignore transparency, they blend that
ccdf075
  too
ccdf075
- Added --clean-option and cleancssOptions to allow passing in clean css
ccdf075
  options
ccdf075
- rgba declarations are now always clamped e.g. rgba(-1,258,258, -1) becomes
ccdf075
  rgba(0, 255, 255, 0)
ccdf075
- Fix possible issue with import reference not bringing in styles (may not be a
ccdf075
  bugfix, just a code tidy)
ccdf075
- Fix some issues with urls() being prefixed twice and unquoted urls in mixins
ccdf075
  being processed each time they are called
ccdf075
- Fixed error messages for undefined variables in javascript evaluation
ccdf075
- Fixed line/column numbers from math errors
ccdf075
8cd30b5
* Tue Nov 26 2013 Stephen Gallagher <sgallagh@redhat.com> - 1.5.1-1
8cd30b5
- New upstream release 1.5.1
8cd30b5
- https://github.com/less/less.js/blob/v1.5.1/CHANGELOG.md
8cd30b5
- Added source-map-URL option
8cd30b5
- Fixed a bug which meant the minimised 1.5.0 browser version was not wrapped,
8cd30b5
  meaning it interfered with require js
8cd30b5
- Fixed a bug where the browser version assume port was specified
8cd30b5
- Added the ability to specify variables on the command line
8cd30b5
- Upgraded clean-css and fixed it from trying to import
8cd30b5
- correct a bug meaning imports weren't synchronous (syncImport option
8cd30b5
  available for full synchronous behaviour)
8cd30b5
- better mixin matching behaviour with calling multiple classes e.g. .a.b.c;
8cd30b5
6de86d5
* Tue Oct 22 2013 Stephen Gallagher <sgallagh@redhat.com> - 1.5.0-1
6de86d5
- New upstream release 1.5.0
6de86d5
- https://github.com/less/less.js/blob/v1.5.0/CHANGELOG.md
6de86d5
- sourcemap support
6de86d5
- support for import inline option to include css that you do NOT want less to
6de86d5
  parse e.g. `@import (inline) "file.css";`
6de86d5
- better support for modifyVars (refresh styles with new variables, using a
6de86d5
  file cache), is now more resiliant
6de86d5
- support for import reference option to reference external css, but not output
6de86d5
  it. Any mixin calls or extend's will be output.
6de86d5
- support for guards on selectors (currently only if you have a single
6de86d5
  selector)
6de86d5
- allow property merging through the +: syntax
6de86d5
- Added min/max functions
6de86d5
- Added length function and improved extract to work with comma seperated
6de86d5
  values
6de86d5
- when using import multiple, sub imports are imported multiple times into
6de86d5
  final output
6de86d5
- fix bad spaces between namespace operators
6de86d5
- do not compress comment if it begins with an exclamation mark
6de86d5
- Fix the saturate function to pass through when using the CSS syntax
6de86d5
- Added svg-gradient function
6de86d5
- Added no-js option to lessc (in browser, use javascriptEnabled: false) which
6de86d5
  disallows JavaScript in less files
6de86d5
- switched from the little supported and buggy cssmin (previously ycssmin) to
6de86d5
  clean-css
6de86d5
- support transparent as a color, but not convert between rgba(0, 0, 0, 0) and
6de86d5
  transparent
6de86d5
- remove sys.puts calls to stop deprecation warnings in future node.js releases
6de86d5
- Browser: added logLevel option to control logging (2 = everything, 1 = errors
6de86d5
  only, 0 = no logging)
6de86d5
- Browser: added errorReporting option which can be "html" (default) or
6de86d5
  "console" or a function
6de86d5
- Now uses grunt for building and testing
6de86d5
- A few bug fixes for media queries, extends, scoping, compression and import
6de86d5
  once.
6de86d5
- if you don't pass a strict maths option, font size/line height options are
6de86d5
  output correctly again
6de86d5
- npmignore now include .gitattributes
6de86d5
- property names may include capital letters
6de86d5
- various windows path fixes (capital letters, multiple // in a path)
6de86d5
08aa0ff
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.1-2
08aa0ff
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
08aa0ff
38db4b5
* Fri Jul 05 2013 Stephen Gallagher <sgallagh@redhat.com> - 1.4.1-1
38db4b5
- New upstream release 1.4.1
38db4b5
- https://github.com/less/less.js/blob/v1.4.1/CHANGELOG.md
38db4b5
- Fix syncImports and yui-compress option, as they were being ignored
38db4b5
- Fixed several global variable leaks
38db4b5
- Handle getting null or undefined passed as the options object
38db4b5
9102456
* Tue Jun 18 2013 Stephen Gallagher <sgallagh@redhat.com> - 1.4.0-1
9102456
- New upstream release 1.4.0
9102456
- https://github.com/cloudhead/less.js/blob/master/CHANGELOG.md
9102456
- support for :extend() in selectors (e.g. input:extend(.button) {}) and &
9102456
  :extend(); in ruleset (e.g. input { &:extend(.button all); })
9102456
- maths is now only done inside brackets. This means font: statements, media
9102456
  queries and the calc function can use a simpler format without being escaped.
9102456
  Disable this with --strict-maths-off in lessc and strictMaths:false in
9102456
  JavaScript.
9102456
- units are calculated, e.g. 200cm+1m = 3m, 3px/1px = 3. If you use units
9102456
  inconsistently you will get an error. Suppress this error with
9102456
  --strict-units-off in lessc or strictUnits:false in JavaScript
9102456
- (~"@var") selector interpolation is removed. Use @{var} in selectors to have
9102456
  variable selectors
9102456
- default behaviour of import is to import each file once. @import-once has
9102456
  been removed.
9102456
- You can specify options on imports to force it to behave as css or less
9102456
  @import (less) "file.css" will process the file as less
9102456
- variables in mixins no longer 'leak' into their calling scope
9102456
- added data-uri function which will inline an image into the output css. If
9102456
  ieCompat option is true and file is too large, it will fallback to a url()
9102456
- significant bug fixes to our debug options
9102456
- other parameters can be used as defaults in mixins e.g. .a(@a, @b:@a)
9102456
- an error is shown if properties are used outside of a ruleset
9102456
- added extract function which picks a value out of a list,
9102456
  e.g. extract(12 13 14, 3) => 3
9102456
- added luma, hsvhue, hsvsaturation, hsvvalue functions
9102456
- added pow, pi, mod, tan, sin, cos, atan, asin, acos and sqrt math functions
9102456
- added convert function, e.g. convert(1rad, deg) => value in degrees
9102456
- lessc makes output directories if they don't exist
9102456
- lessc @import supports https and 301's
9102456
- lessc "-depends" option for lessc writes out the list of import files used in
9102456
  makefile format
9102456
- lessc "-lint" option just reports errors
9102456
- support for namespaces in attributes and selector interpolation in attributes
9102456
- other bug fixes
9102456
- strictUnits now defaults to false and the true case now gives more useful but
9102456
  less correct results, e.g. 2px/1px = 2px
9102456
- Process ./ when having relative paths
9102456
- add isunit function for mixin guards and non basic units
9102456
- extends recognise attributes
9102456
- exception errors extend the JavaScript Error
9102456
- remove es-5-shim as standard from the browser
9102456
- Fix path issues with windows/linux local paths
9102456
- change strictMaths to strictMath. Enable this with --strict-math=on in lessc
9102456
  and strictMath:true in JavaScript.
9102456
- change lessc option for strict units to --strict-units=off
9102456
- fix passing of strict maths option
9102456
30492f4
* Tue Jun 18 2013 Stephen Gallagher <sgallagh@redhat.com> - 1.3.3-5
30492f4
- Use correct build architectures
30492f4
7ef7fa6
* Mon May 06 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.3.3-4
7ef7fa6
- enable compression using ycssmin
7ef7fa6
5933895
* Wed Apr 10 2013 Stephen Gallagher <sgallagh@redhat.com> - 1.3.3-3
5933895
- Fix BuildRequires to include nodejs-devel
5933895
5933895
* Tue Apr 09 2013 Stephen Gallagher <sgallagh@redhat.com> - 1.3.3-2
5933895
- Rename package to nodejs-less
5933895
5933895
* Tue Apr 09 2013 Stephen Gallagher <sgallagh@redhat.com> - 1.3.3-1
5933895
- Upgrade to new upstream release and switch to proper Node.js packaging
5933895
- New upstream release 1.3.3
5933895
    * Fix critical bug with mixin call if using multiple brackets
5933895
    * When using the filter contrast function, the function is passed through if
5933895
      the first argument is not a color
5933895
- New upstream release 1.3.2
5933895
    * browser and server url re-writing is now aligned to not re-write (previous
5933895
      lessc behaviour)
5933895
    * url-rewriting can be made to re-write to be relative to the entry file
5933895
      using the relative-urls option (less.relativeUrls option)
5933895
    * rootpath option can be used to add a base path to every url
5933895
    * Support mixin argument seperator of ';' so you can pass comma seperated
5933895
      values. e.g. .mixin(23px, 12px;);
5933895
    * Fix lots of problems with named arguments in corner cases, not behaving
5933895
      as expected
5933895
    * hsv, hsva, unit functions
5933895
    * fixed lots more bad error messages
5933895
    * fix @import-once to use the full path, not the relative one for
5933895
      determining if an import has been imported already
5933895
    * support :not(:nth-child(3))
5933895
    * mixin guards take units into account
5933895
    * support unicode descriptors (U+00A1-00A9)
5933895
    * support calling mixins with a stack when using & (broken in 1.3.1)
5933895
    * support @namespace and namespace combinators
5933895
    * when using %% with colour functions, take into account a colour is out of
5933895
      256
5933895
    * when doing maths with a %% do not divide by 100 and keep the unit
5933895
    * allow url to contain %% (e.g. %%20 for a space)
5933895
    * if a mixin guard stops execution a default mixin is not required
5933895
    * units are output in strings (use the unit function if you need to get the
5933895
      value without unit)
5933895
    * do not infinite recurse when mixins call mixins of the same name
5933895
    * fix issue on important on mixin calls
5933895
    * fix issue with multiple comments being confused
5933895
    * tolerate multiple semi-colons on rules
5933895
    * ignore subsequant @charset
5933895
    * syncImport option for node.js to read files syncronously
5933895
    * write the output directory if it is missing
5933895
    * change dependency on cssmin to ycssmin
5933895
    * lessc can load files over http
5933895
    * allow calling less.watch() in non dev mode
5933895
    * don't cache in dev mode
5933895
    * less files cope with query parameters better
5933895
    * sass debug statements are now chrome compatible
5933895
    * modifyVars function added to re-render with different root variables
5933895
5933895
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.1-5
5933895
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
5933895
5933895
* Wed Dec 19 2012 Stephen Gallagher <sgallagh@redhat.com> - 1.3.1-4
5933895
- Unbundle cssmin.js from the sources
5933895
- Throw an error when --yui-compress is passed at the lessc command line
5933895
- Convert assorted %%prep actions into patches
5933895
5933895
* Wed Dec 19 2012 Matthias Runge <mrunge@redhat.com> - 1.3.1-3
5933895
- include LICENSE and README.md
5933895
5933895
* Wed Dec 19 2012 Matthias Runge <mrunge@redhat.com> - 1.3.1-2
5933895
- minor spec cleanup
5933895
- clear dist-dir
5933895
- license clearification
5933895
5933895
* Thu Dec 13 2012 Stephen Gallagher <sgallagh@redhat.com> - 1.3.1-1
5933895
- Update to the 1.3.1 release
5933895
- Fix versioning bugs, get the tarball from a cleaner, tagged location
5933895
5933895
* Mon Sep 17 2012 Matthias Runge <mrunge@redhat.com> - 1.3.0-20120917git55d6e5a.1
5933895
- initial packaging