https://github.com/sammarks/neutrino-middleware-wrapper
Neutrino middleware for wrapping specific files in arbitrary code.
https://github.com/sammarks/neutrino-middleware-wrapper
neutrino neutrino-middleware wrapper
Last synced: 8 months ago
JSON representation
Neutrino middleware for wrapping specific files in arbitrary code.
- Host: GitHub
- URL: https://github.com/sammarks/neutrino-middleware-wrapper
- Owner: sammarks
- License: mit
- Created: 2018-07-21T20:30:23.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-07-21T20:41:35.000Z (almost 8 years ago)
- Last Synced: 2025-03-14T01:31:17.355Z (over 1 year ago)
- Topics: neutrino, neutrino-middleware, wrapper
- Language: JavaScript
- Size: 71.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
README
![][header-image]
[![CircleCI][circleci-image]][circleci-url]
[![NPM version][npm-version]][npm-url]
[![NPM downloads][npm-downloads]][npm-url]
![License][license]
![Issues][issues]
`neutrino-middleware-wrapper` is a Neutrino Middleware for the [Webpack Wrapper Plugin.][wrapper-link]
## Get Started
```sh
npm install --save-dev neutrino-middleware-wrapper
```
```js
module.exports = {
use: [
'neutrino-middleware-wrapper',
{
header: '(function() {',
footer: '})();'
}
]
}
```
## Features
- Uses the [Webpack Wrapper Plugin][wrapper-link] to wrap output files with custom text or code.
- Supports a `test` option to change the regex used to match output filenames.
- Passes `header` and `footer` options directly to the plugin.
[header-image]: https://raw.githubusercontent.com/sammarks/art/master/neutrino-middleware-wrapper/header.jpg
[circleci-image]: https://img.shields.io/circleci/project/github/sammarks/neutrino-middleware-wrapper.svg
[circleci-url]: https://circleci.com/gh/sammarks/neutrino-middleware-wrapper/tree/master
[npm-version]: https://img.shields.io/npm/v/neutrino-middleware-wrapper.svg
[npm-downloads]: https://img.shields.io/npm/dm/neutrino-middleware-wrapper.svg
[npm-url]: https://www.npmjs.com/package/neutrino-middleware-wrapper
[license]: https://img.shields.io/github/license/sammarks/neutrino-middleware-wrapper.svg
[issues]: https://img.shields.io/github/issues/sammarks/neutrino-middleware-wrapper.svg
[wrapper-link]: https://github.com/levp/wrapper-webpack-plugin