zoukankan      html  css  js  c++  java
  • sublime text2之js压缩-Js Minifier

    一款基于Google Closure compiler压缩Js文件插件。

    快捷键:

    Ctrl+Alt+M            当前文件内压缩Js代码(不推荐)

    Ctrl+Alt+Shift+M   压缩Js并生成压缩文件 *.min.js

    安装成功重启,如果报错,在配置里改一个参数,"compiler": "uglify_js",
    {
        // the closure compiler adds new lines every 500 characters
        // for some proxies that choke with lines longer than that... don't care?
        // set this setting to true.
        "remove_new_lines": false,
    
        // the default optimization level to use for minification. Acceptable optios are:
        // WHITESPACE_ONLY, SIMPLE_OPTIMIZATIONS, ADVANCED_OPTIMIZATIONS
        // These primiarly apply to the closure compiler. For more info on which to use, go to: https://developers.google.com/closure/compiler/docs/compilation_levels
        "optimization_level": "WHITESPACE_ONLY",
    
        // the compiler to use for minification.
        // Accepted values are: google_closure|uglify_js
        "compiler": "uglify_js",
    
        // when you create a file you want to automatically open it?
        "open_on_min": true
    }

    下载地址:https://github.com/cgutierrez/JsMinifier

    cssfirefly http://cssfirefly.cnblogs.com
  • 相关阅读:
    DB开发之oracle存储过程
    DB开发之mysql
    DB开发之oracle
    DB开发之postgresql
    Object-C开发之instancetype和id关键字
    Linux 学习笔记
    Java开发之JDK配置
    Android开发在路上:少去踩坑,多走捷径
    C/C++之Qt正则表达式
    Linux 安全配置指南
  • 原文地址:https://www.cnblogs.com/cssfirefly/p/3772030.html
Copyright © 2011-2022 走看看