Skip to content

Commit 1e49b21

Browse files
authored
Migrate postcss-pseudo-class-any-link (#43)
* Migrate postcss-pseudo-class-any-link * Migrate postcss-pseudo-class-any-link
1 parent f69b796 commit 1e49b21

File tree

10 files changed

+142
-224
lines changed

10 files changed

+142
-224
lines changed

plugins/postcss-pseudo-class-any-link/.editorconfig

Lines changed: 0 additions & 15 deletions
This file was deleted.

plugins/postcss-pseudo-class-any-link/.github/workflows/test.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
node_modules
2-
index.*.*
2+
dist
33
package-lock.json
44
yarn.lock
55
*.log*
66
*.result.css
7-
.*
7+
*.result.css.map
88
!.editorconfig
9-
!.github
109
!.gitignore
1110
!.rollup.js
1211
!.tape.js
12+
!.travis.yml
13+
!.github

plugins/postcss-pseudo-class-any-link/CONTRIBUTING.md

Lines changed: 0 additions & 65 deletions
This file was deleted.

plugins/postcss-pseudo-class-any-link/INSTALL.md

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,7 @@ Add [PostCSS Pseudo Class Any Link] to your project:
1414
npm install postcss-pseudo-class-any-link --save-dev
1515
```
1616

17-
Use [PostCSS Pseudo Class Any Link] to process your CSS:
18-
19-
```js
20-
const postcssPseudoClassAnyLink = require('postcss-pseudo-class-any-link');
21-
22-
postcssPseudoClassAnyLink.process(YOUR_CSS /*, processOptions, pluginOptions */);
23-
```
24-
25-
Or use it as a [PostCSS] plugin:
17+
Use [PostCSS Pseudo Class Any Link] as a [PostCSS] plugin:
2618

2719
```js
2820
const postcss = require('postcss');
@@ -167,6 +159,6 @@ grunt.initConfig({
167159
[PostCSS]: https://github.com/postcss/postcss
168160
[PostCSS CLI]: https://github.com/postcss/postcss-cli
169161
[PostCSS Loader]: https://github.com/postcss/postcss-loader
170-
[PostCSS Pseudo Class Any Link]: https://github.com/jonathantneal/postcss-pseudo-class-any-link
162+
[PostCSS Pseudo Class Any Link]: https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-pseudo-class-any-link
171163
[React App Rewire PostCSS]: https://github.com/csstools/react-app-rewire-postcss
172164
[React App Rewired]: https://github.com/timarney/react-app-rewired

plugins/postcss-pseudo-class-any-link/README.md

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,7 @@ Add [PostCSS Pseudo Class Any Link] to your project:
4040
npm install postcss postcss-pseudo-class-any-link --save-dev
4141
```
4242

43-
Use [PostCSS Pseudo Class Any Link] to process your CSS:
44-
45-
```js
46-
const postcssPseudoClassAnyLink = require('postcss-pseudo-class-any-link');
47-
48-
postcssPseudoClassAnyLink.process(YOUR_CSS /*, processOptions, pluginOptions */);
49-
```
50-
51-
Or use it as a [PostCSS] plugin:
43+
Use [PostCSS Pseudo Class Any Link] as a [PostCSS] plugin:
5244

5345
```js
5446
const postcss = require('postcss');
@@ -88,8 +80,8 @@ nav :link > span, nav :visited > span {
8880
}
8981
```
9082

91-
[cli-img]: https://github.com/csstools/postcss-pseudo-class-any-link/workflows/test/badge.svg
92-
[cli-url]: https://github.com/csstools/postcss-pseudo-class-any-link/actions/workflows/test.yml?query=workflow/test
83+
[cli-img]: https://github.com/csstools/postcss-plugins/workflows/test/badge.svg
84+
[cli-url]: https://github.com/csstools/postcss-plugins/actions/workflows/test.yml?query=workflow/test
9385
[css-img]: https://cssdb.org/badge/any-link-pseudo-class.svg
9486
[css-url]: https://cssdb.org/#any-link-pseudo-class
9587
[git-img]: https://img.shields.io/badge/support-chat-blue.svg
@@ -101,5 +93,5 @@ nav :link > span, nav :visited > span {
10193
[Grunt PostCSS]: https://github.com/nDmitry/grunt-postcss
10294
[PostCSS]: https://github.com/postcss/postcss
10395
[PostCSS Loader]: https://github.com/postcss/postcss-loader
104-
[PostCSS Pseudo Class Any Link]: https://github.com/jonathantneal/postcss-pseudo-class-any-link
96+
[PostCSS Pseudo Class Any Link]: https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-pseudo-class-any-link
10597
[Selectors]: https://www.w3.org/TR/selectors-4/#the-any-link-pseudo

plugins/postcss-pseudo-class-any-link/index.js

Lines changed: 0 additions & 76 deletions
This file was deleted.

plugins/postcss-pseudo-class-any-link/package.json

Lines changed: 29 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,40 +4,39 @@
44
"description": "Use the :any-link pseudo-class in CSS",
55
"author": "Jonathan Neal <jonathantneal@hotmail.com>",
66
"license": "CC0-1.0",
7-
"repository": "jonathantneal/postcss-pseudo-class-any-link",
8-
"homepage": "https://github.com/jonathantneal/postcss-pseudo-class-any-link#readme",
9-
"bugs": "https://github.com/jonathantneal/postcss-pseudo-class-any-link/issues",
10-
"main": "index.js",
7+
"homepage": "https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-pseudo-class-any-link#readme",
8+
"bugs": "https://github.com/csstools/postcss-plugins/issues",
9+
"main": "dist/index.cjs",
10+
"module": "dist/index.mjs",
11+
"files": [
12+
"CHANGELOG.md",
13+
"INSTALL.md",
14+
"LICENSE.md",
15+
"README.md",
16+
"dist"
17+
],
18+
"bin": {
19+
"postcss-pseudo-class-any-link": "dist/cli.mjs"
20+
},
1121
"scripts": {
12-
"prepublishOnly": "npm test",
13-
"test": "npm run test:js && npm run test:tape",
14-
"test:js": "eslint *.js --cache --ignore-path .gitignore --quiet",
15-
"test:tape": "postcss-tape"
22+
"prepublishOnly": "npm run build && npm run test",
23+
"lint": "eslint src/**/*.js",
24+
"test": "postcss-tape",
25+
"build": "rollup -c ../../rollup/default.js",
26+
"stryker": "stryker run --logLevel error"
1627
},
1728
"engines": {
18-
"node": ">=12"
19-
},
20-
"peerDependencies": {
21-
"postcss": "^8.3"
29+
"node": "^12 || ^14 || >=16"
2230
},
2331
"dependencies": {
24-
"postcss-selector-parser": "^6"
32+
"postcss-selector-parser": "^6.0.6"
2533
},
2634
"devDependencies": {
27-
"eslint": "7.32.0",
2835
"postcss": "8.3.6",
2936
"postcss-tape": "6.0.1"
3037
},
31-
"eslintConfig": {
32-
"env": {
33-
"browser": true,
34-
"es6": true,
35-
"node": true
36-
},
37-
"parserOptions": {
38-
"sourceType": "module"
39-
},
40-
"root": true
38+
"peerDependencies": {
39+
"postcss": "^8.3"
4140
},
4241
"keywords": [
4342
"postcss",
@@ -50,5 +49,10 @@
5049
"area",
5150
"hyperlink",
5251
"href"
53-
]
52+
],
53+
"repository": {
54+
"type": "git",
55+
"url": "https://github.com/csstools/postcss-plugins.git",
56+
"directory": "plugins/postcss-pseudo-class-any-link"
57+
}
5458
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import plugin from './index';
2+
import { cli, helpTextLogger } from '@csstools/base-cli';
3+
4+
cli(
5+
plugin,
6+
['preserve'],
7+
helpTextLogger(
8+
'postcss-pseudo-class-any-link',
9+
'PostCSS Pseudo Class Any Link',
10+
'Lets you :any-link pseudo-class in CSS, following the Selectors specification.',
11+
{
12+
preserve: true,
13+
},
14+
),
15+
);

0 commit comments

Comments
 (0)