https://github.com/metnew/webpack-get-code-on-done
Returns compiled code from Webpack compiler.
https://github.com/metnew/webpack-get-code-on-done
Last synced: 6 months ago
JSON representation
Returns compiled code from Webpack compiler.
- Host: GitHub
- URL: https://github.com/metnew/webpack-get-code-on-done
- Owner: Metnew
- License: apache-2.0
- Archived: true
- Created: 2017-08-22T16:13:10.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-05-05T16:34:36.000Z (about 7 years ago)
- Last Synced: 2025-01-09T06:53:59.357Z (6 months ago)
- Language: JavaScript
- Homepage:
- Size: 67.4 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Webpack-Get-Code-On-Done
[](https://greenkeeper.io/) [](http://commitizen.github.io/cz-cli/) [](https://github.com/semantic-release/semantic-release) [](https://travis-ci.org/Metnew/webpack-get-code-on-done)
## TL;DR
Allows you to get compiled code after compiler's `done` event. Heavily inspired by [webpack-hot-server-middleware](https://github.com/60frames/webpack-hot-server-middleware).
## Why?
It's very useful when you're working with _universal apps_. Check **[Tiny-Universal-Skeleton](https://github.com/Metnew/tiny-universal-skeleton)** for an example with step-by-step guide.
### Where?
Webpack-Get-Code-On-Done is used inside [suicrux](https://github.com/Metnew/suicrux).### API
#### `webpackGetCodeOnDone(serverCompiler, done):`
Default export - function that accepts 2 arguments:
1. `serverCompiler` - webpack Compiler that compiles your server.
2. `done` - function that will be executed after `compile.on('done')` event. E.g. Every time your code will be changed.### License
Apache 2.0 License
### Author
Vladimir Metnew [[email protected]](mailto:[email protected])