Skip to content
This repository has been archived by the owner on Feb 18, 2022. It is now read-only.

Commit

Permalink
5.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathantneal committed Sep 18, 2018
1 parent cbe9486 commit 9f7f470
Show file tree
Hide file tree
Showing 19 changed files with 540 additions and 1,513 deletions.
13 changes: 6 additions & 7 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
# editorconfig.org
root = true

[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
end_of_line = lf
indent_style = tab
insert_final_newline = true
indent_style = space
indent_size = 2
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[Makefile]
indent_style = tab
[*.{json,md,yml}]
indent_size = 2
indent_style = space
36 changes: 0 additions & 36 deletions .eslintrc.yml

This file was deleted.

11 changes: 10 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
node_modules
test/fixtures/*.actual.css
index.*.*
package-lock.json
*.log*
*.result.css
.*
!.editorconfig
!.gitignore
!.rollup.js
!.tape.js
!.travis.yml
16 changes: 16 additions & 0 deletions .rollup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import babel from 'rollup-plugin-babel';

export default {
input: 'index.js',
output: [
{ file: 'index.cjs.js', format: 'cjs', sourcemap: true },
{ file: 'index.es.mjs', format: 'es', sourcemap: true }
],
plugins: [
babel({
presets: [
['@babel/env', { modules: false, targets: { node: 6 } }]
]
})
]
};
13 changes: 13 additions & 0 deletions .tape.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = {
'postcss-color-hex-alpha': {
'basic': {
message: 'supports basic usage'
},
'basic:preserve': {
message: 'supports { preserve: true } usage',
options: {
preserve: true
}
}
}
};
22 changes: 12 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,34 @@
# 4.0.0 - 2017-09-17
# Changes to PostCSS Color Hex Alpha

### 5.0.0 (September 18, 2018)

- Initial version

### 4.0.0 (September 17, 2018)

- Updated: Support for PostCSS v7+
- Updated: Support for Node v6+
- Updated: color v3+

# 3.0.0 - 2017-05-15
### 3.0.0 (May 15, 2017)

- Added: compatibility with postcss v6.x
- Updated dependencies

# 2.0.0 - 2015-09-08
### 2.0.0 (September 8, 2015)

- Added: compatibility with postcss v5.x
- Removed: compatiblity with postcss v4.x

# 1.3.0 - 2015-08-13
### 1.3.0 (August 13, 2015)

- Added: compatibility with postcss v4.1.x
([#3](https://github.com/postcss/postcss-color-hex-alpha/pull/3))

# 1.2.0 - ?

1.1.0 ?

# 1.1.0 - 2014-11-25
### 1.1.0 (November 25, 2014)

- Enhanced exceptions

# 1.0.0 - 2014-10-04
### 1.0.0 - (October 4, 2014)

Initial release from [postcss-color](https://github.com/postcss/postcss-color)
65 changes: 65 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Contributing to PostCSS Color Hex Alpha

You want to help? You rock! Now, take a moment to be sure your contributions
make sense to everyone else.

## Reporting Issues

Found a problem? Want a new feature?

- See if your issue or idea has [already been reported].
- Provide a [reduced test case] or a [live example].

Remember, a bug is a _demonstrable problem_ caused by _our_ code.

## Submitting Pull Requests

Pull requests are the greatest contributions, so be sure they are focused in
scope and avoid unrelated commits.

1. To begin; [fork this project], clone your fork, and add our upstream.
```bash
# Clone your fork of the repo into the current directory
git clone git@github.com:YOUR_USER/postcss-color-hex-alpha.git

# Navigate to the newly cloned directory
cd postcss-color-hex-alpha

# Assign the original repo to a remote called "upstream"
git remote add upstream git@github.com:postcss/postcss-color-hex-alpha.git

# Install the tools necessary for testing
npm install
```

2. Create a branch for your feature or fix:
```bash
# Move into a new branch for your feature
git checkout -b feature/thing
```
```bash
# Move into a new branch for your fix
git checkout -b fix/something
```

3. If your code follows our practices, then push your feature branch:
```bash
# Test current code
npm test
```
```bash
# Push the branch for your new feature
git push origin feature/thing
```
```bash
# Or, push the branch for your update
git push origin update/something
```

That’s it! Now [open a pull request] with a clear title and description.

[already been reported]: issues
[fork this project]: fork
[live example]: https://codepen.io/pen
[open a pull request]: https://help.github.com/articles/using-pull-requests/
[reduced test case]: https://css-tricks.com/reduced-test-cases/
170 changes: 170 additions & 0 deletions INSTALL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
# Installing PostCSS Color Hex Alpha

[PostCSS Color Hex Alpha] runs in all Node environments, with special instructions for:

| [Node](#node) | [PostCSS CLI](#postcss-cli) | [Webpack](#webpack) | [Create React App](#create-react-app) | [Gulp](#gulp) | [Grunt](#grunt) |
| --- | --- | --- | --- | --- | --- |

## Node

Add [PostCSS Color Hex Alpha] to your project:

```bash
npm install postcss-color-hex-alpha --save-dev
```

Use [PostCSS Color Hex Alpha] to process your CSS:

```js
const postcssColorHexAlpha = require('postcss-color-hex-alpha');

postcssColorHexAlpha.process(YOUR_CSS /*, processOptions, pluginOptions */);
```

Or use it as a [PostCSS] plugin:

```js
const postcss = require('postcss');
const postcssColorHexAlpha = require('postcss-color-hex-alpha');

