Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PostCompilePlugin to webpack #27

Open
thaiat opened this issue Feb 8, 2016 · 1 comment
Open

Add PostCompilePlugin to webpack #27

thaiat opened this issue Feb 8, 2016 · 1 comment

Comments

@thaiat
Copy link
Contributor

thaiat commented Feb 8, 2016

This plugin should be available on npm

'use strict';
var fs = require('fs');

function PostCompilePlugin(options) {
    this.options = options || {};
}

PostCompilePlugin.prototype.apply = function(compiler) {
    var self = this;
    compiler.plugin('done', function() {

        if (!self.options.filename) {
            return;
        }
        setTimeout(function() {
            fs.appendFile(self.options.filename, '\n/***/', function() {});
        }, 500);

    });
};
module.exports = PostCompilePlugin;
@thaiat thaiat changed the title Add PostCompilePLugin to webpack Add PostCompilePlugin to webpack Feb 8, 2016
@thaiat
Copy link
Contributor Author

thaiat commented Feb 9, 2016

for the moment the plugin is local to the project
If it moves to npm it should include an option to configure the value of the timeout

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant