##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({...});
-
explanation:config encoding。
-
type:
string
-
default:'utf8'
-
usage:
fis.config.set('project.charset', 'gbk');
or
fis.config.merge({ project : { charset : 'gbk' } });
-
explanation:the length of md5。
-
type:
number
-
default:7
-
usage:
fis.config.set('project.md5Length', 8);
or
fis.config.merge({ project : { md5Length : 8 } });
-
explanation:Set hyphen between md5 and file name
-
type:
string
-
default:'_'
-
usage:
fis.config.set('project.md5Connector ', '.');
or
fis.config.merge({ project : { md5Connector : '.' } });
-
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/**' } });
-
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 } });
-
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' } } });
-
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' } } });