Skip to content

Commit 1b7196c

Browse files
committed
docs: update README files to improve structure and import statements
1 parent b1bb0b3 commit 1b7196c

File tree

2 files changed

+30
-24
lines changed

2 files changed

+30
-24
lines changed

README-UK.md

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,18 @@
1818

1919
[🇬🇧 English](./README.md) | 🇺🇦 Українська
2020

21-
- [Альтернатива `mqpacker`](#альтернатива-mqpacker)
22-
- [Використання в CSS-in-JS 🚀](#використання-в-css-in-js-)
23-
- [Встановлення](#встановлення)
24-
- [Використання](#використання)
25-
- [mobile-first](#mobile-first)
26-
- [desktop-first](#desktop-first)
27-
- [Конфігурація сортування](#конфігурація-сортування)
28-
- [Параметри конфігурації](#параметри-конфігурації)
29-
- [Інформація про проєкт](#інформація-про-проєкт)
21+
- [sort-css-media-queries](#sort-css-media-queries)
22+
- [Зміст](#зміст)
23+
- [Альтернатива `mqpacker`](#альтернатива-mqpacker)
24+
- [Використання в CSS-in-JS 🚀](#використання-в-css-in-js-)
25+
- [Встановлення](#встановлення)
26+
- [Використання](#використання)
27+
- [mobile-first](#mobile-first)
28+
- [desktop-first](#desktop-first)
29+
- [Конфігурація сортування](#конфігурація-сортування)
30+
- [Параметри конфігурації](#параметри-конфігурації)
31+
- [`unitlessMqAlwaysFirst`](#unitlessmqalwaysfirst)
32+
- [Інформація про проєкт](#інформація-про-проєкт)
3033

3134
## Альтернатива `mqpacker`
3235

@@ -51,7 +54,7 @@ yarn add sort-css-media-queries
5154
https://www.npmjs.com/package/css-mqpacker#sort
5255

5356
```js
54-
const sortCSSmq = require('sort-css-media-queries');
57+
import sortCSSmq from 'sort-css-media-queries';
5558

5659
// your cool code
5760
// ...
@@ -125,7 +128,7 @@ postcss([
125128
### desktop-first
126129

127130
```js
128-
const sortCSSmq = require('sort-css-media-queries');
131+
import sortCSSmq from 'sort-css-media-queries';
129132

130133
// your cool code
131134
// ...
@@ -158,7 +161,7 @@ postcss([
158161
та створити власний метод сортування з конфігурацією за необхідності:
159162

160163
```js
161-
const createSort = require("sort-css-media-queries/lib/create-sort");
164+
import createSort from 'sort-css-media-queries/lib/create-sort';
162165
const sortCSSmq = createSort({ ...configuration });
163166
```
164167

README.md

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,18 @@
2323
|
2424
[🇺🇦 Українська](https://github.com/dutchenkoOleg/sort-css-media-queries/blob/master/README-UK.md)
2525

26-
- [Alternative to `mqpacker`](#alternative-to-mqpacker)
27-
- [Available in CSS-in-JS](#available-in-css-in-js-)
28-
- [Installing](#installing)
29-
- [Usage](#usage)
30-
- [mobile-first](#mobile-first)
31-
- [desktop-first](#desktop-first)
32-
- [Sort configuration](#sort-configuration)
33-
- [Configuration options](#configuration-options)
34-
- [Project info](#project-info)
26+
- [sort-css-media-queries](#sort-css-media-queries)
27+
- [Table of Contents](#table-of-contents)
28+
- [Alternative to `mqpacker`](#alternative-to-mqpacker)
29+
- [Available in CSS-in-JS 🚀](#available-in-css-in-js-)
30+
- [Installing](#installing)
31+
- [Usage](#usage)
32+
- [mobile-first](#mobile-first)
33+
- [desktop-first](#desktop-first)
34+
- [Sort configuration](#sort-configuration)
35+
- [Configuration options](#configuration-options)
36+
- [`unitlessMqAlwaysFirst`](#unitlessmqalwaysfirst)
37+
- [Project Info](#project-info)
3538

3639
## Alternative to `mqpacker`
3740

@@ -56,7 +59,7 @@ See the original docs at first https://www.npmjs.com/package/css-mqpacker#sort;
5659

5760
```js
5861

59-
const sortCSSmq = require('sort-css-media-queries');
62+
import sortCSSmq from 'sort-css-media-queries';
6063

6164
// your cool code
6265
// ...
@@ -135,7 +138,7 @@ Sort result:
135138
### desktop-first
136139

137140
```js
138-
const sortCSSmq = require('sort-css-media-queries');
141+
import sortCSSmq from 'sort-css-media-queries';
139142

140143
// your cool code
141144
// ...
@@ -168,7 +171,7 @@ You can import a separate sorting helper from a package
168171
and create your own sorting method with config as needed:
169172

170173
```js
171-
const createSort = require("sort-css-media-queries/lib/create-sort");
174+
import createSort from 'sort-css-media-queries/lib/create-sort';
172175
const sortCSSmq = createSort({ ...configuration });
173176
```
174177

0 commit comments

Comments
 (0)