Skip to content

Commit

Permalink
feat: postcss-lowercase-text
Browse files Browse the repository at this point in the history
  • Loading branch information
anikethsaha committed Apr 16, 2020
1 parent 8dd5c44 commit b1b0698
Show file tree
Hide file tree
Showing 12 changed files with 150 additions and 148 deletions.
3 changes: 3 additions & 0 deletions babel.config.js
Expand Up @@ -54,6 +54,7 @@ module.exports = function(api) {
'lerna:postcss-zindex': 'postcss-zindex',
'lerna:stylehacks': 'stylehacks',
'lerna:cssnano-util-raw-cache': 'cssnano-util-raw-cache',
'lerna:postcss-lowercase-text': 'postcss-lowercase-text',
},
},
]);
Expand Down Expand Up @@ -131,6 +132,8 @@ module.exports = function(api) {
'lerna:stylehacks': './stylehacks/src/index.js',
'lerna:cssnano-util-raw-cache':
'./cssnano-util-raw-cache/src/index.js',
'lerna:postcss-lowercase-text':
'./postcss-lowercase-text/src/index.js',
},
},
]);
Expand Down
1 change: 1 addition & 0 deletions jest.config.js
Expand Up @@ -9,6 +9,7 @@ module.exports = {
'_processCSS.js',
'_processCss.js',
'_webpack.config.js',
'packages/postcss-lowercase-text/src/__tests__/data/',
],
testTimeout: 30000,
};
2 changes: 1 addition & 1 deletion packages/css-size/src/__tests__/index.js
Expand Up @@ -41,7 +41,7 @@ test('cli', () => {
expect(!!~out.indexOf('9 B')).toBe(true);
expect(!!~out.indexOf('79.07%')).toBe(true);
});
});
}, 10000);

