https://github.com/enb/enb-tech-wrap
https://github.com/enb/enb-tech-wrap
bem enb enb-tech wrap
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/enb/enb-tech-wrap
- Owner: enb
- License: other
- Created: 2017-02-06T14:24:14.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-02-06T14:38:06.000Z (over 9 years ago)
- Last Synced: 2024-04-13T16:14:10.625Z (about 2 years ago)
- Topics: bem, enb, enb-tech, wrap
- Language: JavaScript
- Size: 13.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# 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
```js
[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](LICENSE.txt).