postcss([
postcssColorHexAlpha(/* pluginOptions */)
]).process(YOUR_CSS /*, processOptions */);
```

## PostCSS CLI

Add [PostCSS CLI] to your project:

```bash
npm install postcss-cli --save-dev
```

Use [PostCSS Color Hex Alpha] in your `postcss.config.js` configuration file:

```js
const postcssColorHexAlpha = require('postcss-color-hex-alpha');

module.exports = {
plugins: [
postcssColorHexAlpha(/* pluginOptions */)
]
}
```

## Webpack

Add [PostCSS Loader] to your project:

```bash
npm install postcss-loader --save-dev
```

Use [PostCSS Color Hex Alpha] in your Webpack configuration:

```js
const postcssColorHexAlpha = require('postcss-color-hex-alpha');

module.exports = {
module: {
rules: [
{
test: /\.css$/,
use: [
'style-loader',
{ loader: 'css-loader', options: { importLoaders: 1 } },
{ loader: 'postcss-loader', options: {
ident: 'postcss',
plugins: () => [
postcssColorHexAlpha(/* pluginOptions */)
]
} }
]
}
]
}
}
```

## Create React App

Add [React App Rewired] and [React App Rewire PostCSS] to your project:

```bash
npm install react-app-rewired react-app-rewire-postcss --save-dev
```

Use [React App Rewire PostCSS] and [PostCSS Color Hex Alpha] in your
`config-overrides.js` file:

```js
const reactAppRewirePostcss = require('react-app-rewire-postcss');
const postcssColorHexAlpha = require('postcss-color-hex-alpha');

module.exports = config => reactAppRewirePostcss(config, {
plugins: () => [
postcssColorHexAlpha(/* pluginOptions */)
]
});
```

## Gulp

Add [Gulp PostCSS] to your project:

```bash
npm install gulp-postcss --save-dev
```

Use [PostCSS Color Hex Alpha] in your Gulpfile:

```js
const postcss = require('gulp-postcss');
const postcssColorHexAlpha = require('postcss-color-hex-alpha');

gulp.task('css', () => gulp.src('./src/*.css').pipe(
postcss([
postcssColorHexAlpha(/* pluginOptions */)
])
).pipe(
gulp.dest('.')
));
```

## Grunt

Add [Grunt PostCSS] to your project:

```bash
npm install grunt-postcss --save-dev
```

Use [PostCSS Color Hex Alpha] in your Gruntfile:

```js
const postcssColorHexAlpha = require('postcss-color-hex-alpha');

grunt.loadNpmTasks('grunt-postcss');

grunt.initConfig({
postcss: {
options: {
use: [
postcssColorHexAlpha(/* pluginOptions */)
]
},
dist: {
src: '*.css'
}
}
});
```

[Gulp PostCSS]: https://github.com/postcss/gulp-postcss
[Grunt PostCSS]: https://github.com/nDmitry/grunt-postcss
[PostCSS]: https://github.com/postcss/postcss
[PostCSS CLI]: https://github.com/postcss/postcss-cli
[PostCSS Loader]: https://github.com/postcss/postcss-loader
[PostCSS Color Hex Alpha]: https://github.com/postcss/postcss-color-hex-alpha
[React App Rewire PostCSS]: https://github.com/csstools/react-app-rewire-postcss
[React App Rewired]: https://github.com/timarney/react-app-rewired
Loading

0 comments on commit 9f7f470

Please sign in to comment.