New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

rollup-plugin-closure-compile

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rollup-plugin-closure-compile

Rollup plugin that uses the up-to-date JS version of Closure Compiler to minify your code. Works with sourcemaps

latest
Source
npmnpm
Version
1.1.0
Version published
Weekly downloads
10
-9.09%
Maintainers
1
Weekly downloads
 
Created
Source

rollup-plugin-closure-compile

Travis CI

Rollup plugin that lets you compile your code with Google Closure Compiler

Why this plugin?

  • Google Closure Compiler is the best JS minifier
  • It uses the up-to-date google-closure-compiler package on npm, rather than the outdated google-closure-compiler-js
  • It doesn't require you to have Java installed
  • Simple setup and use

Caveats

Yes, this plugin will run slower than Uglify or Terser, but it will typically produce a smaller code size. You decide if it's worth it.

Install

With Yarn:

yarn add rollup-plugin-closure-compile

With npm:

npm install rollup-plugin-closure-compile

Usage

import closureCompile from 'closure-compiler-rollup'

// In Rollup config:

plugins: [
    closureCompile({
        level: 'SIMPLE' // Or 'ADVANCED' or 'WHITESPACE_ONLY'
    })
]

See the google-closure-compiler repository for information about flags

Running the tests

yarn test

or

npm test

The tests check:

  • That the plugin compiles
  • That some things work that are supposed to
  • That some things don't work that aren't supposed to
  • That sourcemaps are generated correctly
  • That the code is styled correctly, with standard

Code Formatting

To format the code:

yarn format

To check formatting:

yarn test

Built With

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

TL;DR:

  • Code is styled with standard
  • Tests should pass

Versioning

We use SemVer for versioning.

Authors

See also the list of contributors who participated in this project.

Release History

  • 1.0.0
    • Initial release

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

Inspiration taken from, and based on:

Keywords

closure-compiler

FAQs

Package last updated on 09 Aug 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