Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gulp-amp-custom

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-amp-custom

Gulp plugin to optimize CSS source for AMP HTML.

  • 1.2.6
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
9
increased by200%
Maintainers
1
Weekly downloads
 
Created
Source

gulp-amp-custom

License: MIT npm version Build Status

Gulp plugin to optimize CSS source for AMP HTML.

amp-custom is the core library.

Install

npm install --save-dev gulp-amp-custom

Use

const gulp = require('gulp');
const ampCustom = require('gulp-amp-custom');

gulp.task('test', () => {
    return gulp.src('./src/test.css')
        .pipe(ampCustom({
            enableByteLimit: true
        }))
        .pipe(gulp.dest('./dist/'));
});
/* ./src/test.css */
@charset "UTF-8";
body {
  font-size: 16px;
}
@page {
  margin: 15mm;
}
@page hoge {
  size: portrait;
  margin: 15mm;
}
a {
  color: #39c !important;
  text-decoration: none;
}
@viewport {
  min-width: 640px;
  max-width: 800px;
}
@supports not (display: flex) {
  .flexbox {
    overflow: hidden;
  }
  .flexbox div {
    float: left;
  }
}
/* ./dist/test.css */
body{font-size:16px}a{color:#39c;text-decoration:none}

Options

enableByteLimit

Type: Boolean

If the CSS source exceeds 50 KB, it issues an error.(Default: false)

Plugins

License

MIT License.

Keywords

FAQs

Package last updated on 06 Oct 2019

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc