Skip to content

Latest commit

 

History

History
142 lines (117 loc) · 3.06 KB

project-configuration.md

File metadata and controls

142 lines (117 loc) · 3.06 KB

##Project configuration

Create a fis-conf.js file in the project directory, we can do all kinds of fis build system customized configurations through:

fis.config.set(key, value);

or

fis.config.merge({...});

project.charset

  • explanation:config encoding。

  • type:string

  • default:'utf8'

  • usage:

    fis.config.set('project.charset', 'gbk');

    or

    fis.config.merge({
        project : { charset : 'gbk' }
    });

project.md5Length

  • explanation:the length of md5。

  • type:number

  • default:7

  • usage:

    fis.config.set('project.md5Length', 8);

    or

    fis.config.merge({
        project : { md5Length : 8 }
    });

project.md5Connector

  • explanation:Set hyphen between md5 and file name

  • type:string

  • default:'_'

  • usage:

    fis.config.set('project.md5Connector ', '.');

    or

    fis.config.merge({
        project : { md5Connector : '.' }
    });

project.include

  • explanation:set the file include filter of project source

  • type:string | RegExp

  • default:empty

  • usage:

    fis.config.set('project.include', 'src/**');

    or

    fis.config.merge({
        project : { include : 'src/**' }
    });

project.exclude

  • explanation:Set the file exclude filter of project source

  • type:string | RegExp

  • default:empty

  • usage:

    fis.config.set('project.exclude', /^\/_build\//i);

    or

    fis.config.merge({
        project : { exclude : /^\/_build\//i }
    });

project.fileType.text

  • explanation:Append text file suffix

  • type:Array | string

  • default:empty

  • notice:the internal list of suffixes: [ 'css', 'tpl', 'js', 'php', 'txt', 'json', 'xml', 'htm', 'text', 'xhtml', 'html', 'md', 'conf', 'po', 'config', 'tmpl', 'coffee', 'less', 'sass', 'jsp', 'scss', 'manifest', 'bak', 'asp', 'tmp' ], additional user configuration will not override the internal list of suffixes.

  • usage:

    fis.config.set('project.fileType.text', 'tpl, js, css');

    or

    fis.config.merge({
        project : {
            fileType : {
                text : 'tpl, js, css'
            }
        }
    });

project.fileType.image

  • explanation:Append image file suffix

  • type:Array | string

  • default:empty

  • notice:the internal list of suffixes: [ 'svg', 'tif', 'tiff', 'wbmp', 'png', 'bmp', 'fax', 'gif', 'ico', 'jfif', 'jpe', 'jpeg', 'jpg', 'woff', 'cur' ], additional user configuration will not override the internal list of suffixes.

  • usage:

    fis.config.set('project.fileType.image', 'swf, cur, ico');

    or

    fis.config.merge({
        project : {
            fileType : {
                image : 'swf, cur, ico'
            }
        }
    });