test('cli with processor argument', () => {
return setup(['-p', noopProcessorPath, 'test.css']).then((results) => {
Expand Down
121 changes: 66 additions & 55 deletions packages/cssnano-preset-advanced/README.md
Expand Up @@ -2,53 +2,56 @@

> Advanced optimisations for cssnano; may or may not break your CSS!

## Table of Contents

- [Usage](#usage)

- [Install](#install)
- [Configuration](#configuration)

- [Plugins](#plugins)

- [autoprefixer (external)](#autoprefixer-external)
- [css-declaration-sorter (external)](#css-declaration-sorter-external)
- [cssnano-utils](#cssnano-utils)
- [postcss-calc (external)](#postcss-calc-external)
- [postcss-colormin](#postcss-colormin)
- [postcss-convert-values](#postcss-convert-values)
- [postcss-discard-comments](#postcss-discard-comments)
- [postcss-discard-duplicates](#postcss-discard-duplicates)
- [postcss-discard-empty](#postcss-discard-empty)
- [postcss-discard-overridden](#postcss-discard-overridden)
- [postcss-discard-unused](#postcss-discard-unused)
- [postcss-merge-idents](#postcss-merge-idents)
- [postcss-merge-longhand](#postcss-merge-longhand)
- [postcss-merge-rules](#postcss-merge-rules)
- [postcss-minify-font-values](#postcss-minify-font-values)
- [postcss-minify-gradients](#postcss-minify-gradients)
- [postcss-minify-params](#postcss-minify-params)
- [postcss-minify-selectors](#postcss-minify-selectors)
- [postcss-normalize-charset](#postcss-normalize-charset)
- [postcss-normalize-display-values](#postcss-normalize-display-values)
- [postcss-normalize-positions](#postcss-normalize-positions)
- [postcss-normalize-repeat-style](#postcss-normalize-repeat-style)
- [postcss-normalize-string](#postcss-normalize-string)
- [postcss-normalize-timing-functions](#postcss-normalize-timing-functions)
- [postcss-normalize-unicode](#postcss-normalize-unicode)
- [postcss-normalize-url](#postcss-normalize-url)
- [postcss-normalize-whitespace](#postcss-normalize-whitespace)
- [postcss-ordered-values](#postcss-ordered-values)
- [postcss-reduce-idents](#postcss-reduce-idents)
- [postcss-reduce-initial](#postcss-reduce-initial)
- [postcss-reduce-transforms](#postcss-reduce-transforms)
- [postcss-svgo](#postcss-svgo)
- [postcss-unique-selectors](#postcss-unique-selectors)
- [postcss-zindex](#postcss-zindex)

- [Contributors](#contributors)

- [License](#license)
- [Usage](#usage)

- [Install](#install)
- [Configuration](#configuration)

- [Plugins](#plugins)

- [autoprefixer (external)](#autoprefixer-external)
- [css-declaration-sorter (external)](#css-declaration-sorter-external)
- [cssnano-util-raw-cache](#cssnano-util-raw-cache)
- [postcss-calc (external)](#postcss-calc-external)
- [postcss-colormin](#postcss-colormin)
- [postcss-convert-values](#postcss-convert-values)
- [postcss-discard-comments](#postcss-discard-comments)
- [postcss-discard-duplicates](#postcss-discard-duplicates)
- [postcss-discard-empty](#postcss-discard-empty)
- [postcss-discard-overridden](#postcss-discard-overridden)
- [postcss-discard-unused](#postcss-discard-unused)
- [postcss-lowercase-props-selectors](#postcss-lowercase-props-selectors)
- [postcss-merge-idents](#postcss-merge-idents)
- [postcss-merge-longhand](#postcss-merge-longhand)
- [postcss-merge-rules](#postcss-merge-rules)
- [postcss-minify-font-values](#postcss-minify-font-values)
- [postcss-minify-gradients](#postcss-minify-gradients)
- [postcss-minify-params](#postcss-minify-params)
- [postcss-minify-selectors](#postcss-minify-selectors)
- [postcss-normalize-charset](#postcss-normalize-charset)
- [postcss-normalize-display-values](#postcss-normalize-display-values)
- [postcss-normalize-positions](#postcss-normalize-positions)
- [postcss-normalize-repeat-style](#postcss-normalize-repeat-style)
- [postcss-normalize-string](#postcss-normalize-string)
- [postcss-normalize-timing-functions](#postcss-normalize-timing-functions)
- [postcss-normalize-unicode](#postcss-normalize-unicode)
- [postcss-normalize-url](#postcss-normalize-url)
- [postcss-normalize-whitespace](#postcss-normalize-whitespace)
- [postcss-ordered-values](#postcss-ordered-values)
- [postcss-reduce-idents](#postcss-reduce-idents)
- [postcss-reduce-initial](#postcss-reduce-initial)
- [postcss-reduce-transforms](#postcss-reduce-transforms)
- [postcss-svgo](#postcss-svgo)
- [postcss-unique-selectors](#postcss-unique-selectors)
- [postcss-zindex](#postcss-zindex)

- [Contributors](#contributors)

- [License](#license)


## Usage

Expand Down Expand Up @@ -94,24 +97,25 @@ const advancedPreset = require('cssnano-preset-advanced');

module.exports = advancedPreset({
discardComments: {
remove: (comment) => comment[0] === '@',
},
remove: comment => comment[0] === "@"
}
});
```

Note that you may wish to publish your own preset to npm for reusability, should it differ a lot from this one. This is highly encouraged!


## Plugins

### [`autoprefixer`](https://github.com/postcss/autoprefixer) (external)
### [`autoprefixer`](shortcut://github.com/postcss/autoprefixer) (external)

> Parse CSS and add vendor prefixes to CSS rules using values from the Can I Use website
This plugin is loaded with the following configuration:

```js
{
add: false;
add: false
}
```

Expand All @@ -123,13 +127,13 @@ This plugin is loaded with the following configuration:

```js
{
exclude: true;
keepOverrides: true
}
```

### [`cssnano-utils`](https://github.com/cssnano/cssnano/tree/master/packages/cssnano-utils)
### `cssnano-util-raw-cache`

> Utility methods used by cssnano
This plugin is loaded with its default configuration.

### [`postcss-calc`](https://github.com/postcss/postcss-calc) (external)

Expand All @@ -151,7 +155,7 @@ This plugin is loaded with the following configuration:

```js
{
length: false;
length: false
}
```

Expand Down Expand Up @@ -185,6 +189,10 @@ This plugin is loaded with its default configuration.
This plugin is loaded with its default configuration.

### `postcss-lowercase-props-selectors`

This plugin is loaded with its default configuration.

### [`postcss-merge-idents`](https://github.com/cssnano/cssnano/tree/master/packages/postcss-merge-idents)

> Merge keyframe and counter style identifiers.
Expand Down Expand Up @@ -235,7 +243,7 @@ This plugin is loaded with the following configuration:

```js
{
add: false;
add: false
}
```

Expand Down Expand Up @@ -329,10 +337,13 @@ This plugin is loaded with its default configuration.
This plugin is loaded with its default configuration.


## Contributors

See [CONTRIBUTORS.md](https://github.com/cssnano/cssnano/blob/master/CONTRIBUTORS.md).


## License

MIT © [Ben Briggs](http://beneb.info)
[MIT](https://opensource.org/licenses/MIT) © [Ben Briggs](http://beneb.info)

@@ -1,7 +1,7 @@
import { integrationTests, loadPreset } from '../../../../util/testHelpers.js';
import preset from '..';

jest.setTimeout(30000);
jest.setTimeout(60000);

test(
'should correctly handle the framework tests',
Expand Down

0 comments on commit b1b0698

Please sign in to comment.