Skip to content

Latest commit

 

History

History
167 lines (149 loc) · 3.48 KB

built-ins-configuration.md

File metadata and controls

167 lines (149 loc) · 3.48 KB

Built-ins Configuration

  • explanation:plugins detail settings

  • type:Object

  • default:empty

  • usage:

    fis.config.set('settings.optimizer.uglify-js.output.max_line_len', 500);
    fis.config.set('settings.optimizer.clean-css.keepBreaks', true);

    or

    //fis-conf.js
    fis.config.merge({
        settings : {
            optimizer : {
                //config fis-optimizer-uglify-js detail
                'uglify-js' : {
                    output : {
                        max_line_len : 500
                    }
                },
                //config fis-optimizer-clean-css detail
                'clean-css' : {
                    keepBreaks : true
                }
            }
        }
    });

settings.postprocessor.jswrapper

  • explanation:jswrapper

  • type:Object

  • default:empty

  • usage:

    fis.config.set('settings.postprocessor.jswrapper.template', 'try{ ${content} }catch(e){e.message+="${id}";throw e;}');

    or

    fis.config.merge({
        settings : {
            postprocessor : {
                jswrapper : {
                    template : 'try{ ${content} }catch(e){ e.message += "${id}"; throw e; }'
                }
            }
        }
    });

settings.optimizer.uglify-js

  • explanation:uglifyJS

  • type:Object

  • default:empty

  • options:

    • mangle
    • output
    • compress
  • usage:

    fis.config.set('settings.optimizer.uglify-js.output.ascii_only', true);

    or

    fis.config.merge({
        settings : {
            optimizer : {
                'uglify-js' : {
                    output : {
                        ascii_only : true
                    }
                }
            }
        }
    });

settings.optimizer.clean-css

  • explanation:clean-css

  • type:Object

  • default:empty

  • options:doc

  • usage:

    fis.config.set('settings.optimizer.clean-css.keepBreaks', true);

    or

    fis.config.merge({
        settings : {
            optimizer : {
                'clean-css' : {
                    keepBreaks : true
                }
            }
        }
    });

settings.optimizer.png-compressor

  • explanation:png-compressor

  • type:Object

  • default:empty

  • usage:

    //use pngquant
    fis.config.set('settings.optimizer.png-compressor.type', 'quant');

    or

    //use pngquant
    fis.config.merge({
        settings : {
            optimizer : {
                'png-compressor' : {
                    type : 'quant'
                }
            }
        }
    });

settings.spriter.csssprites

  • explanation:csssprites

  • type:Object

  • default:

    {
        margin       : 3,
        layout       : 'linear',
        width_limit  : 10240,
        height_limit : 10240
    }
  • options:

    • margin
    • layout:linear,matrix
  • usage:

    fis.config.set('settings.spriter.csssprites.layout', 'matrix');

    or

    fis.config.merge({
        settings : {
            spriter : {
                csssprites : {
                    layout : 'matrix'
                }
            }
        }
    });