Skip to content
Permalink
Browse files
add formatting for css files within the antora-ui
  • Loading branch information
AemieJ authored and zregvart committed May 28, 2020
1 parent 235b517 commit da5e8e6fb6f8f99680d0a5c2ea3f2bf15e7d44bf
Show file tree
Hide file tree
Showing 13 changed files with 89 additions and 72 deletions.
@@ -82,23 +82,21 @@ module.exports = (src, dest, preview) => () => {
.pipe(postcss(postcssPlugins))
.pipe(rev()),
vfs.src('font/*.{ttf,woff*(2)}', opts),
vfs
.src('img/**/*.{jpg,ico,png,svg}', opts)
.pipe(
imagemin([
imagemin.gifsicle(),
imagemin.jpegtran(),
imagemin.optipng(),
imagemin.svgo({
plugins: [
{ removeViewBox: false },
{ cleanupIDs: { remove: false } },
{ removeTitle: false },
{ removeDesc: false },
],
}),
])
),
vfs.src('img/**/*.{jpg,ico,png,svg}', opts).pipe(
imagemin([
imagemin.gifsicle(),
imagemin.jpegtran(),
imagemin.optipng(),
imagemin.svgo({
plugins: [
{ removeViewBox: false },
{ cleanupIDs: { remove: false } },
{ removeTitle: false },
{ removeDesc: false },
],
}),
])
),
vfs.src('helpers/*.js', opts),
vfs.src('layouts/*.hbs', opts),
vfs.src('partials/*.hbs', opts)
@@ -16,7 +16,12 @@ const serverConfig = { host: '0.0.0.0', port: 5252, livereload }
const task = require('./gulp.d/tasks')
const glob = {
all: [srcDir, previewSrcDir],
css: `${srcDir}/css/**/*.css`,
lintcss: `${srcDir}/css/**/*.css`,
formatcss: [
`${srcDir}/css/**/*.css`,
`!${srcDir}/css/**/typeface-droid-sans-mono.css`,
`!${srcDir}/css/**/typeface-open-sans.css`,
],
js: ['gulpfile.js', 'gulp.d/**/*.js', `${srcDir}/{helpers,js}/**/*.js`],
}

@@ -29,7 +34,7 @@ const cleanTask = createTask({
const lintCssTask = createTask({
name: 'lint:css',
desc: 'Lint the CSS source files using stylelint (standard config)',
call: task.lintCss(glob.css),
call: task.lintCss(glob.lintcss),
})

const lintJsTask = createTask({
@@ -44,12 +49,24 @@ const lintTask = createTask({
call: parallel(lintCssTask, lintJsTask),
})

const formatTask = createTask({
name: 'format',
const formatCssTask = createTask({
name: 'format:css',
desc: 'Format the CSS source files using prettify (Standard Style)',
call: task.format(glob.formatcss),
})

const formatJsTask = createTask({
name: 'format:js',
desc: 'Format the JavaScript source files using prettify (JavaScript Standard Style)',
call: task.format(glob.js),
})

const formatTask = createTask({
name: 'format',
desc: 'Format the JavaScript and CSS source files using prettify',
call: parallel(formatCssTask, formatJsTask),
})

const buildTask = createTask({
name: 'build',
desc: 'Build and stage the UI assets for bundling',
@@ -58,11 +58,13 @@ th {
font-weight: var(--body-font-weight-bold);
}

em em { /* stylelint-disable-line */
em em {
/* stylelint-disable-line */
font-style: normal;
}

strong strong { /* stylelint-disable-line */
strong strong {
/* stylelint-disable-line */
font-weight: normal;
}

@@ -63,7 +63,7 @@ article.blog p {
color: var(--color-gray-60);
}

.blog .post aside p span[rel="author"] {
.blog .post aside p span[rel='author'] {
display: inline-block;
}

@@ -77,11 +77,11 @@ article.blog p {
}

.blog a.arrow.prev::after {
content: "\00A0previous";
content: '\00A0previous';
}

.blog a.arrow.next::before {
content: "next\00A0";
content: 'next\00A0';
}

.blog .post .post-content {
@@ -159,11 +159,11 @@ article.blog p {
}

.blog a.arrow.prev::after {
content: "";
content: '';
}

.blog a.arrow.next::before {
content: "";
content: '';
}

.blog .post .post-content {
@@ -29,7 +29,7 @@ a + .breadcrumbs {
}

.breadcrumbs li::after {
content: "/";
content: '/';
padding: 0 0.5rem;
}

@@ -1,5 +1,5 @@
a.category:first-child::before {
content: "\2022\00A0\00A0";
content: '\2022\00A0\00A0';
}

a.category:first-child {
@@ -84,7 +84,7 @@
.doc h4 .anchor::before,
.doc h5 .anchor::before,
.doc h6 .anchor::before {
content: "\00a7";
content: '\00a7';
}

.doc h1:hover .anchor,
@@ -419,11 +419,11 @@
}

.doc ul.checklist i.fa-check-square-o::before {
content: "\2713";
content: '\2713';
}

.doc ul.checklist i.fa-square-o::before {
content: "\274f";
content: '\274f';
}

.doc .dlist .dlist,
@@ -590,12 +590,12 @@ b.button {
}

b.button::before {
content: "[";
content: '[';
padding-right: 0.25em;
}

b.button::after {
content: "]";
content: ']';
padding-left: 0.25em;
}

@@ -633,7 +633,7 @@ kbd,
}

.menuseq i.caret::before {
content: "\203a";
content: '\203a';
font-size: 1.1em;
font-weight: var(--body-font-weight-bold);
line-height: calc(1 / 1.1);
@@ -55,7 +55,7 @@ footer .footer dl dt {
}

footer .footer dl dt::after {
content: "";
content: '';
display: block;
position: relative;
bottom: 0;
@@ -87,6 +87,6 @@ footer .footer dl dd {
padding: 0.4rem;
background-color: var(--footer-background);
color: black;
border-radius: 0.4rem 0.4rem 0 0;
border-radius: 0.4rem 0.4rem 0 0;
height: 2rem;
}
@@ -214,7 +214,7 @@ body {
.navbar-link::after {
border-width: 0 0 2px 2px;
border-style: solid;
content: " ";
content: ' ';
display: block;
height: 0.5em;
position: absolute;
@@ -283,7 +283,7 @@ body {
.navbar-link::after {
border-width: 0 0 2px 2px;
border-style: solid;
content: " ";
content: ' ';
display: block;
height: 0.5em;
pointer-events: none;
@@ -336,7 +336,7 @@ body {
.navbar-link::after {
border-width: 0 0 2px 2px;
border-style: solid;
content: " ";
content: ' ';
display: block;
height: 0.5em;
pointer-events: none;
@@ -505,7 +505,7 @@ body {
}

.navbar-tools .brand-icon {
margin: 0.25 rem;
margin: 0.25 rem;
}
}

@@ -77,7 +77,7 @@ html.is-clipped--nav {
}

.nav-panel-menu:not(.is-active)::after {
content: "";
content: '';
background: rgba(0, 0, 0, 0.5);
display: block;
position: absolute;
@@ -161,7 +161,7 @@ html.is-clipped--nav {
}

/* matches list without a title */
.nav-item[data-depth="0"] > .nav-list:first-child {
.nav-item[data-depth='0'] > .nav-list:first-child {
display: block;
margin: 0;
}
@@ -17,8 +17,8 @@
}

a.bare,
a[href^="#"],
a[href^="mailto:"] {
a[href^='#'],
a[href^='mailto:'] {
text-decoration: none;
}

@@ -1,24 +1,24 @@
@import "typeface-open-sans.css";
@import "typeface-droid-sans-mono.css";
@import "vars.css";
@import "base.css";
@import "body.css";
@import "nav.css";
@import "main.css";
@import "toggle-width.css";
@import "toolbar.css";
@import "breadcrumbs.css";
@import "page-versions.css";
@import "doc.css";
@import "static.css";
@import "header.css";
@import "footer.css";
@import "highlight.css";
@import "frontpage.css";
@import "print.css";
@import "pagination.css";
@import "blog.css";
@import "category.css";
@import "release.css";
@import "misc.css";
@import "community.css";
@import 'typeface-open-sans.css';
@import 'typeface-droid-sans-mono.css';
@import 'vars.css';
@import 'base.css';
@import 'body.css';
@import 'nav.css';
@import 'main.css';
@import 'toggle-width.css';
@import 'toolbar.css';
@import 'breadcrumbs.css';
@import 'page-versions.css';
@import 'doc.css';
@import 'static.css';
@import 'header.css';
@import 'footer.css';
@import 'highlight.css';
@import 'frontpage.css';
@import 'print.css';
@import 'pagination.css';
@import 'blog.css';
@import 'category.css';
@import 'release.css';
@import 'misc.css';
@import 'community.css';
@@ -30,9 +30,9 @@
--body-font-size--print: 0.9375em; /* 15px */
--body-line-height: 1.15;
--body-font-color: var(--color-jet-50);
--body-font-family: "Open Sans", sans-serif;
--body-font-family: 'Open Sans', sans-serif;
--body-font-weight-bold: bold;
--monospace-font-family: "Droid Sans Mono", "DejaVu Sans Mono", monospace;
--monospace-font-family: 'Droid Sans Mono', 'DejaVu Sans Mono', monospace;
--monospace-font-weight-bold: 500;
/* base */
--body-background: var(--color-white);

0 comments on commit da5e8e6

Please sign in to comment.