Socket
Book a DemoInstallSign in
Socket

penthouse-pages

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

penthouse-pages

process multiple pages with penthouse

latest
Source
npmnpm
Version
0.1.5
Version published
Maintainers
1
Created
Source

penthouse-pages

Plugin process array of pages through Penthouse which extracts critical path css to increase page speed rendering

Install

npm install penthouse-pages --save-dev

Usage

Can be used with gulp or separately

let gulp = require('gulp');
let penthouse = require('penthouse-pages');

gulp.task('critical-css', ['less'], () => {
    return penthouse({
        // penthouse-page options
        pages: [
            {
                name: 'index',
                url: '',
            },
            'about',
            'about/contacts'
        ],
        baseUrl: 'http://example.com/',
        dest: './dest/',
        // penthouse options
        css: './styles.css',
        width: 1300,
        height: 900,
        strict: true,
    });
});

This task will process example.com/, example.com/about, example.com/about/contacts pages and generate ./dest/index.css, ./dest/about.css, ./dest/about-contacts.css files

Licence

MIT © shrpne

Keywords

penthouse

FAQs

Package last updated on 19 Jan 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts