0
0
mirror of https://github.com/python-LimeReport/pypi.git synced 2025-03-21 01:33:44 +03:00

chore: add prettier

This commit is contained in:
Maxim Slipenko 2023-09-10 10:30:50 +00:00 committed by GitHub
parent 6e03685741
commit df9fe4d5a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 73 additions and 60 deletions

View File

@ -1,26 +1,26 @@
const htmlmin = require("html-minifier"); const htmlmin = require("html-minifier");
module.exports = function(eleventyConfig) { module.exports = function (eleventyConfig) {
eleventyConfig.addTransform("htmlmin", function(content, outputPath) { eleventyConfig.addTransform("htmlmin", function (content, outputPath) {
if (outputPath.endsWith(".html")) { if (outputPath.endsWith(".html")) {
let minified = htmlmin.minify(content, { let minified = htmlmin.minify(content, {
useShortDocType: true, useShortDocType: true,
removeComments: true, removeComments: true,
collapseWhitespace: true, collapseWhitespace: true,
}) });
return minified; return minified;
} }
}) });
return { return {
dir: { dir: {
input: 'src', input: "src",
output: 'dist', output: "dist",
includes: 'includes', includes: "includes",
layouts: 'layouts', layouts: "layouts",
data: 'data', data: "data",
}, },
dataTemplateEngine: 'njk', dataTemplateEngine: "njk",
} };
} };

View File

@ -25,7 +25,7 @@ jobs:
npm run build:prod npm run build:prod
- uses: actions/upload-pages-artifact@v2 - uses: actions/upload-pages-artifact@v2
with: with:
path: 'dist' path: "dist"
deploy: deploy:
runs-on: ubuntu-latest runs-on: ubuntu-latest

1
.prettierignore Normal file
View File

@ -0,0 +1 @@
dist

1
.prettierrc.json Normal file
View File

@ -0,0 +1 @@
{}

18
package-lock.json generated
View File

@ -10,7 +10,8 @@
"license": "ISC", "license": "ISC",
"devDependencies": { "devDependencies": {
"@11ty/eleventy": "^2.0.1", "@11ty/eleventy": "^2.0.1",
"html-minifier": "^4.0.0" "html-minifier": "^4.0.0",
"prettier": "3.0.3"
} }
}, },
"node_modules/@11ty/dependency-tree": { "node_modules/@11ty/dependency-tree": {
@ -1892,6 +1893,21 @@
"node": ">= 4" "node": ">= 4"
} }
}, },
"node_modules/prettier": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz",
"integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==",
"dev": true,
"bin": {
"prettier": "bin/prettier.cjs"
},
"engines": {
"node": ">=14"
},
"funding": {
"url": "https://github.com/prettier/prettier?sponsor=1"
}
},
"node_modules/promise": { "node_modules/promise": {
"version": "7.3.1", "version": "7.3.1",
"resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz",

View File

@ -12,6 +12,7 @@
"license": "ISC", "license": "ISC",
"devDependencies": { "devDependencies": {
"@11ty/eleventy": "^2.0.1", "@11ty/eleventy": "^2.0.1",
"html-minifier": "^4.0.0" "html-minifier": "^4.0.0",
"prettier": "3.0.3"
} }
} }

View File

@ -1,9 +1,7 @@
[ [
{ {
"tag": "py3.9-qt6.4.2", "tag": "py3.9-qt6.4.2",
"suffixes": [ "suffixes": ["-6.4.2-6.4.2-cp37-abi3-manylinux_2_28_x86_64"],
"-6.4.2-6.4.2-cp37-abi3-manylinux_2_28_x86_64"
],
"requires_python": "<3.12,>=3.7" "requires_python": "<3.12,>=3.7"
} }
] ]

View File

@ -1,5 +1 @@
[ ["pyside6", "shiboken6", "shiboken6-generator"]
"pyside6",
"shiboken6",
"shiboken6-generator"
]

View File

@ -1,4 +1,4 @@
module.exports = { module.exports = {
layout: 'base.njk', layout: "base.njk",
permalink: '/', permalink: "/",
} };

View File

@ -1,13 +1,13 @@
module.exports = { module.exports = {
layout: 'base.njk', layout: "base.njk",
pagination: { pagination: {
data: 'packages', data: "packages",
size: 1, size: 1,
alias: 'package' alias: "package",
}, },
permalink: function (data) { permalink: function (data) {
return data.package + "/" return data.package + "/";
}, },
} };

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
pageUrl: function (data) { pageUrl: function (data) {
return data.page.url return data.page.url;
}, },
} };