Skip to content

Commit

Permalink
update readme, reduce no. of builds for travis (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
bartveneman committed Dec 21, 2018
1 parent d6b32a8 commit 113e755
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 21 deletions.
4 changes: 1 addition & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
language: node_js
node_js:
- '6'
- '7'
- '8'
- '9'
- '10'
- '10'
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
"homepage": "https://www.projectwallace.com/oss",
"main": "color-sorter.js",
"scripts": {
"test": "xo && ava",
"test:watch": "ava --watch"
"test": "xo && ava"
},
"repository": {
"type": "git",
Expand Down
29 changes: 13 additions & 16 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
# color-sorter [![Build Status](https://travis-ci.org/bartveneman/color-sorter.svg?branch=master)](https://travis-ci.org/bartveneman/color-sorter) [![Known Vulnerabilities](https://snyk.io/test/github/bartveneman/color-sorter/badge.svg)](https://snyk.io/test/github/bartveneman/color-sorter) ![Dependencies Status](https://img.shields.io/david/bartveneman/color-sorter.svg) ![Dependencies Status](https://img.shields.io/david/dev/bartveneman/color-sorter.svg) [![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo)

Sort CSS colors by hue, then by saturation. Black-grey-white colors (colors with 0% saturation) are shifted to the end. Fully transparent colors are placed at the *very* end.
Sort CSS colors by hue, then by saturation. Black-grey-white colors (colors with
0% saturation) are shifted to the end. Fully transparent colors are placed at
the _very_ end.

This sorting algorithm is very opinionated and might not fit *your* needs!
This sorting algorithm is very opinionated and might not fit _your_ needs!

## Usage

```js
var sortColors = require('color-sorter');
var colors = [
'#000',
'red',
'hsl(0, 10%, 60%)'
];
var sorted = sortColors(colors);
var colorSort = require('color-sorter')
var colors = ['#000', 'red', 'hsl(0, 10%, 60%)']
var sorted = colors.sort(colorSort)

// => sorted:
// [
Expand All @@ -25,7 +23,8 @@ var sorted = sortColors(colors);

## Examples

These examples can be seen on [Project Wallace](https://projectwallace.com) where this package is used for sorting the colors.
These examples can be seen on [Project Wallace](https://projectwallace.com)
where this package is used for sorting the colors.

### CSS-Tricks

Expand All @@ -49,14 +48,12 @@ These examples can be seen on [Project Wallace](https://projectwallace.com) wher

## Related projects

- [CSS Analyzer](https://github.com/projectwallace/css-analyzer) - The analyzer
that powers this module
- [CSS Analyzer](https://github.com/projectwallace/css-analyzer) - Generate
analysis for a string of CSS
- [Wallace](https://github.com/bartveneman/wallace-cli) - CLI tool for
@projectwallace/css-analyzer
- [CSS Analyzer Diff](https://github.com/bartveneman/css-analyzer-diff) -
Calculates the diff between two sets of CSS analysis
- [Gromit](https://github.com/bartveneman/gromit-cli) - A test framework to assert
that CSS doesn't exceeds certain thresholds
- [Gromit](https://github.com/bartveneman/gromit-cli) - A test framework to
assert that CSS doesn't exceeds certain thresholds

## License

Expand Down

0 comments on commit 113e755

Please sign in to comment.