Skip to content
Open
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
134 changes: 134 additions & 0 deletions directory/perfectionist-dfd.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
{
"name": "perfectionist-dfd",
"version": "3.0.3",
"description": "Beautify and/or normalize CSS files. Fork and update of a fork and update of an archived project.",
"type": "commonjs",
"main": "dist/perfectionist-dfd.min.js",
"bin": {
"perfectionist-dfd": "bin/cmd.js"
},
"publishConfig": {
"tag": "devel"
},
"scripts": {
"precoverage": "npm run lint && del-cli out-test dist && cross-env NODE_ENV=test rollup -c",
"coverage": "cross-env NODE_ENV=test c8 ava ./__tests__/*.mjs",
"lint": "eslint src --ext .mjs --ext .js",
"production": "npm run test && del-cli dist && cross-env NODE_ENV=production rollup -c",
"preversion": "npm run production",
"prepublishOnly": "npm run production",
"report": "c8 report -o ./coverage --reporter=text >./coverage/text-report.txt && c8 report -o ./coverage --reporter=lcov",
"pretest": "npm run lint && del-cli out-test dist && cross-env NODE_ENV=test rollup -c",
"test": "cross-env NODE_ENV=test ava ./__tests__/*.mjs",
"test:ci": "npm run coverage",
"pretest:oldci": "del-cli out-test",
"test:oldci": "cross-env NODE_ENV=test ava ./__tests__/*.mjs"
},
"keywords": [
"beautify",
"css",
"format",
"normalize",
"postcss",
"postcss-plugin",
"pretty"
],
"license": "MIT",
"homepage": "https://github.com/danielfdickinson/perfectionist-dfd",
"author": {
"name": "Daniel F. Dickinson",
"email": "dfdpublic@wildtechgarden.ca",
"url": "https://www.wildtechgarden.ca/about/"
},
"repository": {
"type": "git",
"url": "git+https://github.com/danielfdickinson/perfectionist-dfd.git"
},
"dependencies": {
"defined": "^1.0.0",
"minimist": "^1.2.6",
"postcss-scss": "^4.0.3",
"postcss-value-parser": "^4.2.0",
"read-file-stdin": "^0.2.1",
"semver": "^7.5.4",
"string.prototype.repeat": "^1.0.0",
"write-file-stdout": "^0.0.2"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^22.0.1",
"@rollup/plugin-node-resolve": "^13.1.3",
"ava": "^4.1.0",
"c8": "^7.11.0",
"comment-regex": "^2.0.0",
"cpy-cli": "^4.1.0",
"cross-env": "^7.0.3",
"del-cli": "~4.0.1",
"eslint": "^8.12.0",
"eslint-plugin-ava": "^13.2.0",
"execa": "^6.1.0",
"rollup": "^2.70.1",
"rollup-plugin-terser": "^7.0.2",
"vendors": "^2.0.1"
},
"peerDependencies": {
"postcss": "^8.4.12"
},
"ava": {
"nodeArguments": [
"--trace-deprecation"
]
},
"c8": {
"all": true,
"exclude": [
"node_modules",
"__tests__/**",
"__tests-oldnode/**",
"dist/**",
"out-test"
],
"reporter": [
"lcov"
],
"src": "src"
},
"_id": "perfectionist-dfd@3.0.3",
"readme": "# perfectionist-dfd\n\nBeautify and/or normalize CSS files. Fork and update of a fork and update of an archived project. DEPRECATED.\n\n## Status\n\nDEPRECATED: The codebase is old and other alternatives exist (prettier for formatting, normalize-css for CSS normalization, and others)\n\n[![perfectionist-dfd CI](https://github.com/danielfdickinson/perfectionist-dfd/actions/workflows/ci.yml/badge.svg)](https://github.com/danielfdickinson/perfectionist-dfd/actions/workflows/ci.yml) [![Coverage](https://coveralls.io/repos/github/danielfdickinson/perfectionist-dfd/badge.svg?branch=main)](https://coveralls.io/github/danielfdickinson/perfectionist-dfd?branch=main) [![NPM version](https://img.shields.io/npm/v/perfectionist-dfd)](https://www.npmjs.com/package/perfectionist-dfd?activeTab=versions)\n\n## Example runs\n\n### Input\n\n```css\nh1 {\n color : red }\n```\n\n### Expanded output\n\n```css\nh1 {\n color: red;\n}\n```\n\n### Compact output\n\n```css\nh1 { color: red; }\n```\n\n### Compressed output\n\n```css\nh1{color:red}\n```\n\n## Supported Environments\n\n* Currently [Node.js](https://nodejs.org) 12+ are supported.\n* REVIEW: May add browser support in the future.\n\n## Install\n\nWith [npm](https://npmjs.org/package/perfectionist-dfd) do:\n\n```sh\nnpm install postcss perfectionist-dfd --save\n```\n\n## Import (ES6+) or require (CommonJS) in your source file\n\n### ES6+\n\n```javascript\nimport perfectionistDFD from 'perfectionist-dfd';\n```\n\n### CommonJS\n\n```javascript\nconst perfectionistDFD = require('perfectionist-dfd');\n```\n\n## API\n\n### perfectionistDFD.process(css, [options])\n\n#### css\n\nType: `string`\n_Required option._\n\nPass a CSS string to beautify it.\n\n#### options\n\nType: `object`\n_optional_\n\n##### cascade\n\nType: `boolean`\nDefault: `true`\n\nSet this to `false` to disable visual cascading of vendor prefixed properties.\nNote that this transform only applies to the `expanded` format.\n\n```css\n/* true */\nh1 {\n -webkit-border-radius: 12px;\n border-radius: 12px;\n}\n\n/* false */\nh1 {\n -webkit-border-radius: 12px;\n border-radius: 12px;\n}\n```\n\n##### colorCase\n\nType: `string`\nDefault: `lower`\n\nSet either `lower` or `upper` to transform hexadecimal colors to the according case.\n\n```css\n/* upper */\np { color: #C8C8C8 }\n\n/* lower */\np { color: #c8c8c8 }\n```\n\n##### colorShorthand\n\nType: `boolean`\nDefault: `true`\n\nSet this to `true` to shorten hexadecimal colors.\n\n```css\n/* true */\np { color: #fff }\n\n/* false */\np { color: #ffffff }\n```\n\n##### format\n\nType: `string`\nDefault: `expanded`\n\nPass either `expanded`, `compact` or `compressed`. Note that the `compressed`\nformat only facilitates simple whitespace compression around selectors &\ndeclarations. For more powerful compression, see [cssnano](https://cssnano.co).\n\n##### indentChar\n\nType: `string`\nDefault: ' ' (space)\n\nSpecify `\\t` here instead if you would like to use tabs for indentation.\n\n##### indentSize\n\nType: `number`\nDefault: `4`\n\nThis number will be used as a basis for all indent levels, using the `expanded`\nformat.\n\n##### trimLeadingZero\n\nType: `boolean`\nDefault: `true`\n\nSet this to `true` to trim leading zero for fractional numbers less than 1.\n\n```css\n/* true */\np { line-height: .8 }\n\n/* false */\np { line-height: 0.8 }\n```\n\n##### trimTrailingZeros\n\nType: `boolean`\nDefault: `true`\n\nSet this to `true` to trim trailing zeros in numbers.\n\n```css\n/* true */\ndiv { top: 50px }\n\n/* false */\ndiv { top: 50.000px }\n```\n\n##### maxAtRuleLength\n\nType: `boolean|number`\nDefault: `80`\n\nIf set to a positive integer, set a maximum width for at-rule parameters; if\nthey exceed this, they will be split up over multiple lines. If false, this\nbehaviour will not be performed. Note that this transform only applies to\nthe `expanded` format.\n\n##### maxSelectorLength\n\nType: `boolean|number`\nDefault: `80`\n\nIf set to a positive integer, set a maximum width for a selector string; if\nit exceeds this, it will be split up over multiple lines. If false, this\nbehaviour will not be performed. Note that this transform is excluded from the\n`compressed` format.\n\n##### maxValueLength\n\nType: `boolean|number`\nDefault: `80`\n\nIf set to a positive integer, set a maximum width for a property value; if\nit exceeds this, it will be split up over multiple lines. If false, this\nbehaviour will not be performed. Note that this transform only applies to\nthe `expanded` format.\n\n##### sourcemap\n\nType: `boolean`\nDefault: `false`\n\nGenerate a sourcemap with the transformed CSS.\n\n##### syntax\n\nType: `string`\n\nSpecify `scss` if you would like to also format SCSS-style single line comments.\nThis loads the [postcss-scss](https://github.com/postcss/postcss-scss) plugin.\n\n##### zeroLengthNoUnit\n\nType: `boolean`\nDefault: `true`\n\nSet this to `true` to trim units after zero length.\n\n```css\n/* true */\ndiv { padding: 0 }\n\n/* false */\ndiv { padding: 0px }\n```\n\n#### Example using perfectionistDFD.process\n\n```javascript\nimport perfectionistDFD from 'perfectionist-dfd'\n\nconst pftDFDOpts = {\n indentSize: 2,\n trimLeadingZero: false\n}\n\nconst outCSS = perfectionistDFD.process(css, pftDFDOpts).css\n```\n\n### `postcss([ perfectionistDFD(opts) ])`\n\nperfectionist-dfd can also be consumed as a PostCSS plugin. See the\n[PostCSS documentation](https://github.com/postcss/postcss#usage) for examples for\nyour environment.\n\n### CLI\n\nperfectionist-dfd also ships with a CLI app. To see the available options, just run:\n\n```sh\nperfectionist-dfd --help\n```\n\n### PostCSS usage\n\nSee the [PostCSS documentation](https://github.com/postcss/postcss#usage) for\nexamples for your environment.\n\n## Future\n\n1. TODO: #11 Update easy pieces of [perfectionist-dfd](https://github.com/danielfdickinson/perfectionist-dfd) to 8.x API.\n2. TODO: #12 Update main logic of [perfectionist-dfd](https://github.com/danielfdickinson/perfectionist-dfd) to 8.x API.\n3. TODO: #13 Update rest of [perfectionist-dfd](https://github.com/danielfdickinson/perfectionist-dfd) to 8.x API.\n4. TODO: #14 Improve and enhance [perfectionist-dfd](https://github.com/danielfdickinson/perfectionist-dfd) as a [PostCSS](https://github.com/postcss/postcss#readme) plugin.\n5. TODO: #15 Improve and enhance as a standalone tool.\n6. REVIEW: #24 Add support for use in browser environments.\n\n## Contributing\n\nPull requests are welcome. If you add functionality, then please add unit tests\nto cover it.\n\n## License\n\nMIT © 2015 [Ben Briggs](https://beneb.info) \\\nMIT © 2022 [Daniel F. Dickinson](https://www.wildtechgarden.ca/danielfdickinson/)\n",
"readmeFilename": "README.md",
"gitHead": "7ea23041f04f3cf3de763bdacaaab97514bb0cd9",
"bugs": {
"url": "https://github.com/danielfdickinson/perfectionist-dfd/issues"
},
"_nodeVersion": "18.18.2",
"_npmVersion": "9.8.1",
"dist": {
"integrity": "sha512-ImEojwhikE2ltOMSKrLNHx4a+tkL+4CUPenvzTyU6m5KvJpPaiSVR8Bsqutw2beV2CD0dEzKwenNoxUCAVNJbg==",
"shasum": "b89adb793c5d3790d1329643081afb90985a419f",
"tarball": "https://registry.npmjs.org/perfectionist-dfd/-/perfectionist-dfd-3.0.3.tgz",
"fileCount": 9,
"unpackedSize": 66387,
"signatures": [
{
"keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
"sig": "MEUCIQDLsJGg1MhSAKYbBOwDk3IeZM/Uoqdtc/TWArs582r+cwIgJ+czglC6aAbsp8hiJRhDGemAK6t7ursbIWhQtjWftSU="
}
]
},
"_npmUser": {
"name": "danielfdickinson",
"email": "dfdpublic@wildtechgarden.ca"
},
"directories": {},
"maintainers": [
{
"name": "danielfdickinson",
"email": "dfdpublic@wildtechgarden.ca"
}
],
"_npmOperationalInternal": {
"host": "s3://npm-registry-packages",
"tmp": "tmp/perfectionist-dfd_3.0.3_1697997190052_0.8981531168113455"
},
"_hasShrinkwrap": false,
"_time": "2023-10-22T17:53:10.315Z"
}