Skip to content

Migrate postcss-lab-function #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions plugins/postcss-lab-function/.editorconfig

This file was deleted.

1 change: 0 additions & 1 deletion plugins/postcss-lab-function/.gitattributes

This file was deleted.

18 changes: 0 additions & 18 deletions plugins/postcss-lab-function/.github/workflows/test.yml

This file was deleted.

6 changes: 3 additions & 3 deletions plugins/postcss-lab-function/.gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
dist
node_modules
dist
package-lock.json
yarn.lock
*.log*
*.result.css
.*
*.result.css.map
!.editorconfig
!.gitattributes
!.gitignore
!.rollup.js
!.tape.js
!.travis.yml
!.github
26 changes: 0 additions & 26 deletions plugins/postcss-lab-function/.rollup.js

This file was deleted.

9 changes: 9 additions & 0 deletions plugins/postcss-lab-function/.tape.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,14 @@ module.exports = {
options: {
preserve: true
}
},
'variables': {
message: 'supports variables',
},
'variables:preserve-true': {
message: 'supports variables with { preserve: true } usage',
options: {
preserve: true
}
}
}
65 changes: 0 additions & 65 deletions plugins/postcss-lab-function/CONTRIBUTING.md

This file was deleted.

2 changes: 1 addition & 1 deletion plugins/postcss-lab-function/INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,6 @@ grunt.initConfig({
[PostCSS]: https://github.com/postcss/postcss
[PostCSS CLI]: https://github.com/postcss/postcss-cli
[PostCSS Loader]: https://github.com/postcss/postcss-loader
[PostCSS Lab Function]: https://github.com/csstools/postcss-lab-function
[PostCSS Lab Function]: https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-lab-function
[React App Rewire PostCSS]: https://github.com/csstools/react-app-rewire-postcss
[React App Rewired]: https://github.com/timarney/react-app-rewired
6 changes: 3 additions & 3 deletions plugins/postcss-lab-function/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[<img alt="npm version" src="https://img.shields.io/npm/v/postcss-lab-function.svg" height="20">][npm-url]
[<img alt="CSS Standard Status" src="https://cssdb.org/badge/lab-function.svg" height="20">][css-url]
[<img alt="Build Status" src="https://github.com/csstools/postcss-lab-function/workflows/test/badge.svg" height="20">][cli-url]
[<img alt="Build Status" src="https://github.com/csstools/postcss-plugins/workflows/test/badge.svg" height="20">][cli-url]
[<img alt="support chat" src="https://img.shields.io/badge/support-chat-blue.svg" height="20">][git-url]


Expand Down Expand Up @@ -75,7 +75,7 @@ postcssLabFunction({ preserve: true })
}
```

[cli-url]: https://github.com/csstools/postcss-lab-function/actions/workflows/test.yml?query=workflow/test
[cli-url]: https://github.com/csstools/postcss-plugins/actions/workflows/test.yml?query=workflow/test
[css-url]: https://cssdb.org/#lab-function
[git-url]: https://gitter.im/postcss/postcss
[npm-url]: https://www.npmjs.com/package/postcss-lab-function
Expand All @@ -85,4 +85,4 @@ postcssLabFunction({ preserve: true })
[Grunt PostCSS]: https://github.com/nDmitry/grunt-postcss
[PostCSS]: https://github.com/postcss/postcss
[PostCSS Loader]: https://github.com/postcss/postcss-loader
[PostCSS Lab Function]: https://github.com/csstools/postcss-lab-function
[PostCSS Lab Function]: https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-lab-function
77 changes: 31 additions & 46 deletions plugins/postcss-lab-function/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,62 +4,42 @@
"description": "Use lab() and lch() color functions in CSS",
"author": "Jonathan Neal <jonathantneal@hotmail.com>",
"license": "CC0-1.0",
"repository": "csstools/postcss-lab-function",
"homepage": "https://github.com/csstools/postcss-lab-function#readme",
"bugs": "https://github.com/csstools/postcss-lab-function/issues",
"main": "dist/index.cjs.js",
"module": "dist/index.esm.mjs",
"homepage": "https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-lab-function#readme",
"bugs": "https://github.com/csstools/postcss-plugins/issues",
"main": "dist/index.cjs",
"module": "dist/index.mjs",
"types": "./dist/index.d.ts",
"files": [
"CHANGELOG.md",
"INSTALL.md",
"LICENSE.md",
"README.md",
"dist"
],
"bin": {
"postcss-lab-function": "dist/cli.mjs"
},
"scripts": {
"build": "npx rollup -c .rollup.js",
"build:watch": "npx rollup -c .rollup.js --watch",
"lint": "npx eslint --cache src",
"lint:fix": "npx eslint --cache --fix",
"pretest": "npm install && npm run build",
"test": "npm run lint && npm run tape",
"tape": "npx postcss-tape",
"prepublishOnly": "npm test"
"prepublishOnly": "npm run build --if-present && npm run test --if-present",
"lint": "eslint src/**/*.ts",
"test": "node ./test/color/test.mjs && postcss-tape",
"build": "rollup -c ../../rollup/default.ts.js",
"stryker": "stryker run --logLevel error",
"generate-color-corpus": "python3 ./test/color/generate.py"
},
"engines": {
"node": ">=12"
"node": "^12 || ^14 || >=16"
},
"dependencies": {
"@csstools/convert-colors": "2.0.0",
"postcss-values-parser": "6.0.1"
},
"peerDependencies": {
"postcss": "^8.3"
"postcss-values-parser": "^6.0.1"
},
"devDependencies": {
"@babel/core": "^7.16.0",
"@babel/preset-env": "^7.16.4",
"@rollup/plugin-babel": "^5.3.0",
"eslint": "^8.2.0",
"postcss": "^8.3.11",
"postcss-tape": "^6.0.1",
"rollup": "^2.60.0"
"@csstools/base-cli": "^0.1.0",
"postcss": "^8.3.6",
"postcss-tape": "^6.0.1"
},
"babel": {
"presets": [
[
"@babel/env",
{
"targets": "maintained node versions"
}
]
]
},
"eslintConfig": {
"env": {
"es6": true,
"node": true
},
"extends": "eslint:recommended",
"parserOptions": {
"sourceType": "module"
}
"peerDependencies": {
"postcss": "^8.3"
},
"keywords": [
"postcss",
Expand All @@ -78,5 +58,10 @@
"syntax",
"space",
"comma"
]
],
"repository": {
"type": "git",
"url": "https://github.com/csstools/postcss-plugins.git",
"directory": "plugins/postcss-lab-function"
}
}
15 changes: 15 additions & 0 deletions plugins/postcss-lab-function/src/cli.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import plugin from './index';
import { cli, helpTextLogger } from '@csstools/base-cli';

cli(
plugin,
['preserve'],
helpTextLogger(
'postcss-lab-function-cli',
'PostCSS Lab function',
'Convert lab() to rgb()',
{
preserve: true,
},
),
);
Loading