2.3.1 • Published 6 years ago

bolighed-critical2partial v2.3.1

Weekly downloads
3
License
ISC
Repository
github
Last release
6 years ago

critical2partial (critical-tool)

Tool for create critical html partials

Install

npm i bolighed-critical2partial -D

Example

critical.config.js

const path = require('path');

module.exports = config = {
    parallel_tabs: 4,
    browser_args: [
        // '--disable-gpu',
        // `--window-size=${ resolution.x },${ resolution.y }`,
        '--no-sandbox',
    ],
    files: [{
        critical_options: {
            base: path.join(__dirname, '../../../backend'),
            folder: 'assets',
            ignore: [
                "@font-face"
            ],
            width: 1300,
            height: 900,
            minify: true
        },
        static_file: 'http://localhost:18000/bolig/aarhus-c/8000/thorvaldsensgade/1/1/th/sundhed',
        output_file: '../../../backend/home/templates/home/critical.home.html'
    }]
}

critical_options are the options of the critical npm module. static_file could also be a url, if so it will the file will be fetched from remote.

Use from CLI

bolighed-critical2partial -c ./example.config.js 

Use programmatically

index.js

const config = require('./critical.config');
const c2p = require('bolighed-critical2partial')(config);
2.3.1

6 years ago

2.3.0

6 years ago

2.2.1

6 years ago

2.2.0

6 years ago

2.0.0

6 years ago

1.4.0

6 years ago

1.3.4

6 years ago

1.3.3

6 years ago

1.3.2

6 years ago

1.3.1

6 years ago

1.3.0

6 years ago

1.2.0

6 years ago

1.1.4

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.0

6 years ago