Skip to content

Instantly share code, notes, and snippets.

View uetkaje's full-sized avatar

Emre Terzi uetkaje

View GitHub Profile
@uetkaje
uetkaje / NormalModuleMixin.js
Created December 6, 2014 20:29
webpack-core/NormalModuleMixin.js
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
var RawSource = require("./RawSource");
var OriginalSource = require("./OriginalSource");
var path = require("path"); // TODO refactor
var ModuleBuildError = require("./ModuleBuildError");
var ModuleError = require("./ModuleError");
@uetkaje
uetkaje / webpack-plugin-test2.js
Last active August 29, 2015 14:10
Webpack plugin test 2
var _ = require("lodash");
function testPlugin(options) {
var defaults = {
fileExtensionRegEx: '\.(js|html)$'
};
this.options = _.merge({}, defaults, options || {});
}
testPlugin.prototype.apply = function (compiler) {
@uetkaje
uetkaje / webpack-plugin-test.js
Last active August 29, 2015 14:10
Webpack plugin test
var _ = require("lodash");
var fs = require("fs");
var OriginalSource = require('webpack-core/lib/OriginalSource');
function testPlugin(options) {
var defaults = {
fileExtensionRegEx: '\.(js|html)$'
};
this.options = _.merge({}, defaults, options || {});
}