aboutsummaryrefslogtreecommitdiff
path: root/node_modules/postcss-unique-selectors
diff options
context:
space:
mode:
authorruki <waruqi@gmail.com>2018-11-08 00:38:48 +0800
committerruki <waruqi@gmail.com>2018-11-07 21:53:09 +0800
commit26105034da4fcce7ac883c899d781f016559310d (patch)
treec459a5dc4e3aa0972d9919033ece511ce76dd129 /node_modules/postcss-unique-selectors
parent2c77f00f1a7ecb6c8192f9c16d3b2001b254a107 (diff)
downloadxmake-docs-26105034da4fcce7ac883c899d781f016559310d.tar.gz
xmake-docs-26105034da4fcce7ac883c899d781f016559310d.zip
switch to vuepress
Diffstat (limited to 'node_modules/postcss-unique-selectors')
-rw-r--r--node_modules/postcss-unique-selectors/CHANGELOG.md19
-rw-r--r--node_modules/postcss-unique-selectors/LICENSE-MIT22
-rw-r--r--node_modules/postcss-unique-selectors/README.md50
-rw-r--r--node_modules/postcss-unique-selectors/dist/index.js26
-rw-r--r--node_modules/postcss-unique-selectors/package.json51
5 files changed, 168 insertions, 0 deletions
diff --git a/node_modules/postcss-unique-selectors/CHANGELOG.md b/node_modules/postcss-unique-selectors/CHANGELOG.md
new file mode 100644
index 00000000..898f7011
--- /dev/null
+++ b/node_modules/postcss-unique-selectors/CHANGELOG.md
@@ -0,0 +1,19 @@
+# 2.0.2
+
+* Now compiled with babel 6.
+
+# 2.0.1
+
+* Replaced javascript-natural-sort with alphanum-sort (thanks to @TrySound).
+
+# 2.0.0
+
+* Upgraded to PostCSS 5.
+
+# 1.0.1
+
+* Removed an unnecessary dependency on css-list.
+
+# 1.0.0
+
+* Initial release.
diff --git a/node_modules/postcss-unique-selectors/LICENSE-MIT b/node_modules/postcss-unique-selectors/LICENSE-MIT
new file mode 100644
index 00000000..fd0e863a
--- /dev/null
+++ b/node_modules/postcss-unique-selectors/LICENSE-MIT
@@ -0,0 +1,22 @@
+Copyright (c) Ben Briggs <beneb.info@gmail.com> (http://beneb.info)
+
+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 without limitation the rights to use,
+copy, modify, merge, publish, 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. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY 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.
diff --git a/node_modules/postcss-unique-selectors/README.md b/node_modules/postcss-unique-selectors/README.md
new file mode 100644
index 00000000..c4f9caad
--- /dev/null
+++ b/node_modules/postcss-unique-selectors/README.md
@@ -0,0 +1,50 @@
+# [postcss][postcss]-unique-selectors [![Build Status](https://travis-ci.org/ben-eb/postcss-unique-selectors.svg?branch=master)][ci] [![NPM version](https://badge.fury.io/js/postcss-unique-selectors.svg)][npm] [![Dependency Status](https://gemnasium.com/ben-eb/postcss-unique-selectors.svg)][deps]
+
+> Ensure CSS selectors are unique.
+
+## Install
+
+With [npm](https://npmjs.org/package/postcss-unique-selectors) do:
+
+```
+npm install postcss-unique-selectors --save
+```
+
+## Example
+
+Selectors are sorted naturally, and deduplicated:
+
+### Input
+
+```css
+h1,h3,h2,h1 {
+ color: red
+}
+```
+
+### Output
+
+```css
+h1,h2,h3 {
+ color: red
+}
+```
+
+## Usage
+
+See the [PostCSS documentation](https://github.com/postcss/postcss#usage) for
+examples for your environment.
+
+## Contributing
+
+Pull requests are welcome. If you add functionality, then please add unit tests
+to cover it.
+
+## License
+
+MIT © [Ben Briggs](http://beneb.info)
+
+[ci]: https://travis-ci.org/ben-eb/postcss-unique-selectors
+[deps]: https://gemnasium.com/ben-eb/postcss-unique-selectors
+[npm]: http://badge.fury.io/js/postcss-unique-selectors
+[postcss]: https://github.com/postcss/postcss
diff --git a/node_modules/postcss-unique-selectors/dist/index.js b/node_modules/postcss-unique-selectors/dist/index.js
new file mode 100644
index 00000000..10e6c7ca
--- /dev/null
+++ b/node_modules/postcss-unique-selectors/dist/index.js
@@ -0,0 +1,26 @@
+'use strict';
+
+exports.__esModule = true;
+
+var _postcss = require('postcss');
+
+var _alphanumSort = require('alphanum-sort');
+
+var _alphanumSort2 = _interopRequireDefault(_alphanumSort);
+
+var _uniqs = require('uniqs');
+
+var _uniqs2 = _interopRequireDefault(_uniqs);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function unique(rule) {
+ rule.selector = (0, _alphanumSort2.default)((0, _uniqs2.default)(rule.selectors), { insensitive: true }).join();
+}
+
+exports.default = (0, _postcss.plugin)('postcss-unique-selectors', function () {
+ return function (css) {
+ return css.walkRules(unique);
+ };
+});
+module.exports = exports['default']; \ No newline at end of file
diff --git a/node_modules/postcss-unique-selectors/package.json b/node_modules/postcss-unique-selectors/package.json
new file mode 100644
index 00000000..a0d8d6db
--- /dev/null
+++ b/node_modules/postcss-unique-selectors/package.json
@@ -0,0 +1,51 @@
+{
+ "name": "postcss-unique-selectors",
+ "version": "2.0.2",
+ "description": "Ensure CSS selectors are unique.",
+ "main": "dist/index.js",
+ "scripts": {
+ "pretest": "eslint src",
+ "prepublish": "de dist && BABEL_ENV=publish babel src --out-dir dist --ignore /__tests__/",
+ "test": "ava src/__tests__"
+ },
+ "files": [
+ "LICENSE-MIT",
+ "dist"
+ ],
+ "keywords": [
+ "css",
+ "postcss",
+ "postcss-plugin"
+ ],
+ "license": "MIT",
+ "devDependencies": {
+ "ava": "^0.11.0",
+ "babel-cli": "^6.4.0",
+ "babel-core": "^6.4.0",
+ "babel-plugin-add-module-exports": "^0.1.2",
+ "babel-preset-es2015": "^6.3.13",
+ "babel-preset-es2015-loose": "^7.0.0",
+ "babel-preset-stage-0": "^6.3.13",
+ "del-cli": "^0.1.2",
+ "eslint": "^1.10.3",
+ "eslint-config-cssnano": "^1.0.0"
+ },
+ "homepage": "https://github.com/ben-eb/postcss-unique-selectors",
+ "author": {
+ "name": "Ben Briggs",
+ "email": "beneb.info@gmail.com",
+ "url": "http://beneb.info"
+ },
+ "repository": "ben-eb/postcss-unique-selectors",
+ "dependencies": {
+ "alphanum-sort": "^1.0.1",
+ "postcss": "^5.0.4",
+ "uniqs": "^2.0.0"
+ },
+ "ava": {
+ "require": "babel-core/register"
+ },
+ "eslintConfig": {
+ "extends": "cssnano"
+ }
+}