Skip to content

bem-kit/enb-tech-wrap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

13 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

enb-tech-wrap

ENB plugin to wrap a file into arbitrary content.

This enb tech gathers source files by filesTarget mask, then wraps them with before/after/wrap. Finally, it concats them into one target file.

Installation

npm i -S enb-tech-wrap

Usage

[require('enb-tech-wrap/techs/wrap'), {
    filesTarget: '?.js', // source
    target: '?.wrapped.js',
    before: '/* before */',
    after: '/* after */',
    beforeAll: '/* before all */',
    afterAll: '/* after all */',
    wrap: function(file, content) {
        return [
            '// The code was taken from ' + file,
            content
        ].join('\n');
    }
}]

License

ยฉ 2017 YANDEX LLC. The Source Code is subject to the terms of the Mozilla Public License 2.0.

About

ENB plugin to wrap a file into arbitrary content. ๐Ÿšจ๐Ÿšœ Moved to https://github.com/enb/enb-tech-wrap

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published