diff --git a/.babelrc b/.babelrc
new file mode 100644
index 00000000..0b054131
--- /dev/null
+++ b/.babelrc
@@ -0,0 +1,35 @@
+{
+ "presets": [
+ [
+ "env",
+ {
+ "useBuiltIns": true,
+ "targets": {
+ "node": "6.11.5"
+ },
+ "exclude": [
+ "transform-async-to-generator",
+ "transform-regenerator"
+ ]
+ }
+ ]
+ ],
+ "plugins": [
+ [
+ "transform-object-rest-spread",
+ {
+ "useBuiltIns": true
+ }
+ ]
+ ],
+ "env": {
+ "test": {
+ "presets": [
+ "env"
+ ],
+ "plugins": [
+ "transform-object-rest-spread"
+ ]
+ }
+ }
+}
diff --git a/.editorconfig b/.editorconfig
index 4d3466a5..79664df2 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -8,7 +8,7 @@ root = true
charset = utf-8
end_of_line = lf
insert_final_newline = true
-indent_style = tab
+indent_style = space
indent_size = 4
# Matches the exact files either package.json or .travis.yml
diff --git a/.eslintignore b/.eslintignore
new file mode 100644
index 00000000..4a868dc8
--- /dev/null
+++ b/.eslintignore
@@ -0,0 +1 @@
+test/js/**/*.js
diff --git a/.eslintrc b/.eslintrc
deleted file mode 100644
index 49060abb..00000000
--- a/.eslintrc
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "env": {
- "node": true,
- "es6": true,
- },
- "rules": {
- "strict": 0,
- "curly": 0,
- "quotes": 0,
- "no-shadow": 0,
- "no-underscore-dangle": 0
- }
-}
diff --git a/.eslintrc.js b/.eslintrc.js
new file mode 100644
index 00000000..563e6656
--- /dev/null
+++ b/.eslintrc.js
@@ -0,0 +1,21 @@
+module.exports = {
+ parser: 'babel-eslint',
+ parserOptions: {
+ ecmaFeatures: {
+ generators: true,
+ experimentalObjectRestSpread: true
+ },
+ sourceType: 'module',
+ allowImportExportEverywhere: false
+ },
+ extends: ['airbnb'],
+ env: {
+ 'browser': true,
+ },
+ rules: {
+ 'no-param-reassign': 0,
+ 'func-names': 0,
+ 'no-underscore-dangle': 0,
+ 'no-restricted-syntax': 0,
+ }
+};
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
new file mode 100644
index 00000000..c3808b1c
--- /dev/null
+++ b/.github/CODEOWNERS
@@ -0,0 +1,2 @@
+# extract-css-chunks-webpack-plugin maintainers
+* @faceyspacey @zackljackson
diff --git a/.gitignore b/.gitignore
index e8c5dd92..345c30b8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,11 +1,12 @@
/node_modules
-/example/assets
-
/test/js
/coverage
+/dist
-/.idea
+.idea
+.eslintcache
.DS_Store
-npm-debug.log
+*.log
+.eslintcache
diff --git a/ExtractedModule.js b/ExtractedModule.js
deleted file mode 100644
index 38207a8d..00000000
--- a/ExtractedModule.js
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- MIT License http://www.opensource.org/licenses/mit-license.php
- Author Tobias Koppers @sokra
-*/
-var SourceMapSource = require("webpack-sources").SourceMapSource;
-var RawSource = require("webpack-sources").RawSource;
-
-function ExtractedModule(identifier, originalModule, source, sourceMap, addtitionalInformation, prevModules) {
- this._identifier = identifier;
- this._originalModule = originalModule;
- this._source = source;
- this._sourceMap = sourceMap;
- this._prevModules = prevModules;
- this.addtitionalInformation = addtitionalInformation;
- this.chunks = [];
-}
-module.exports = ExtractedModule;
-
-ExtractedModule.prototype.getOrder = function() {
- // http://stackoverflow.com/a/14676665/1458162
- return /^@import url/.test(this._source) ? 0 : 1;
-};
-
-ExtractedModule.prototype.addChunk = function(chunk) {
- var idx = this.chunks.indexOf(chunk);
- if(idx < 0)
- this.chunks.push(chunk);
-};
-
-ExtractedModule.prototype.removeChunk = function(chunk) {
- var idx = this.chunks.indexOf(chunk);
- if(idx >= 0) {
- this.chunks.splice(idx, 1);
- chunk.removeModule(this);
- return true;
- }
- return false;
-};
-
-ExtractedModule.prototype.rewriteChunkInReasons = function(oldChunk, newChunks) { };
-
-ExtractedModule.prototype.identifier = function() {
- return this._identifier;
-};
-
-ExtractedModule.prototype.source = function() {
- if(this._sourceMap)
- return new SourceMapSource(this._source, null, this._sourceMap);
- else
- return new RawSource(this._source);
-};
-
-ExtractedModule.prototype.getOriginalModule = function() {
- return this._originalModule;
-};
-
-ExtractedModule.prototype.getPrevModules = function() {
- return this._prevModules;
-};
-
-ExtractedModule.prototype.addPrevModules = function(prevModules) {
- prevModules.forEach(function(m) {
- if(this._prevModules.indexOf(m) < 0)
- this._prevModules.push(m);
- }, this);
-};
-
-ExtractedModule.prototype.setOriginalModule = function(originalModule) {
- this._originalModule = originalModule;
-};
diff --git a/OrderUndefinedError.js b/OrderUndefinedError.js
deleted file mode 100644
index cedec9a3..00000000
--- a/OrderUndefinedError.js
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
- MIT License http://www.opensource.org/licenses/mit-license.php
- Author Tobias Koppers @sokra
-*/
-function OrderUndefinedError(module) {
- Error.call(this);
- Error.captureStackTrace(this, OrderUndefinedError);
- this.name = "OrderUndefinedError";
- this.message = "Order in extracted chunk undefined";
- this.module = module;
-}
-module.exports = OrderUndefinedError;
-
-OrderUndefinedError.prototype = Object.create(Error.prototype);
diff --git a/README.md b/README.md
index 86839308..f5975175 100644
--- a/README.md
+++ b/README.md
@@ -17,15 +17,98 @@
+
+
+
+
+
+
+
+