Skip to content

gloriagxx/fis-postprocessor-jswrapper

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fis-postprocessor-jswrapperwithdeps

A postprocessor plugin for fis to wrap javascript with closure or amd define.

settings

$ vi path/to/project/fis-conf.js
fis.config.merge({
    settings : {
        postprocessor : {
            jswrapperwithdeps : {
                //wrap type. if omitted, it will wrap js file with '(function(){...})();'.
                type : 'amd',
                //you can use template also, ${content} means the file content
                //template : '!function(){${content}}();',
                //wrap all js file, default is false, wrap modular js file only.
                wrapAll : true
            }
        }
    }
});

或者通过 roadmap.path 局部配置

fis.config.set('roadmap.path', [
    {
        reg: '/page/**.js',
        jswrapperwithdeps: {
            //wrap type. if omitted, it will wrap js file with '(function(){...})();'.
            type : 'amd',

            //you can use template also, ${content} means the file content
            //template : '!function(){${content}}();'
        }
    }
]);

About

A postprocessor plugin for fis to wrap javascript with closure or amd define.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%