Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

Atom atom-minify (CSS / JS compression artifacts)


May 24, 2021 Atom


Table of contents


atom-minify (CSS/ JS compression artifacts)

Brief introduction

For small partners who come into contact with the front end, there is definitely a way to optimize. a tom's rich expansion interfaces make atom even more powerful. F oreign bulls integrate several common compressions into a small plug-in. So there's atom-minify, a quick compression artifact.

The first page of the plug-in project

Author: armin-pfaeffle

Plug-in address: https://atom.io/packages/atom-minify

How to install it

  1. apm install atom-minify
  2. Go to the Settings Center to search for atom-minify

The settings are very rich, and some graphical settings have been used normally by some small partners.

Atom atom-minify (CSS / JS compression artifacts)

The default shortcut

  • ctrl-shift-m : Perform compression to generate a min suffix (do not want to use min for compression to enter the settings modification)
  • ctrl-alt-shift-m/ctrl-cmd-shift-m: Save automatically generates compression software globally
  • ctrl-alt-shift-h /ctrl-cmd-shift-h': Turn on or off the post-execution pop-up message panel function globally
  • There are also some less-used shortcuts to look specifically at the documentation

Supported compression specifications

  • CSS supports four compression standards
    • YUI Compressor, clean-css, CSSO, Sqwish.
  • JS supports three compression standards
    • YUI Compressor, Google Closure Compiler, UglifyJS2.

Tips

Many of atom's feature plug-ins are packaged from npm, so you have to rely on a variety of modules, so when the execution plug-in encounters all kinds of errors, look at the error, what to make up for.

If you want to play automated construction, you can learn about gulp, through a wealth of plug-ins, to achieve more complex functions, such as dynamic listening, compression and so on.

Attached is a Github project: https://github.com/crperlin/StartFrontendProject

Personally written gulp execution queues, covering some commonly used features that interest you can refine together fork.