Skip to content

Commit

Permalink
chore: separate boostlook.css processing to preserve critical styles
Browse files Browse the repository at this point in the history
  • Loading branch information
julioest committed Oct 11, 2024
1 parent 7ab800c commit f2c725c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion antora-ui/gulp.d/tasks/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,13 @@ function getAllTasks (opts, sourcemaps, postcssPlugins, preview, src) {
// Task for processing CSS files
// NOTE use the next line to bundle a JavaScript library that cannot be browserified, like jQuery
//vfs.src(require.resolve('<package-name-or-require-path>'), opts).pipe(concat('js/vendor/<library-name>.js')),
vfs.src('css/boostlook.css', opts)
.pipe(postcss([autoprefixer, preview ? () => {} : cssnano({
preset: 'default',
}),
])),
vfs
.src(['css/boostlook.css', 'css/site.css', 'css/vendor/*.css'], { ...opts, sourcemaps })
.src(['css/site.css', 'css/vendor/*.css'], { ...opts, sourcemaps })
.pipe(postcss((file) => ({ plugins: postcssPlugins, options: { file } }))),
// Task for getting font files
vfs.src('font/*.{ttf,woff*(2)}', opts),
Expand Down

0 comments on commit f2c725c

Please sign in to comment.