Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(lib): exporting metrics by default #197

Merged
merged 1 commit into from
Nov 1, 2018

Commits on Nov 1, 2018

  1. feat(lib): exporting metrics by default

    This allows to require metrics easier than before by doing:
    ```
    const metrics = require('pwmetrics/lib/metrics');
    
    // {
    //     TTFCP: "firstContentfulPaint",
    //     TTFMP: "firstMeaningfulPaint",
    //     TTFCPUIDLE: "firstCPUIdle",
    //     TTI: "interactive",
    //     SI: "speedIndex"
    // }
    ```
    
    Contrary to the current way:
    ```
    const metrics = require('pwmetrics/lib/metrics/metrics');
    
    // {
    //     METRICS: {
    //         TTFCP: "firstContentfulPaint",
    //         TTFMP: "firstMeaningfulPaint",
    //         TTFCPUIDLE: "firstCPUIdle",
    //         TTI: "interactive",
    //         SI: "speedIndex"
    //     }
    // }
    ```
    
    The `readme.md` and `gulpfile.js` files have been updated too.
    bcabanes committed Nov 1, 2018
    Configuration menu
    Copy the full SHA
    466f79a View commit details
    Browse the repository at this point in the history