mirror of
https://github.com/cotes2020/jekyll-theme-chirpy.git
synced 2025-06-13 19:22:13 +00:00
Compare commits
2 Commits
4782161c4c
...
5269d3ffb0
Author | SHA1 | Date | |
---|---|---|---|
![]() |
5269d3ffb0 | ||
![]() |
c69914effc |
25
.github/workflows/style-lint.yml
vendored
25
.github/workflows/style-lint.yml
vendored
@ -1,25 +0,0 @@
|
|||||||
name: Style Lint
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
- "hotfix/*"
|
|
||||||
paths: ["_sass/**/*.scss"]
|
|
||||||
pull_request:
|
|
||||||
paths: ["_sass/**/*.scss"]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
stylelint:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Setup Node
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: lts/*
|
|
||||||
- run: npm i
|
|
||||||
- run: npm test
|
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -23,5 +23,5 @@ package-lock.json
|
|||||||
!.vscode/tasks.json
|
!.vscode/tasks.json
|
||||||
|
|
||||||
# Misc
|
# Misc
|
||||||
_sass/vendor
|
_sass/vendors
|
||||||
assets/js/dist
|
assets/js/dist
|
||||||
|
31
.stylelintrc.json
Normal file
31
.stylelintrc.json
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
{
|
||||||
|
"ignoreFiles": ["_sass/vendors/**"],
|
||||||
|
"extends": "stylelint-config-standard-scss",
|
||||||
|
"rules": {
|
||||||
|
"no-descending-specificity": null,
|
||||||
|
"shorthand-property-no-redundant-values": null,
|
||||||
|
"at-rule-no-vendor-prefix": null,
|
||||||
|
"property-no-vendor-prefix": null,
|
||||||
|
"selector-no-vendor-prefix": null,
|
||||||
|
"value-no-vendor-prefix": null,
|
||||||
|
"color-function-notation": "legacy",
|
||||||
|
"alpha-value-notation": "number",
|
||||||
|
"selector-not-notation": "simple",
|
||||||
|
"color-hex-length": "long",
|
||||||
|
"declaration-block-single-line-max-declarations": 3,
|
||||||
|
"scss/operator-no-newline-after": null,
|
||||||
|
"rule-empty-line-before": [
|
||||||
|
"always",
|
||||||
|
{
|
||||||
|
"ignore": ["after-comment", "first-nested"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"value-keyword-case": [
|
||||||
|
"lower",
|
||||||
|
{
|
||||||
|
"ignoreProperties": ["/^\\$/"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"media-feature-range-notation": "prefix"
|
||||||
|
}
|
||||||
|
}
|
@ -1,2 +1,2 @@
|
|||||||
@use 'vendor/bootstrap';
|
@use 'vendors/bootstrap';
|
||||||
@use 'main';
|
@use 'main';
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
|
|
||||||
@include bp.md {
|
@include bp.md {
|
||||||
padding: 1.75rem 1.75rem 1.25rem 1.75rem;
|
padding: 1.75rem 1.75rem 1.25rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-title {
|
.card-title {
|
||||||
|
38
package.json
38
package.json
@ -68,44 +68,6 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"stylelint": {
|
|
||||||
"ignoreFiles": [
|
|
||||||
"_sass/vendor/**"
|
|
||||||
],
|
|
||||||
"extends": "stylelint-config-standard-scss",
|
|
||||||
"rules": {
|
|
||||||
"no-descending-specificity": null,
|
|
||||||
"shorthand-property-no-redundant-values": null,
|
|
||||||
"at-rule-no-vendor-prefix": null,
|
|
||||||
"property-no-vendor-prefix": null,
|
|
||||||
"selector-no-vendor-prefix": null,
|
|
||||||
"value-no-vendor-prefix": null,
|
|
||||||
"color-function-notation": "legacy",
|
|
||||||
"alpha-value-notation": "number",
|
|
||||||
"selector-not-notation": "simple",
|
|
||||||
"color-hex-length": "long",
|
|
||||||
"declaration-block-single-line-max-declarations": 3,
|
|
||||||
"scss/operator-no-newline-after": null,
|
|
||||||
"rule-empty-line-before": [
|
|
||||||
"always",
|
|
||||||
{
|
|
||||||
"ignore": [
|
|
||||||
"after-comment",
|
|
||||||
"first-nested"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"value-keyword-case": [
|
|
||||||
"lower",
|
|
||||||
{
|
|
||||||
"ignoreProperties": [
|
|
||||||
"/^\\$/"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"media-feature-range-notation": "prefix"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"release": {
|
"release": {
|
||||||
"branches": [
|
"branches": [
|
||||||
"production"
|
"production"
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
const fs = require('fs').promises;
|
const fs = require('fs').promises;
|
||||||
const { PurgeCSS } = require('purgecss');
|
const { PurgeCSS } = require('purgecss');
|
||||||
const DIST_PATH = '_sass/vendor';
|
const DIST_PATH = '_sass/vendors';
|
||||||
|
const output = `${DIST_PATH}/_bootstrap.scss`;
|
||||||
|
|
||||||
const config = {
|
const config = {
|
||||||
content: ['_includes/**/*.html', '_layouts/**/*.html', '_javascript/**/*.js'],
|
content: ['_includes/**/*.html', '_layouts/**/*.html', '_javascript/**/*.js'],
|
||||||
css: ['node_modules/bootstrap/dist/css/bootstrap.min.css'],
|
css: ['node_modules/bootstrap/dist/css/bootstrap.min.css'],
|
||||||
keyframes: true,
|
keyframes: true,
|
||||||
variables: true,
|
variables: true,
|
||||||
output: `${DIST_PATH}/bootstrap.css`,
|
|
||||||
// The `safelist` should be changed appropriately for future development
|
// The `safelist` should be changed appropriately for future development
|
||||||
safelist: {
|
safelist: {
|
||||||
standard: [/^collaps/, /^w-/, 'shadow', 'border', 'kbd'],
|
standard: [/^collaps/, /^w-/, 'shadow', 'border', 'kbd'],
|
||||||
@ -20,7 +20,7 @@ function main() {
|
|||||||
.then(() => fs.mkdir(DIST_PATH))
|
.then(() => fs.mkdir(DIST_PATH))
|
||||||
.then(() => new PurgeCSS().purge(config))
|
.then(() => new PurgeCSS().purge(config))
|
||||||
.then((result) => {
|
.then((result) => {
|
||||||
return fs.writeFile(`${DIST_PATH}/bootstrap.scss`, result[0].css);
|
return fs.writeFile(output, result[0].css);
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
console.error('Error during PurgeCSS process:', err);
|
console.error('Error during PurgeCSS process:', err);
|
||||||
|
@ -92,7 +92,7 @@ init_files() {
|
|||||||
npm i && npm run build
|
npm i && npm run build
|
||||||
|
|
||||||
# track the CSS/JS output
|
# track the CSS/JS output
|
||||||
_sedi "/^_sass\/vendor/d" .gitignore
|
_sedi "/^_sass\/vendors/d" .gitignore
|
||||||
_sedi "/^assets\/js\/dist/d" .gitignore
|
_sedi "/^assets\/js\/dist/d" .gitignore
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ NODE_SPEC="package.json"
|
|||||||
CHANGELOG="docs/CHANGELOG.md"
|
CHANGELOG="docs/CHANGELOG.md"
|
||||||
CONFIG="_config.yml"
|
CONFIG="_config.yml"
|
||||||
|
|
||||||
CSS_DIST="_sass/vendor"
|
CSS_DIST="_sass/vendors"
|
||||||
JS_DIST="assets/js/dist"
|
JS_DIST="assets/js/dist"
|
||||||
|
|
||||||
FILES=(
|
FILES=(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user