Skip to content

Commit cc42421

Browse files
authored
Migrate postcss-image-set-function (#37)
* Migrate postcss-image-set-function * Migrate postcss-image-set-function * cleanup * cleanup
1 parent acc05cd commit cc42421

23 files changed

+502
-540
lines changed

plugins/postcss-image-set-function/.editorconfig

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

plugins/postcss-image-set-function/.github/workflows/test.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
node_modules
2+
dist
23
package-lock.json
34
yarn.lock
45
*.log*
56
*.result.css
6-
.*
7+
*.result.css.map
78
!.editorconfig
89
!.gitignore
10+
!.rollup.js
911
!.tape.js
12+
!.travis.yml
1013
!.github

plugins/postcss-image-set-function/CONTRIBUTING.md

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

plugins/postcss-image-set-function/INSTALL.md

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,7 @@ Add [PostCSS image-set() Function] to your project:
1313
npm install postcss-image-set-function --save-dev
1414
```
1515

16-
Use [PostCSS image-set() Function] to process your CSS:
17-
18-
```js
19-
const postcssImageSetFunction = require('postcss-image-set-function');
20-
21-
postcssImageSetFunction.process(YOUR_CSS /*, processOptions, pluginOptions */);
22-
```
23-
24-
Or use it as a [PostCSS] plugin:
16+
Use [PostCSS image-set() Function] as a [PostCSS] plugin:
2517

2618
```js
2719
const postcss = require('postcss');
@@ -166,6 +158,6 @@ grunt.initConfig({
166158
[PostCSS]: https://github.com/postcss/postcss
167159
[PostCSS CLI]: https://github.com/postcss/postcss-cli
168160
[PostCSS Loader]: https://github.com/postcss/postcss-loader
169-
[PostCSS image-set() Function]: https://github.com/jonathantneal/postcss-image-set-function
161+
[PostCSS image-set() Function]: https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-image-set-function
170162
[React App Rewire PostCSS]: https://github.com/csstools/react-app-rewire-postcss
171163
[React App Rewired]: https://github.com/timarney/react-app-rewired

plugins/postcss-image-set-function/README.md

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,7 @@ Add [PostCSS image-set() Function] to your project:
5656
npm install postcss-image-set-function --save-dev
5757
```
5858

59-
Use [PostCSS image-set() Function] to process your CSS:
60-
61-
```js
62-
const postcssImageSetFunction = require('postcss-image-set-function');
63-
64-
postcssImageSetFunction.process(YOUR_CSS /*, processOptions, pluginOptions */);
65-
```
66-
67-
Or use it as a [PostCSS] plugin:
59+
Use [PostCSS image-set() Function] as a [PostCSS] plugin:
6860

6961
```js
7062
const postcss = require('postcss');
@@ -154,8 +146,8 @@ in, other factors can affect the chosen image. For example, if the user is on a
154146
slow mobile connection, the browser may prefer to select a lower-res image
155147
rather than wait for a larger, resolution-matching image to load.
156148

157-
[cli-img]: https://github.com/csstools/postcss-image-set-function/workflows/test/badge.svg
158-
[cli-url]: https://github.com/csstools/postcss-image-set-function/actions/workflows/test.yml?query=workflow/test
149+
[cli-img]: https://github.com/csstools/postcss-plugins/workflows/test/badge.svg
150+
[cli-url]: https://github.com/csstools/postcss-plugins/actions/workflows/test.yml?query=workflow/test
159151
[css-img]: https://cssdb.org/badge/image-set-function.svg
160152
[css-url]: https://cssdb.org/#image-set-function
161153
[git-img]: https://img.shields.io/badge/support-chat-blue.svg
@@ -168,4 +160,4 @@ rather than wait for a larger, resolution-matching image to load.
168160
[Grunt PostCSS]: https://github.com/nDmitry/grunt-postcss
169161
[PostCSS]: https://github.com/postcss/postcss
170162
[PostCSS Loader]: https://github.com/postcss/postcss-loader
171-
[PostCSS image-set() Function]: https://github.com/jonathantneal/postcss-image-set-function
163+
[PostCSS image-set() Function]: https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-image-set-function

plugins/postcss-image-set-function/index.js

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

plugins/postcss-image-set-function/lib/get-comma.js

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

plugins/postcss-image-set-function/lib/get-image.js

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

plugins/postcss-image-set-function/lib/get-media.js

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

plugins/postcss-image-set-function/lib/handle-invalidation.js

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

plugins/postcss-image-set-function/lib/process-image-set.js

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

0 commit comments

Comments
 (0)