@docusaurus/cssnano-preset 2.0.0-beta.138b4c997 → 2.0.0-beta.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +5 -5
- package/src/remove-overridden-custom-properties/__tests__/__snapshots__/index.test.js.snap +0 -19
- package/src/remove-overridden-custom-properties/__tests__/fixtures/important_rule.css +0 -8
- package/src/remove-overridden-custom-properties/__tests__/fixtures/normal.css +0 -7
- package/src/remove-overridden-custom-properties/__tests__/index.test.js +0 -33
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/cssnano-preset",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.14",
|
|
4
4
|
"description": "Advanced cssnano preset for maximum optimization.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"license": "MIT",
|
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
"directory": "packages/docusaurus-cssnano-preset"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"cssnano-preset-advanced": "^5.1.
|
|
17
|
-
"postcss": "^8.
|
|
18
|
-
"postcss-sort-media-queries": "^
|
|
16
|
+
"cssnano-preset-advanced": "^5.1.4",
|
|
17
|
+
"postcss": "^8.3.7",
|
|
18
|
+
"postcss-sort-media-queries": "^4.1.0"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"to-vfile": "^6.0.0"
|
|
22
22
|
},
|
|
23
|
-
"gitHead": "
|
|
23
|
+
"gitHead": "c4824a8937d8f1aa0806667749cbc74058e2b294"
|
|
24
24
|
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`remove-overridden-custom-properties overridden custom properties should be removed 1`] = `
|
|
4
|
-
":root {
|
|
5
|
-
--color-secondary: green;
|
|
6
|
-
--color-primary: blue;
|
|
7
|
-
--color-header: gray;
|
|
8
|
-
}
|
|
9
|
-
"
|
|
10
|
-
`;
|
|
11
|
-
|
|
12
|
-
exports[`remove-overridden-custom-properties overridden custom properties with \`!important\` rule should not be removed 1`] = `
|
|
13
|
-
":root {
|
|
14
|
-
--color-primary: blue;
|
|
15
|
-
--color-header: gray !important;
|
|
16
|
-
--color-secondary: yellow !important;
|
|
17
|
-
}
|
|
18
|
-
"
|
|
19
|
-
`;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
const path = require('path');
|
|
9
|
-
const vfile = require('to-vfile');
|
|
10
|
-
const postcss = require('postcss');
|
|
11
|
-
const postCssRemoveOverriddenCustomProperties = require('../index');
|
|
12
|
-
|
|
13
|
-
const processFixture = (name) => {
|
|
14
|
-
const input = vfile.readSync(
|
|
15
|
-
path.join(__dirname, 'fixtures', `${name}.css`),
|
|
16
|
-
'utf8',
|
|
17
|
-
);
|
|
18
|
-
const output = postcss([postCssRemoveOverriddenCustomProperties]).process(
|
|
19
|
-
input,
|
|
20
|
-
);
|
|
21
|
-
|
|
22
|
-
return output.css;
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
describe('remove-overridden-custom-properties', () => {
|
|
26
|
-
test('overridden custom properties should be removed', () => {
|
|
27
|
-
expect(processFixture('normal')).toMatchSnapshot();
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
test('overridden custom properties with `!important` rule should not be removed', () => {
|
|
31
|
-
expect(processFixture('important_rule')).toMatchSnapshot();
|
|
32
|
-
});
|
|
33
|
-
});
|