0
0
mirror of https://github.com/python-LimeReport/pypi.git synced 2024-12-23 16:23:00 +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");
module.exports = function(eleventyConfig) {
eleventyConfig.addTransform("htmlmin", function(content, outputPath) {
if (outputPath.endsWith(".html")) {
let minified = htmlmin.minify(content, {
useShortDocType: true,
removeComments: true,
collapseWhitespace: true,
})
module.exports = function (eleventyConfig) {
eleventyConfig.addTransform("htmlmin", function (content, outputPath) {
if (outputPath.endsWith(".html")) {
let minified = htmlmin.minify(content, {
useShortDocType: true,
removeComments: true,
collapseWhitespace: true,
});
return minified;
}
})
return {
dir: {
input: 'src',
output: 'dist',
includes: 'includes',
layouts: 'layouts',
data: 'data',
},
dataTemplateEngine: 'njk',
return minified;
}
}
});
return {
dir: {
input: "src",
output: "dist",
includes: "includes",
layouts: "layouts",
data: "data",
},
dataTemplateEngine: "njk",
};
};

View File

@ -25,7 +25,7 @@ jobs:
npm run build:prod
- uses: actions/upload-pages-artifact@v2
with:
path: 'dist'
path: "dist"
deploy:
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",
"devDependencies": {
"@11ty/eleventy": "^2.0.1",
"html-minifier": "^4.0.0"
"html-minifier": "^4.0.0",
"prettier": "3.0.3"
}
},
"node_modules/@11ty/dependency-tree": {
@ -1892,6 +1893,21 @@
"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": {
"version": "7.3.1",
"resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz",

View File

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

View File

@ -1,4 +1,4 @@
{
"githubReleaseRepo": "https://github.com/python-LimeReport/pyside",
"baseURL": "/pypi"
"githubReleaseRepo": "https://github.com/python-LimeReport/pyside",
"baseURL": "/pypi"
}

View File

@ -1,9 +1,7 @@
[
{
"tag": "py3.9-qt6.4.2",
"suffixes": [
"-6.4.2-6.4.2-cp37-abi3-manylinux_2_28_x86_64"
],
"requires_python": "<3.12,>=3.7"
}
{
"tag": "py3.9-qt6.4.2",
"suffixes": ["-6.4.2-6.4.2-cp37-abi3-manylinux_2_28_x86_64"],
"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 = {
layout: 'base.njk',
permalink: '/',
}
layout: "base.njk",
permalink: "/",
};

View File

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

View File

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