Skip to content

Commit

Permalink
Merge pull request #59 from sounisi5011/release/2.0.0
Browse files Browse the repository at this point in the history
Release 2.0.0
  • Loading branch information
sounisi5011 committed Jan 13, 2020
2 parents 3baea77 + d175294 commit d804ea2
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 49 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## [Unreleased]

[Unreleased]: https://github.com/sounisi5011/metalsmith-postcss2/compare/v2.0.0...master

## [2.0.0] (2020-01-13 UTC)

### Breaking Changes

* [#51] - Change supported PostCSS version: `^5.2.18 || ^6.0.13 || 7.x` -> `^7.0.8`
Expand Down Expand Up @@ -74,7 +78,7 @@
* [#56] - Cache npm's shared cache directory on CI
* [#57] - Fix type definitions

[Unreleased]: https://github.com/sounisi5011/metalsmith-postcss2/compare/v1.0.0...HEAD
[2.0.0]: https://github.com/sounisi5011/metalsmith-postcss2/compare/v1.0.0...v2.0.0
[#42]: https://github.com/sounisi5011/metalsmith-postcss2/pull/42
[#51]: https://github.com/sounisi5011/metalsmith-postcss2/pull/51
[#44]: https://github.com/sounisi5011/metalsmith-postcss2/pull/44
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019 sounisi5011
Copyright (c) 2020 sounisi5011

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
47 changes: 24 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@
![Supported Metalsmith version: ^2.2.0](https://img.shields.io/static/v1?label=metalsmith&message=%5E2.2.0&color=blue)
![Supported PostCSS version: ^7.0.8](https://img.shields.io/static/v1?label=postcss&message=%5E7.0.8&color=blue)
![Type Definitions: TypeScript](https://img.shields.io/static/v1?label=types&message=TypeScript&color=blue)
[![bundle size](https://badgen.net/bundlephobia/min/metalsmith-postcss2@1.0.0)](https://bundlephobia.com/result?p=metalsmith-postcss2@1.0.0)
[![Minified Bundle Size Details](https://img.shields.io/bundlephobia/min/metalsmith-postcss2/2.0.0)](https://bundlephobia.com/result?p=metalsmith-postcss2@2.0.0)
[![Install Size Details](https://packagephobia.now.sh/badge?p=metalsmith-postcss2@2.0.0)](https://packagephobia.now.sh/result?p=metalsmith-postcss2@2.0.0)
[![Dependencies Status](https://david-dm.org/sounisi5011/metalsmith-postcss2/status.svg)](https://david-dm.org/sounisi5011/metalsmith-postcss2)
[![Build Status](https://dev.azure.com/sounisi5011/metalsmith-postcss2/_apis/build/status/sounisi5011.metalsmith-postcss2?branchName=master)](https://dev.azure.com/sounisi5011/metalsmith-postcss2/_build/latest?definitionId=1&branchName=master)
[![Maintainability Status](https://api.codeclimate.com/v1/badges/dd1dfc5d976b1bce125c/maintainability)](https://codeclimate.com/github/sounisi5011/metalsmith-postcss2/maintainability)

[npm]: https://www.npmjs.com/package/metalsmith-postcss2
[github-license]: https://github.com/sounisi5011/metalsmith-postcss2/blob/v1.0.0/LICENSE
[github-license]: https://github.com/sounisi5011/metalsmith-postcss2/blob/v2.0.0/LICENSE

[Metalsmith] plugin for [PostCSS].

Expand All @@ -23,7 +24,7 @@

* Supports the latest PostCSS

Supported and tested version: [![ ^7.0.8](https://img.shields.io/static/v1?label=postcss&message=%5E7.0.8&color=blue)](https://github.com/sounisi5011/metalsmith-postcss2/blob/v1.0.0/package.json#L146).
Supported and tested version: [![ ^7.0.8](https://img.shields.io/static/v1?label=postcss&message=%5E7.0.8&color=blue)](https://github.com/sounisi5011/metalsmith-postcss2/blob/v2.0.0/package.json#L160).

* Loading [PostCSS config file][npm-postcss-load-config-used]

Expand Down Expand Up @@ -332,7 +333,7 @@ metalsmith

## Options

The default value for options are [defined](https://github.com/sounisi5011/metalsmith-postcss2/blob/v1.0.0/src/options.ts#L51-L61) like this:
The default value for options are [defined](https://github.com/sounisi5011/metalsmith-postcss2/blob/v2.0.0/src/options.ts#L55-L65) like this:

```js
const path = require('path');
Expand All @@ -358,13 +359,13 @@ Pattern are verified using [multimatch v4.0.0][npm-multimatch-used].

[npm-multimatch-used]: https://www.npmjs.com/package/multimatch/v/4.0.0

Default value ([source](https://github.com/sounisi5011/metalsmith-postcss2/blob/v1.0.0/src/options.ts#L52)):
Default value ([source](https://github.com/sounisi5011/metalsmith-postcss2/blob/v2.0.0/src/options.ts#L56)):

```js
['**/*.css']
```

Type definition ([source](https://github.com/sounisi5011/metalsmith-postcss2/blob/v1.0.0/src/options.ts#L26)):
Type definition ([source](https://github.com/sounisi5011/metalsmith-postcss2/blob/v2.0.0/src/options.ts#L25)):

```ts
string | string[]
Expand Down Expand Up @@ -413,13 +414,13 @@ In addition to PostCSS plugins, you can also specify the following values:
]
```

Default value ([source](https://github.com/sounisi5011/metalsmith-postcss2/blob/v1.0.0/src/options.ts#L53)):
Default value ([source](https://github.com/sounisi5011/metalsmith-postcss2/blob/v2.0.0/src/options.ts#L57)):

```js
[]
```

Type definition ([source line 27](https://github.com/sounisi5011/metalsmith-postcss2/blob/v1.0.0/src/options.ts#L27) / [source line 37 - 42](https://github.com/sounisi5011/metalsmith-postcss2/blob/v1.0.0/src/options.ts#L37-L42)):
Type definition ([source line 26](https://github.com/sounisi5011/metalsmith-postcss2/blob/v2.0.0/src/options.ts#L26) / [source line 41 - 46](https://github.com/sounisi5011/metalsmith-postcss2/blob/v2.0.0/src/options.ts#L41-L46)):

```ts
// import postcss from 'postcss';
Expand All @@ -439,15 +440,15 @@ See the [PostCSS documentation for details on options][PostCSS ProcessOptions].
[PostCSS ProcessOptions]: http://api.postcss.org/global.html#processOptions

The `from` and `to` properties cannot be specified because the plugin automatically sets them internally.
If set, [an exception will be thrown](https://github.com/sounisi5011/metalsmith-postcss2/blob/v1.0.0/src/options.ts#L63-L83).
If set, [an exception will be thrown](https://github.com/sounisi5011/metalsmith-postcss2/blob/v2.0.0/src/options.ts#L67-L87).

Default value ([source](https://github.com/sounisi5011/metalsmith-postcss2/blob/v1.0.0/src/options.ts#L54)):
Default value ([source](https://github.com/sounisi5011/metalsmith-postcss2/blob/v2.0.0/src/options.ts#L58)):

```js
{}
```

Type definition ([source](https://github.com/sounisi5011/metalsmith-postcss2/blob/v1.0.0/src/options.ts#L28)):
Type definition ([source](https://github.com/sounisi5011/metalsmith-postcss2/blob/v2.0.0/src/options.ts#L27)):

```ts
// import postcss from 'postcss';
Expand Down Expand Up @@ -499,7 +500,7 @@ new Date()

By default, a function that replaces file extension with `.css` is setted.

Default value ([source](https://github.com/sounisi5011/metalsmith-postcss2/blob/v1.0.0/src/options.ts#L55-L59)):
Default value ([source](https://github.com/sounisi5011/metalsmith-postcss2/blob/v2.0.0/src/options.ts#L59-L63)):

```js
const path = require('path');
Expand All @@ -510,7 +511,7 @@ filename => {
}
```

Type definition ([source line 29](https://github.com/sounisi5011/metalsmith-postcss2/blob/v1.0.0/src/options.ts#L29) / [source line 43](https://github.com/sounisi5011/metalsmith-postcss2/blob/v1.0.0/src/options.ts#L43)):
Type definition ([source line 28](https://github.com/sounisi5011/metalsmith-postcss2/blob/v2.0.0/src/options.ts#L28) / [source line 47](https://github.com/sounisi5011/metalsmith-postcss2/blob/v2.0.0/src/options.ts#L47)):

```ts
true | false | null | (filename: string) => string
Expand Down Expand Up @@ -608,13 +609,13 @@ undefined
``
```

Default value ([source](https://github.com/sounisi5011/metalsmith-postcss2/blob/v1.0.0/src/options.ts#L60)):
Default value ([source](https://github.com/sounisi5011/metalsmith-postcss2/blob/v2.0.0/src/options.ts#L64)):

```js
false
```

Type definition ([source](https://github.com/sounisi5011/metalsmith-postcss2/blob/v1.0.0/src/options.ts#L30)):
Type definition ([source](https://github.com/sounisi5011/metalsmith-postcss2/blob/v2.0.0/src/options.ts#L29)):

```ts
string | false | null
Expand All @@ -639,14 +640,14 @@ postcss([ 'postcss-import' ])

For more advanced usage it's recommend to to use a function in `postcss.config.js`, this gives you access to the CLI context to dynamically apply options and plugins **per file**

| Name | Type | Description | Default |
| :-----------: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :--------------------- | :------------------------------------------: |
| `cwd` | `string` | `process.cwd()` | `process.cwd()` |
| `env` | `string` | `process.env.NODE_ENV` | `'development'` |
| `options` | [`postcss.ProcessOptions`][PostCSS ProcessOptions] | PostCSS Options | `from, to, parser, stringifier, syntax, map` |
| `file` | `{dirname: string, basename: string, extname: string}` | Source File Data | `dirname, basename, extname` |
| `pluginsList` | <code>(<a href="http://api.postcss.org/global.html#Plugin">Plugin</a> &#x7C; <a href="http://api.postcss.org/global.html#pluginFunction">pluginFunction</a> &#x7C; <a href="http://api.postcss.org/Processor.html">Processor</a>)[]</code> | PostCSS Plugins Array | `[]` |
| `metalsmith` | `Metalsmith` | `Metalsmith` instance | `Metalsmith(...)` |
| Name | Type | Description | Default |
| :-----------: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :--------------------- | :------------------------------------------: |
| `cwd` | `string` | `process.cwd()` | `process.cwd()` |
| `env` | `string` | `process.env.NODE_ENV` | `'development'` |
| `options` | [`postcss.ProcessOptions`][PostCSS ProcessOptions] | PostCSS Options | `from, to, parser, stringifier, syntax, map` |
| `file` | `{dirname: string, basename: string, extname: string}` | Source File Data | `dirname, basename, extname` |
| `pluginsList` | <code>(<a href="http://api.postcss.org/global.html#Plugin">postcss.Plugin</a> &#x7C; <a href="http://api.postcss.org/global.html#pluginFunction">postcss.pluginFunction</a> &#x7C; <a href="http://api.postcss.org/Processor.html">postcss.Processor</a>)[]</code> | PostCSS Plugins Array | `[]` |
| `metalsmith` | `Metalsmith` | `Metalsmith` instance | `Metalsmith(...)` |

**postcss.config.js**

Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "metalsmith-postcss2",
"version": "1.0.0",
"version": "2.0.0",
"description": "Metalsmith plugin for PostCSS",
"keywords": [
"css",
Expand Down

0 comments on commit d804ea2

Please sign in to comment.