From 2a584a6f2c0d836eecf93613506bf5dab3572744 Mon Sep 17 00:00:00 2001 From: greenkeeperio-bot Date: Tue, 6 Dec 2016 07:55:07 +0300 Subject: [PATCH 01/21] chore(package): update babel-eslint to version 7.1.1 https://greenkeeper.io/ --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 816923f..9fd4d25 100644 --- a/package.json +++ b/package.json @@ -69,7 +69,7 @@ "ava": "^0.16.0", "ava-codemods": "^0.3.0", "babel-cli": "^6.11.4", - "babel-eslint": "^7.0.0", + "babel-eslint": "^7.1.1", "babel-plugin-add-module-exports": "^0.2.1", "babel-preset-es2015": "^6.9.0", "babel-preset-min": "^0.1.15", From 594eb631943087ddd36792ebf7beaba9f1600c9b Mon Sep 17 00:00:00 2001 From: greenkeeperio-bot Date: Tue, 6 Dec 2016 07:55:07 +0300 Subject: [PATCH 02/21] chore(package): update eslint-plugin-babel to version 4.0.0 https://greenkeeper.io/ --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 816923f..d3e47ee 100644 --- a/package.json +++ b/package.json @@ -79,7 +79,7 @@ "eslint-config-xo": "^0.17.0", "eslint-formatter-pretty": "^1.0.0", "eslint-plugin-ava": "^4.0.0", - "eslint-plugin-babel": "^3.3.0", + "eslint-plugin-babel": "^4.0.0", "eslint-plugin-require-path-exists": "^1.1.5", "eslint-plugin-xo": "^1.0.0", "nyc": "^10.0.0", From 2e4aedbb0a3b8dd05d8df02ee0cf0cccddfabc8a Mon Sep 17 00:00:00 2001 From: greenkeeperio-bot Date: Tue, 6 Dec 2016 07:55:07 +0300 Subject: [PATCH 03/21] chore(package): update postcss to version 5.2.6 https://greenkeeper.io/ --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 816923f..2780225 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ ] }, "dependencies": { - "postcss": "^5.1.1" + "postcss": "^5.2.6" }, "devDependencies": { "ava": "^0.16.0", From 9de0a67fc15d7acf7e3bf089e0df670cc38473e3 Mon Sep 17 00:00:00 2001 From: Ivan Demidov Date: Fri, 9 Dec 2016 09:42:27 +0300 Subject: [PATCH 04/21] perf(index): change improves regexp --- src/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index a805a7f..4415741 100644 --- a/src/index.js +++ b/src/index.js @@ -5,7 +5,7 @@ const filter = (filter, attributeSelector) => new RegExp(filter.map(attribut => export default postcss.plugin('postcss-attribute-selector-prefix', options => { return nodes => { return nodes.walkRules(rule => { - rule.selector = rule.selector.replace(/\[.*?\]/g, match => { + rule.selector = rule.selector.replace(/\[.*?]/g, match => { if (options.prefix === undefined) { return match; } @@ -18,7 +18,7 @@ export default postcss.plugin('postcss-attribute-selector-prefix', options => { return match; } - return match.replace(/(\[.*?="?)(.*?)("?\])/, (match, before, required, after) => { + return match.replace(/(\[.*?="?)(.*?)("?])/, (match, before, required, after) => { return `${before}${options.prefix}${required}${after}`; }); }); From 92f743cab5a8b1871e16fbf5e5c850a6c7450f67 Mon Sep 17 00:00:00 2001 From: Ivan Demidov Date: Fri, 9 Dec 2016 09:48:36 +0300 Subject: [PATCH 05/21] chore(package): add conventional --- package.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/package.json b/package.json index b0e8a05..dec5911 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,8 @@ "lib/" ], "scripts": { + "commitmsg": "conventional-changelog-lint -e", + "postpublish": "conventional-changelog -i changelog.md -s -r 0 && git commit -am \"chore(changelog): Update changelog\"", "test": "eslint --format=node_modules/eslint-formatter-pretty ./src/*.js ./test/*.js && nyc ava", "clean": "rm -rf lib && mkdir lib", "build": "npm run clean && babel src/ -d lib/", @@ -63,6 +65,8 @@ ] }, "dependencies": { + "conventional-changelog-lint": "^1.1.0", + "husky": "^0.11.9", "postcss": "^5.2.6" }, "devDependencies": { From 672944142180ec94c3e34eb62b095e6435440a34 Mon Sep 17 00:00:00 2001 From: Ivan Demidov Date: Fri, 9 Dec 2016 09:53:18 +0300 Subject: [PATCH 06/21] chore(package): add eslint markdown, fixed #56 --- package.json | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index dec5911..5413c72 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,10 @@ "scripts": { "commitmsg": "conventional-changelog-lint -e", "postpublish": "conventional-changelog -i changelog.md -s -r 0 && git commit -am \"chore(changelog): Update changelog\"", - "test": "eslint --format=node_modules/eslint-formatter-pretty ./src/*.js ./test/*.js && nyc ava", + "lintjs": "eslint ./src/*.js ./test/*.js", + "lintmd": "eslint --ext md --rule indent: [error, 4] .", + "pretest": "npm run lintjs && npm run lintmd", + "test": "nyc ava", "clean": "rm -rf lib && mkdir lib", "build": "npm run clean && babel src/ -d lib/", "prepublish": "npm run build", @@ -51,12 +54,14 @@ ] }, "eslintConfig": { + "format": "node_modules/eslint-formatter-pretty", "parser": "babel-eslint", "plugins": [ "ava", "xo", "babel", - "require-path-exists" + "require-path-exists", + "markdown" ], "extends": [ "xo", @@ -84,6 +89,7 @@ "eslint-formatter-pretty": "^1.0.0", "eslint-plugin-ava": "^4.0.0", "eslint-plugin-babel": "^4.0.0", + "eslint-plugin-markdown": "^1.0.0-beta.3", "eslint-plugin-require-path-exists": "^1.1.5", "eslint-plugin-xo": "^1.0.0", "nyc": "^10.0.0", From 9da47debf4f001a602e883a53f9e52ffaa84cd5e Mon Sep 17 00:00:00 2001 From: Ivan Demidov Date: Fri, 9 Dec 2016 09:56:21 +0300 Subject: [PATCH 07/21] docs(readme): fix quotes --- README.md => readme.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename README.md => readme.md (93%) diff --git a/README.md b/readme.md similarity index 93% rename from README.md rename to readme.md index 5d55d08..14610fa 100644 --- a/README.md +++ b/readme.md @@ -32,12 +32,12 @@ $ npm install postcss-attribute-selector-prefix ```js // dependencies -var fs = require("fs"); -var postcss = require("postcss"); -var attrSelectorPrefix = require("postcss-attribute-selector-prefix"); +var fs = require('fs'); +var postcss = require('postcss'); +var attrSelectorPrefix = require('postcss-attribute-selector-prefix'); // css to be processed -var css = fs.readFileSync("css/input.css", "utf8"); +var css = fs.readFileSync('css/input.css', 'utf8'); // process css var output = postcss() From 84d5d867acf53d07de9a6b9bf0892f4562286e71 Mon Sep 17 00:00:00 2001 From: Ivan Demidov Date: Fri, 9 Dec 2016 10:04:36 +0300 Subject: [PATCH 08/21] style(*): clinton recommendation --- CHANGELOG.md => changelog.md | 0 license | 21 ++++++++ package.json | 96 +++++++++++++++++++++--------------- 3 files changed, 77 insertions(+), 40 deletions(-) rename CHANGELOG.md => changelog.md (100%) create mode 100644 license diff --git a/CHANGELOG.md b/changelog.md similarity index 100% rename from CHANGELOG.md rename to changelog.md diff --git a/license b/license new file mode 100644 index 0000000..657c7e7 --- /dev/null +++ b/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Ivan Demidov + +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. \ No newline at end of file diff --git a/package.json b/package.json index 5413c72..8c5f8cd 100644 --- a/package.json +++ b/package.json @@ -2,41 +2,67 @@ "name": "postcss-attribute-selector-prefix", "version": "0.0.10", "description": "A attribute selector prefixer for postcss", + "license": "MIT", + "repository": "GitScrum/postcss-attribute-selector-prefix", + "homepage": "GitScrum/postcss-attribute-selector-prefix#readme", + "bugs": "GitScrum/postcss-attribute-selector-prefix/issues", + "author": { + "name": "Ivan Demidov", + "email": "Scrum@list.ru", + "url": "https://twitter.com/Scrum_" + }, "main": "lib/index.js", - "files": [ - "lib/" - ], + "engines": { + "node": ">=4" + }, "scripts": { "commitmsg": "conventional-changelog-lint -e", "postpublish": "conventional-changelog -i changelog.md -s -r 0 && git commit -am \"chore(changelog): Update changelog\"", "lintjs": "eslint ./src/*.js ./test/*.js", "lintmd": "eslint --ext md --rule indent: [error, 4] .", - "pretest": "npm run lintjs && npm run lintmd", + "pretest": "clinton && npm run lintjs && npm run lintmd", "test": "nyc ava", "clean": "rm -rf lib && mkdir lib", "build": "npm run clean && babel src/ -d lib/", "prepublish": "npm run build", "update": "updtr && ava-codemods --force" }, - "repository": { - "type": "git", - "url": "git+https://github.com/GitScrum/postcss-attribute-selector-prefix.git" - }, + "files": [ + "lib/" + ], "keywords": [ "postcss", "postcss-plugin", "prefix", "css" ], - "author": { - "name": "GitScrum", - "email": "scrum@list.ru" + "dependencies": { + "conventional-changelog-lint": "^1.1.0", + "husky": "^0.11.9", + "postcss": "^5.2.6" }, - "license": "MIT", - "bugs": { - "url": "https://github.com/GitScrum/postcss-attribute-selector-prefix/issues" + "devDependencies": { + "ava": "*", + "ava-codemods": "^0.3.0", + "babel-cli": "^6.11.4", + "babel-eslint": "^7.1.1", + "babel-plugin-add-module-exports": "^0.2.1", + "babel-preset-es2015": "^6.9.0", + "babel-preset-min": "^0.1.15", + "babel-register": "^6.11.6", + "clinton": "^0.8.0", + "coveralls": "^2.11.15", + "eslint": "^3.11.1", + "eslint-config-xo": "^0.17.0", + "eslint-formatter-pretty": "^1.0.0", + "eslint-plugin-ava": "^4.0.0", + "eslint-plugin-babel": "^4.0.0", + "eslint-plugin-markdown": "^1.0.0-beta.3", + "eslint-plugin-require-path-exists": "^1.1.5", + "eslint-plugin-xo": "^1.0.0", + "nyc": "^10.0.0", + "updtr": "^0.2.3" }, - "homepage": "https://github.com/GitScrum/postcss-attribute-selector-prefix#readme", "babel": { "presets": [ "es2015" @@ -69,30 +95,20 @@ "plugin:ava/recommended" ] }, - "dependencies": { - "conventional-changelog-lint": "^1.1.0", - "husky": "^0.11.9", - "postcss": "^5.2.6" - }, - "devDependencies": { - "ava": "^0.17.0", - "ava-codemods": "^0.3.0", - "babel-cli": "^6.11.4", - "babel-eslint": "^7.1.1", - "babel-plugin-add-module-exports": "^0.2.1", - "babel-preset-es2015": "^6.9.0", - "babel-preset-min": "^0.1.15", - "babel-register": "^6.11.6", - "coveralls": "^2.11.15", - "eslint": "^3.11.1", - "eslint-config-xo": "^0.17.0", - "eslint-formatter-pretty": "^1.0.0", - "eslint-plugin-ava": "^4.0.0", - "eslint-plugin-babel": "^4.0.0", - "eslint-plugin-markdown": "^1.0.0-beta.3", - "eslint-plugin-require-path-exists": "^1.1.5", - "eslint-plugin-xo": "^1.0.0", - "nyc": "^10.0.0", - "updtr": "^0.2.3" + "clinton": { + "ignores": [ + "test/**", + "tmp/**", + "lib/**", + "*.{html,jpg}" + ], + "rules": { + "pkg-main": [ + "off" + ], + "xo": [ + "off" + ] + } } } From a39c1a5d3209be074fd22e1307415ea092568b6a Mon Sep 17 00:00:00 2001 From: Ivan Demidov Date: Fri, 9 Dec 2016 10:11:49 +0300 Subject: [PATCH 09/21] chore(package): change babel-min to babili, fixed #85 --- package.json | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index 8c5f8cd..5c7b1f4 100644 --- a/package.json +++ b/package.json @@ -7,13 +7,13 @@ "homepage": "GitScrum/postcss-attribute-selector-prefix#readme", "bugs": "GitScrum/postcss-attribute-selector-prefix/issues", "author": { - "name": "Ivan Demidov", - "email": "Scrum@list.ru", - "url": "https://twitter.com/Scrum_" + "name": "Ivan Demidov", + "email": "Scrum@list.ru", + "url": "https://twitter.com/Scrum_" }, "main": "lib/index.js", "engines": { - "node": ">=4" + "node": ">=4" }, "scripts": { "commitmsg": "conventional-changelog-lint -e", @@ -37,8 +37,6 @@ "css" ], "dependencies": { - "conventional-changelog-lint": "^1.1.0", - "husky": "^0.11.9", "postcss": "^5.2.6" }, "devDependencies": { @@ -47,10 +45,12 @@ "babel-cli": "^6.11.4", "babel-eslint": "^7.1.1", "babel-plugin-add-module-exports": "^0.2.1", + "babel-preset-babili": "^0.0.9", "babel-preset-es2015": "^6.9.0", - "babel-preset-min": "^0.1.15", "babel-register": "^6.11.6", "clinton": "^0.8.0", + "conventional-changelog-cli": "^1.2.0", + "conventional-changelog-lint": "^1.1.0", "coveralls": "^2.11.15", "eslint": "^3.11.1", "eslint-config-xo": "^0.17.0", @@ -60,19 +60,18 @@ "eslint-plugin-markdown": "^1.0.0-beta.3", "eslint-plugin-require-path-exists": "^1.1.5", "eslint-plugin-xo": "^1.0.0", + "husky": "^0.11.9", "nyc": "^10.0.0", "updtr": "^0.2.3" }, "babel": { "presets": [ - "es2015" + "es2015", + "babili" ], "plugins": [ "add-module-exports" - ], - "comments": false, - "compact": true, - "minified": true + ] }, "ava": { "require": [ From f441209844febdc28c3ef91e13fec7b0b19cc36d Mon Sep 17 00:00:00 2001 From: Ivan Demidov Date: Fri, 9 Dec 2016 10:18:01 +0300 Subject: [PATCH 10/21] chore(package): change preset-es2015 to preset-env --- package.json | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 5c7b1f4..0926a8c 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "babel-eslint": "^7.1.1", "babel-plugin-add-module-exports": "^0.2.1", "babel-preset-babili": "^0.0.9", - "babel-preset-es2015": "^6.9.0", + "babel-preset-env": "^0.0.9", "babel-register": "^6.11.6", "clinton": "^0.8.0", "conventional-changelog-cli": "^1.2.0", @@ -66,7 +66,14 @@ }, "babel": { "presets": [ - "es2015", + [ + "env", + { + "targets": { + "node": "4" + } + } + ], "babili" ], "plugins": [ From 31e0ea0078f22f398bd84161b014ff186733265c Mon Sep 17 00:00:00 2001 From: Ivan Demidov Date: Fri, 9 Dec 2016 10:22:12 +0300 Subject: [PATCH 11/21] test(package): add testen --- package.json | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 0926a8c..af1ea37 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,8 @@ "clean": "rm -rf lib && mkdir lib", "build": "npm run clean && babel src/ -d lib/", "prepublish": "npm run build", - "update": "updtr && ava-codemods --force" + "update": "updtr && ava-codemods --force", + "testen": "testen -n -- ava" }, "files": [ "lib/" @@ -62,8 +63,17 @@ "eslint-plugin-xo": "^1.0.0", "husky": "^0.11.9", "nyc": "^10.0.0", + "testen": "^1.8.2", "updtr": "^0.2.3" }, + "testen": { + "node": [ + "4", + "5", + "6", + "7" + ] + }, "babel": { "presets": [ [ From 6c84259b1bd1e054cc881ad959c7c2feb632df4e Mon Sep 17 00:00:00 2001 From: Ivan Demidov Date: Fri, 9 Dec 2016 10:39:38 +0300 Subject: [PATCH 12/21] docs(readme): update at standard --- readme.md | 86 ++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 56 insertions(+), 30 deletions(-) diff --git a/readme.md b/readme.md index 14610fa..2c313a5 100644 --- a/readme.md +++ b/readme.md @@ -1,33 +1,21 @@ -# postcss-attribute-selector-prefix plugin for postcss -> Adds a namespace/prefix to attribute selector, needs to escape from the third-party frameworks. +# postcss-attribute-selector-prefix +> [PostCSS](https://github.com/postcss/postcss) plugin adds a namespace/prefix to attribute selector. +[![Travis Build Status](https://img.shields.io/travis/GitScrum/postcss-attribute-selector-prefix.svg?style=flat-square&label=unix)](https://travis-ci.org/GitScrum/postcss-attribute-selector-prefix)[![AppVeyor Build Status](https://img.shields.io/appveyor/ci/GitScrum/postcss-attribute-selector-prefix.svg?style=flat-square&label=windows)](https://ci.appveyor.com/project/GitScrum/postcss-attribute-selector-prefix)[![testen badge](https://img.shields.io/badge/testen-passing-brightgreen.svg?style=flat-square)][testen repo][![node](https://img.shields.io/node/v/postcss-attribute-selector-prefix.svg?maxAge=2592000&style=flat-square)]()[![npm version](https://img.shields.io/npm/v/postcss-attribute-selector-prefix.svg?style=flat-square)](https://www.npmjs.com/package/postcss-attribute-selector-prefix)[![Dependency Status](https://david-dm.org/gitscrum/postcss-attribute-selector-prefix.svg?style=flat-square)](https://david-dm.org/gitscrum/postcss-attribute-selector-prefix)[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg?style=flat-square)](https://github.com/sindresorhus/xo)[![Coveralls status](https://img.shields.io/coveralls/GitScrum/postcss-attribute-selector-prefix.svg?style=flat-square)](https://coveralls.io/r/GitScrum/postcss-attribute-selector-prefix) -[![Build Status](https://img.shields.io/travis/GitScrum/postcss-attribute-selector-prefix.svg?style=flat-square)](https://travis-ci.org/GitScrum/postcss-attribute-selector-prefix)[![npm version](https://img.shields.io/npm/v/postcss-attribute-selector-prefix.svg?style=flat-square)](https://www.npmjs.com/package/postcss-attribute-selector-prefix)[![Dependency Status](https://david-dm.org/gitscrum/postcss-attribute-selector-prefix.svg?style=flat-square)](https://david-dm.org/gitscrum/postcss-attribute-selector-prefix)[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg?style=flat-square)](https://github.com/sindresorhus/xo)[![Coveralls status](https://img.shields.io/coveralls/GitScrum/postcss-attribute-selector-prefix.svg?style=flat-square)](https://coveralls.io/r/GitScrum/postcss-attribute-selector-prefix)[![npm downloads](https://img.shields.io/npm/dm/postcss-attribute-selector-prefix.svg?style=flat-square)](https://www.npmjs.com/package/postcss-attribute-selector-prefix)[![npm](https://img.shields.io/npm/dt/postcss-attribute-selector-prefix.svg?style=flat-square)](https://www.npmjs.com/package/postcss-attribute-selector-prefix) +[![npm downloads](https://img.shields.io/npm/dm/postcss-attribute-selector-prefix.svg?style=flat-square)](https://www.npmjs.com/package/postcss-attribute-selector-prefix)[![npm](https://img.shields.io/npm/dt/postcss-attribute-selector-prefix.svg?style=flat-square)](https://www.npmjs.com/package/postcss-attribute-selector-prefix) -```css -/* input.css */ -.class, -[type="text"], -[class*="lorem"] { - color:red; -} -``` - -```css -/* Output example */ -.class, -[type="text"], -[class*="test-lorem"] { - color:red; -} -``` +## Why ? +Needs to escape from the third-party frameworks. -## Installation +## Install -```console -$ npm install postcss-attribute-selector-prefix +```bash +$ npm install postcss-at-rules-variables ``` +> **Note:** This project is compatible with node v4+ + ## Usage ```js @@ -48,20 +36,40 @@ var output = postcss() console.log(output); ``` -### Options +## Example + +```css +/* input.css */ +.class, +[type="text"], +[class*="lorem"] { +color:red; +} +``` + +```css +/* Output example */ +.class, +[type="text"], +[class*="test-lorem"] { + color:red; +} +``` + +## Options #### `prefix` -*add prefix to attribute selector* Type: `string` -Default: `` +Default: `` +Description: *add prefix to attribute selector* #### `filter` -*attribute selector to which we must add the prefix* Type: `Array` Default: `[]` -Example: `['class', 'id']` +Description: *attribute selector to which we must add the prefix* +Example: `['class', 'id']` ```css /* input.css */ @@ -84,10 +92,11 @@ Example: `['class', 'id']` ``` #### `ignore` -*ignored attribute selector* + Type: `Array` Default: `[]` +Description: *ignored attribute selector* Example: `['type', 'alt']` ```css @@ -110,4 +119,21 @@ Example: `['type', 'alt']` } ``` -See [PostCSS](https://github.com/postcss/postcss) docs for examples for your environment. +## LICENSE + +> MIT License (MIT) + +>Copyright (c) Ivan Demidov + +> 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, From dc6a038118d202684932e15e292217dff9114aec Mon Sep 17 00:00:00 2001 From: Ivan Demidov Date: Fri, 9 Dec 2016 10:43:17 +0300 Subject: [PATCH 13/21] chore(package): add np --- package.json | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index af1ea37..d424319 100644 --- a/package.json +++ b/package.json @@ -18,13 +18,16 @@ "scripts": { "commitmsg": "conventional-changelog-lint -e", "postpublish": "conventional-changelog -i changelog.md -s -r 0 && git commit -am \"chore(changelog): Update changelog\"", + "patch": "np patch --any-branch", + "minor": "np minor --any-branch", + "major": "np major --any-branch", + "clean": "rm -rf lib && mkdir lib", + "build": "npm run clean && babel src/ -d lib/", + "prepublish": "npm run build", "lintjs": "eslint ./src/*.js ./test/*.js", "lintmd": "eslint --ext md --rule indent: [error, 4] .", "pretest": "clinton && npm run lintjs && npm run lintmd", "test": "nyc ava", - "clean": "rm -rf lib && mkdir lib", - "build": "npm run clean && babel src/ -d lib/", - "prepublish": "npm run build", "update": "updtr && ava-codemods --force", "testen": "testen -n -- ava" }, @@ -62,6 +65,7 @@ "eslint-plugin-require-path-exists": "^1.1.5", "eslint-plugin-xo": "^1.0.0", "husky": "^0.11.9", + "np": "^2.10.1", "nyc": "^10.0.0", "testen": "^1.8.2", "updtr": "^0.2.3" From 25fe04876bcd86024ea429ed455ded01153dd517 Mon Sep 17 00:00:00 2001 From: Ivan Demidov Date: Fri, 9 Dec 2016 11:10:16 +0300 Subject: [PATCH 14/21] docs(package): fix badges --- readme.md | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/readme.md b/readme.md index 2c313a5..ca310e1 100644 --- a/readme.md +++ b/readme.md @@ -1,9 +1,23 @@ # postcss-attribute-selector-prefix > [PostCSS](https://github.com/postcss/postcss) plugin adds a namespace/prefix to attribute selector. -[![Travis Build Status](https://img.shields.io/travis/GitScrum/postcss-attribute-selector-prefix.svg?style=flat-square&label=unix)](https://travis-ci.org/GitScrum/postcss-attribute-selector-prefix)[![AppVeyor Build Status](https://img.shields.io/appveyor/ci/GitScrum/postcss-attribute-selector-prefix.svg?style=flat-square&label=windows)](https://ci.appveyor.com/project/GitScrum/postcss-attribute-selector-prefix)[![testen badge](https://img.shields.io/badge/testen-passing-brightgreen.svg?style=flat-square)][testen repo][![node](https://img.shields.io/node/v/postcss-attribute-selector-prefix.svg?maxAge=2592000&style=flat-square)]()[![npm version](https://img.shields.io/npm/v/postcss-attribute-selector-prefix.svg?style=flat-square)](https://www.npmjs.com/package/postcss-attribute-selector-prefix)[![Dependency Status](https://david-dm.org/gitscrum/postcss-attribute-selector-prefix.svg?style=flat-square)](https://david-dm.org/gitscrum/postcss-attribute-selector-prefix)[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg?style=flat-square)](https://github.com/sindresorhus/xo)[![Coveralls status](https://img.shields.io/coveralls/GitScrum/postcss-attribute-selector-prefix.svg?style=flat-square)](https://coveralls.io/r/GitScrum/postcss-attribute-selector-prefix) +[![Travis Build Status](https://img.shields.io/travis/GitScrum/postcss-attribute-selector-prefix.svg?style=flat-square&label=unix)](https://travis-ci.org/GitScrum/postcss-attribute-selector-prefix) -[![npm downloads](https://img.shields.io/npm/dm/postcss-attribute-selector-prefix.svg?style=flat-square)](https://www.npmjs.com/package/postcss-attribute-selector-prefix)[![npm](https://img.shields.io/npm/dt/postcss-attribute-selector-prefix.svg?style=flat-square)](https://www.npmjs.com/package/postcss-attribute-selector-prefix) +[![AppVeyor Build Status](https://img.shields.io/appveyor/ci/GitScrum/postcss-attribute-selector-prefix.svg?style=flat-square&label=windows)](https://ci.appveyor.com/project/GitScrum/postcss-attribute-selector-prefix)[![testen badge](https://img.shields.io/badge/testen-passing-brightgreen.svg?style=flat-square)][testen repo] + +[![node](https://img.shields.io/node/v/postcss-attribute-selector-prefix.svg?maxAge=2592000&style=flat-square)]() + +[![npm version](https://img.shields.io/npm/v/postcss-attribute-selector-prefix.svg?style=flat-square)](https://www.npmjs.com/package/postcss-attribute-selector-prefix) + +[![Dependency Status](https://david-dm.org/gitscrum/postcss-attribute-selector-prefix.svg?style=flat-square)](https://david-dm.org/gitscrum/postcss-attribute-selector-prefix) + +[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg?style=flat-square)](https://github.com/sindresorhus/xo) + +[![Coveralls status](https://img.shields.io/coveralls/GitScrum/postcss-attribute-selector-prefix.svg?style=flat-square)](https://coveralls.io/r/GitScrum/postcss-attribute-selector-prefix) + +[![npm downloads](https://img.shields.io/npm/dm/postcss-attribute-selector-prefix.svg?style=flat-square)](https://www.npmjs.com/package/postcss-attribute-selector-prefix) + +[![npm](https://img.shields.io/npm/dt/postcss-attribute-selector-prefix.svg?style=flat-square)](https://www.npmjs.com/package/postcss-attribute-selector-prefix) ## Why ? Needs to escape from the third-party frameworks. From 78932e03bcf7b424199248acfea63a1b8b21c123 Mon Sep 17 00:00:00 2001 From: Ivan Demidov Date: Fri, 9 Dec 2016 11:12:35 +0300 Subject: [PATCH 15/21] docs(package): fix badges --- readme.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/readme.md b/readme.md index ca310e1..78c2bd1 100644 --- a/readme.md +++ b/readme.md @@ -3,7 +3,9 @@ [![Travis Build Status](https://img.shields.io/travis/GitScrum/postcss-attribute-selector-prefix.svg?style=flat-square&label=unix)](https://travis-ci.org/GitScrum/postcss-attribute-selector-prefix) -[![AppVeyor Build Status](https://img.shields.io/appveyor/ci/GitScrum/postcss-attribute-selector-prefix.svg?style=flat-square&label=windows)](https://ci.appveyor.com/project/GitScrum/postcss-attribute-selector-prefix)[![testen badge](https://img.shields.io/badge/testen-passing-brightgreen.svg?style=flat-square)][testen repo] +[![AppVeyor Build Status](https://img.shields.io/appveyor/ci/GitScrum/postcss-attribute-selector-prefix.svg?style=flat-square&label=windows)](https://ci.appveyor.com/project/GitScrum/postcss-attribute-selector-prefix) + +[![testen badge](https://img.shields.io/badge/testen-passing-brightgreen.svg?style=flat-square)][testen repo] [![node](https://img.shields.io/node/v/postcss-attribute-selector-prefix.svg?maxAge=2592000&style=flat-square)]() From d6857ecf29d822dcb5eb9e46d31ce601a06c3aae Mon Sep 17 00:00:00 2001 From: Ivan Demidov Date: Fri, 9 Dec 2016 11:12:57 +0300 Subject: [PATCH 16/21] ci(appveyor): add appveyor --- appveyor.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 appveyor.yml diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000..17ef7ed --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,19 @@ +environment: + matrix: + - nodejs_version: "7" + - nodejs_version: "6" + - nodejs_version: "5" + - nodejs_version: "4" + +version: "{build}" +build: off +deploy: off + +install: + - ps: Install-Product node $env:nodejs_version + - npm install + +test_script: + - node --version + - npm --version +- npm test \ No newline at end of file From 1c3f5ea286a0382a3a0cd508b2a2774690db7a2a Mon Sep 17 00:00:00 2001 From: Ivan Demidov Date: Fri, 9 Dec 2016 11:14:59 +0300 Subject: [PATCH 17/21] docs(package): fix badges --- readme.md | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/readme.md b/readme.md index 78c2bd1..0672504 100644 --- a/readme.md +++ b/readme.md @@ -1,25 +1,7 @@ # postcss-attribute-selector-prefix > [PostCSS](https://github.com/postcss/postcss) plugin adds a namespace/prefix to attribute selector. -[![Travis Build Status](https://img.shields.io/travis/GitScrum/postcss-attribute-selector-prefix.svg?style=flat-square&label=unix)](https://travis-ci.org/GitScrum/postcss-attribute-selector-prefix) - -[![AppVeyor Build Status](https://img.shields.io/appveyor/ci/GitScrum/postcss-attribute-selector-prefix.svg?style=flat-square&label=windows)](https://ci.appveyor.com/project/GitScrum/postcss-attribute-selector-prefix) - -[![testen badge](https://img.shields.io/badge/testen-passing-brightgreen.svg?style=flat-square)][testen repo] - -[![node](https://img.shields.io/node/v/postcss-attribute-selector-prefix.svg?maxAge=2592000&style=flat-square)]() - -[![npm version](https://img.shields.io/npm/v/postcss-attribute-selector-prefix.svg?style=flat-square)](https://www.npmjs.com/package/postcss-attribute-selector-prefix) - -[![Dependency Status](https://david-dm.org/gitscrum/postcss-attribute-selector-prefix.svg?style=flat-square)](https://david-dm.org/gitscrum/postcss-attribute-selector-prefix) - -[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg?style=flat-square)](https://github.com/sindresorhus/xo) - -[![Coveralls status](https://img.shields.io/coveralls/GitScrum/postcss-attribute-selector-prefix.svg?style=flat-square)](https://coveralls.io/r/GitScrum/postcss-attribute-selector-prefix) - -[![npm downloads](https://img.shields.io/npm/dm/postcss-attribute-selector-prefix.svg?style=flat-square)](https://www.npmjs.com/package/postcss-attribute-selector-prefix) - -[![npm](https://img.shields.io/npm/dt/postcss-attribute-selector-prefix.svg?style=flat-square)](https://www.npmjs.com/package/postcss-attribute-selector-prefix) +[![Travis Build Status](https://img.shields.io/travis/GitScrum/postcss-attribute-selector-prefix.svg?style=flat-square&label=unix)](https://travis-ci.org/GitScrum/postcss-attribute-selector-prefix)[![AppVeyor Build Status](https://img.shields.io/appveyor/ci/GitScrum/postcss-attribute-selector-prefix.svg?style=flat-square&label=windows)](https://ci.appveyor.com/project/GitScrum/postcss-attribute-selector-prefix)[![testen badge](https://img.shields.io/badge/testen-passing-brightgreen.svg?style=flat-square)][testen repo][![node](https://img.shields.io/node/v/postcss-attribute-selector-prefix.svg?maxAge=2592000&style=flat-square)]()[![npm version](https://img.shields.io/npm/v/postcss-attribute-selector-prefix.svg?style=flat-square)](https://www.npmjs.com/package/postcss-attribute-selector-prefix)[![Dependency Status](https://david-dm.org/gitscrum/postcss-attribute-selector-prefix.svg?style=flat-square)](https://david-dm.org/gitscrum/postcss-attribute-selector-prefix)[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg?style=flat-square)](https://github.com/sindresorhus/xo)[![Coveralls status](https://img.shields.io/coveralls/GitScrum/postcss-attribute-selector-prefix.svg?style=flat-square)](https://coveralls.io/r/GitScrum/postcss-attribute-selector-prefix)[![npm downloads](https://img.shields.io/npm/dm/postcss-attribute-selector-prefix.svg?style=flat-square)](https://www.npmjs.com/package/postcss-attribute-selector-prefix)[![npm](https://img.shields.io/npm/dt/postcss-attribute-selector-prefix.svg?style=flat-square)](https://www.npmjs.com/package/postcss-attribute-selector-prefix) ## Why ? Needs to escape from the third-party frameworks. @@ -153,3 +135,5 @@ 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, + +[testen repo]: https://github.com/egoist/testen From c4323367a280d60353ad91a4d71ac3ee081061b5 Mon Sep 17 00:00:00 2001 From: Ivan Demidov Date: Fri, 9 Dec 2016 11:16:03 +0300 Subject: [PATCH 18/21] ci(travis): add node 7 --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 62105ca..48c9df9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,7 @@ sudo: false language: node_js node_js: + - "7" - "6" - "5" - "4" From a254a6d5c53fe7d8249d518984173c256d292348 Mon Sep 17 00:00:00 2001 From: Ivan Demidov Date: Fri, 9 Dec 2016 11:17:38 +0300 Subject: [PATCH 19/21] docs(package): shared badges --- readme.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 0672504..623e433 100644 --- a/readme.md +++ b/readme.md @@ -1,7 +1,9 @@ # postcss-attribute-selector-prefix > [PostCSS](https://github.com/postcss/postcss) plugin adds a namespace/prefix to attribute selector. -[![Travis Build Status](https://img.shields.io/travis/GitScrum/postcss-attribute-selector-prefix.svg?style=flat-square&label=unix)](https://travis-ci.org/GitScrum/postcss-attribute-selector-prefix)[![AppVeyor Build Status](https://img.shields.io/appveyor/ci/GitScrum/postcss-attribute-selector-prefix.svg?style=flat-square&label=windows)](https://ci.appveyor.com/project/GitScrum/postcss-attribute-selector-prefix)[![testen badge](https://img.shields.io/badge/testen-passing-brightgreen.svg?style=flat-square)][testen repo][![node](https://img.shields.io/node/v/postcss-attribute-selector-prefix.svg?maxAge=2592000&style=flat-square)]()[![npm version](https://img.shields.io/npm/v/postcss-attribute-selector-prefix.svg?style=flat-square)](https://www.npmjs.com/package/postcss-attribute-selector-prefix)[![Dependency Status](https://david-dm.org/gitscrum/postcss-attribute-selector-prefix.svg?style=flat-square)](https://david-dm.org/gitscrum/postcss-attribute-selector-prefix)[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg?style=flat-square)](https://github.com/sindresorhus/xo)[![Coveralls status](https://img.shields.io/coveralls/GitScrum/postcss-attribute-selector-prefix.svg?style=flat-square)](https://coveralls.io/r/GitScrum/postcss-attribute-selector-prefix)[![npm downloads](https://img.shields.io/npm/dm/postcss-attribute-selector-prefix.svg?style=flat-square)](https://www.npmjs.com/package/postcss-attribute-selector-prefix)[![npm](https://img.shields.io/npm/dt/postcss-attribute-selector-prefix.svg?style=flat-square)](https://www.npmjs.com/package/postcss-attribute-selector-prefix) +[![Travis Build Status](https://img.shields.io/travis/GitScrum/postcss-attribute-selector-prefix.svg?style=flat-square&label=unix)](https://travis-ci.org/GitScrum/postcss-attribute-selector-prefix)[![AppVeyor Build Status](https://img.shields.io/appveyor/ci/GitScrum/postcss-attribute-selector-prefix.svg?style=flat-square&label=windows)](https://ci.appveyor.com/project/GitScrum/postcss-attribute-selector-prefix)[![testen badge](https://img.shields.io/badge/testen-passing-brightgreen.svg?style=flat-square)][testen repo][![node](https://img.shields.io/node/v/postcss-attribute-selector-prefix.svg?maxAge=2592000&style=flat-square)]()[![npm version](https://img.shields.io/npm/v/postcss-attribute-selector-prefix.svg?style=flat-square)](https://www.npmjs.com/package/postcss-attribute-selector-prefix)[![Dependency Status](https://david-dm.org/gitscrum/postcss-attribute-selector-prefix.svg?style=flat-square)](https://david-dm.org/gitscrum/postcss-attribute-selector-prefix)[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg?style=flat-square)](https://github.com/sindresorhus/xo)[![Coveralls status](https://img.shields.io/coveralls/GitScrum/postcss-attribute-selector-prefix.svg?style=flat-square)](https://coveralls.io/r/GitScrum/postcss-attribute-selector-prefix) + +[![npm downloads](https://img.shields.io/npm/dm/postcss-attribute-selector-prefix.svg?style=flat-square)](https://www.npmjs.com/package/postcss-attribute-selector-prefix)[![npm](https://img.shields.io/npm/dt/postcss-attribute-selector-prefix.svg?style=flat-square)](https://www.npmjs.com/package/postcss-attribute-selector-prefix) ## Why ? Needs to escape from the third-party frameworks. From 917c99bf2ad8d142ccc02d31286935eef0e697b9 Mon Sep 17 00:00:00 2001 From: Ivan Demidov Date: Fri, 9 Dec 2016 11:21:30 +0300 Subject: [PATCH 20/21] ci(appveyor): fix last line indent --- appveyor.yml | 2 +- readme.md | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 17ef7ed..740a6f8 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -16,4 +16,4 @@ install: test_script: - node --version - npm --version -- npm test \ No newline at end of file + - npm test diff --git a/readme.md b/readme.md index 623e433..2c313a5 100644 --- a/readme.md +++ b/readme.md @@ -137,5 +137,3 @@ 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, - -[testen repo]: https://github.com/egoist/testen From 9dd67d31482be0e6e66e0ae083065801729e69e4 Mon Sep 17 00:00:00 2001 From: Ivan Demidov Date: Fri, 9 Dec 2016 11:30:05 +0300 Subject: [PATCH 21/21] docs(package): return link for testen --- readme.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/readme.md b/readme.md index 2c313a5..623e433 100644 --- a/readme.md +++ b/readme.md @@ -137,3 +137,5 @@ 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, + +[testen repo]: https://github.com/egoist/testen