Socket
Socket
Sign inDemoInstall

@ampproject/toolbox-core

Package Overview
Dependencies
3
Maintainers
7
Versions
38
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @ampproject/toolbox-core

Commonly used functionality for amp-toolbox


Version published
Weekly downloads
50K
decreased by-19.44%
Maintainers
7
Install size
293 kB
Created
Weekly downloads
 

Changelog

Source

2.0.0

Migration notes:

  • The SeparateKeyframe transformer's compress option has been renamed to minify. The same option will also be used by the MinifyHtml transformer. The default value continues to be true.

  • The API for implementing a custom transformer has changed. We no longer monkey patch the node class, but instead rely on helper methods defined in NodeUtils:

    const {firstChildByTag, appendChild, createElement} =
    require('@ampproject/toolbox-optimizer').NodeUtils; class CustomTransformer { constructor(config)
    { this.log_ = config.log.tag('CUSTOM'); } transform(tree, params) { this.log_.info('Running custom
    transformation for ', params.filePath); const html = firstChildByTag(tree, 'html'); if (!html)
    return; const head = firstChildByTag(html, 'head'); if (!head) return; const desc =
    createElement('meta', { name: 'description', content: 'this is just a demo', }); appendChild(head,
    desc); } }
    
:rocket: Enhancement
:bug: Bug Fix
:house: Internal
  • cli, core, cors, optimizer, update-cache
  • linter, optimizer-express
  • cache-list, cache-url, cli, core, cors, lighthouse-plugin-amp, linter, optimizer-express, optimizer, runtime-version, script-csp, update-cache, validator-rules
    • #568 Adds "repository" and "homepage" to every package.json (@fstanis)
Committers: 2

Readme

Source

AMP-Toolbox Core

npm version

Commonl functionality used by amp-toolbox. This module is not meant to be used on it's own.

Keywords

FAQs

Last updated on 13 Feb 2020

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc