From e70e40fd2fc610a437deec628e3e63f6caa7c5d4 Mon Sep 17 00:00:00 2001 From: Peter Richter Date: Wed, 20 Jul 2016 20:07:02 -0400 Subject: [PATCH 01/17] Update generateAppendClassName.js --- src/generateAppendClassName.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/generateAppendClassName.js b/src/generateAppendClassName.js index c896f6e..32217f2 100644 --- a/src/generateAppendClassName.js +++ b/src/generateAppendClassName.js @@ -15,7 +15,8 @@ export default (styles, styleNames: Array, errorWhenNotFound: boolean): return styleNameIndex; } } else { - stylesIndexMap = stylesIndex.set(styles, new Map()); + stylesIndex.set(styles, new _simpleMap2.default()); + stylesIndexMap = new Map(stylesIndex); } appendClassName = ''; From 7584f5e8a3e6921b314d55965eea21c5b3cead11 Mon Sep 17 00:00:00 2001 From: Peter Richter Date: Wed, 20 Jul 2016 21:20:41 -0400 Subject: [PATCH 02/17] Update .gitignore --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index d54786c..3d02704 100755 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ node_modules coverage -dist *.log .* !.README From 84b7394bf39a443607a89892a533ca015e0dac3d Mon Sep 17 00:00:00 2001 From: Peter Richter Date: Wed, 20 Jul 2016 21:34:32 -0400 Subject: [PATCH 03/17] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9a49f02..846b1f0 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "react-css-modules", "description": "Seamless mapping of class names to CSS modules inside of React components.", - "main": "./dist/", + "main": "./src/", "repository": { "type": "git", "url": "https://github.com/gajus/react-css-modules" From 9dda006950b4b8524a2c3d74079389ffeff015f6 Mon Sep 17 00:00:00 2001 From: Peter Richter Date: Wed, 20 Jul 2016 21:42:47 -0400 Subject: [PATCH 04/17] Update .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 3d02704..d54786c 100755 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ node_modules coverage +dist *.log .* !.README From 088947dee32677e1656abc68bdcc8f501b8f543e Mon Sep 17 00:00:00 2001 From: Peter Richter Date: Wed, 20 Jul 2016 21:43:45 -0400 Subject: [PATCH 05/17] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 846b1f0..9a49f02 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "react-css-modules", "description": "Seamless mapping of class names to CSS modules inside of React components.", - "main": "./src/", + "main": "./dist/", "repository": { "type": "git", "url": "https://github.com/gajus/react-css-modules" From e8922b11714427167878413db4506ccf484cf6d8 Mon Sep 17 00:00:00 2001 From: Peter Richter Date: Thu, 21 Jul 2016 10:59:26 -0400 Subject: [PATCH 06/17] Update generateAppendClassName.js --- src/generateAppendClassName.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/generateAppendClassName.js b/src/generateAppendClassName.js index 32217f2..7586dfd 100644 --- a/src/generateAppendClassName.js +++ b/src/generateAppendClassName.js @@ -15,7 +15,7 @@ export default (styles, styleNames: Array, errorWhenNotFound: boolean): return styleNameIndex; } } else { - stylesIndex.set(styles, new _simpleMap2.default()); + stylesIndex.set(styles, new Map()); stylesIndexMap = new Map(stylesIndex); } From d3b9540770697d5846501c104b6e5a98cd31da82 Mon Sep 17 00:00:00 2001 From: Peter Richter Date: Thu, 21 Jul 2016 14:25:00 -0400 Subject: [PATCH 07/17] Update .npmignore --- .npmignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.npmignore b/.npmignore index e8add85..ad29248 100755 --- a/.npmignore +++ b/.npmignore @@ -1,4 +1,3 @@ -src tests coverage .* From 5f2a3928507fcc0391e01e506e59d5c5cfae3afc Mon Sep 17 00:00:00 2001 From: Peter Richter Date: Thu, 21 Jul 2016 14:51:21 -0400 Subject: [PATCH 08/17] Update generateAppendClassName.js --- src/generateAppendClassName.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/generateAppendClassName.js b/src/generateAppendClassName.js index 7586dfd..5c1a3db 100644 --- a/src/generateAppendClassName.js +++ b/src/generateAppendClassName.js @@ -17,6 +17,15 @@ export default (styles, styleNames: Array, errorWhenNotFound: boolean): } else { stylesIndex.set(styles, new Map()); stylesIndexMap = new Map(stylesIndex); + + stylesIndex.set(styles, new Map()); + stylesIndexMap = new Map(); + + for (key in stylesIndex) { + if(stylesIndex.hasOwnProperty(key)) { + stylesIndexMap.set(key, stylesIndex[key]); + } + } } appendClassName = ''; From 37152566a992f0c40d4ad8fb51ce57ec0bfd7b69 Mon Sep 17 00:00:00 2001 From: Peter Richter Date: Thu, 21 Jul 2016 15:10:58 -0400 Subject: [PATCH 09/17] Update generateAppendClassName.js --- src/generateAppendClassName.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/generateAppendClassName.js b/src/generateAppendClassName.js index 5c1a3db..b990110 100644 --- a/src/generateAppendClassName.js +++ b/src/generateAppendClassName.js @@ -15,9 +15,6 @@ export default (styles, styleNames: Array, errorWhenNotFound: boolean): return styleNameIndex; } } else { - stylesIndex.set(styles, new Map()); - stylesIndexMap = new Map(stylesIndex); - stylesIndex.set(styles, new Map()); stylesIndexMap = new Map(); From 1283672e6c6ee86a967f9f73878e6eac56058542 Mon Sep 17 00:00:00 2001 From: Peter Richter Date: Thu, 21 Jul 2016 15:14:54 -0400 Subject: [PATCH 10/17] Update generateAppendClassName.js --- src/generateAppendClassName.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/generateAppendClassName.js b/src/generateAppendClassName.js index b990110..3959277 100644 --- a/src/generateAppendClassName.js +++ b/src/generateAppendClassName.js @@ -4,7 +4,8 @@ const stylesIndex = new Map(); export default (styles, styleNames: Array, errorWhenNotFound: boolean): string => { let appendClassName, - stylesIndexMap; + stylesIndexMap + key; stylesIndexMap = stylesIndex.get(styles); @@ -19,7 +20,7 @@ export default (styles, styleNames: Array, errorWhenNotFound: boolean): stylesIndexMap = new Map(); for (key in stylesIndex) { - if(stylesIndex.hasOwnProperty(key)) { + if (stylesIndex.hasOwnProperty(key)) { stylesIndexMap.set(key, stylesIndex[key]); } } From 8fb1d739e2440696075f1019cfabb24423e5e71c Mon Sep 17 00:00:00 2001 From: Peter Richter Date: Thu, 21 Jul 2016 15:31:21 -0400 Subject: [PATCH 11/17] Update generateAppendClassName.js --- src/generateAppendClassName.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/generateAppendClassName.js b/src/generateAppendClassName.js index 3959277..cdc97ad 100644 --- a/src/generateAppendClassName.js +++ b/src/generateAppendClassName.js @@ -4,8 +4,8 @@ const stylesIndex = new Map(); export default (styles, styleNames: Array, errorWhenNotFound: boolean): string => { let appendClassName, - stylesIndexMap - key; + key, + stylesIndexMap; stylesIndexMap = stylesIndex.get(styles); From ee9743992d4a83d3ccfddbef1294c279864f5a28 Mon Sep 17 00:00:00 2001 From: Peter Richter Date: Thu, 21 Jul 2016 15:48:30 -0400 Subject: [PATCH 12/17] Update package.json --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 9a49f02..451de5b 100644 --- a/package.json +++ b/package.json @@ -45,6 +45,7 @@ "scripts": { "lint": "eslint ./src ./tests", "test": "mocha --compilers js:babel-register ./tests/**/*.js", + "postinstall": "babel ./src --out-dir ./dist" "build": "babel ./src --out-dir ./dist" } } From 6942cec11ad1ccecee208442bb01d563c79150e4 Mon Sep 17 00:00:00 2001 From: Peter Richter Date: Thu, 21 Jul 2016 15:52:06 -0400 Subject: [PATCH 13/17] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 451de5b..4c409d9 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "scripts": { "lint": "eslint ./src ./tests", "test": "mocha --compilers js:babel-register ./tests/**/*.js", - "postinstall": "babel ./src --out-dir ./dist" + "postinstall": "babel ./src --out-dir ./dist", "build": "babel ./src --out-dir ./dist" } } From 6b9d18296b0c346b05c566beca73397a2922d2e4 Mon Sep 17 00:00:00 2001 From: Peter Richter Date: Thu, 21 Jul 2016 15:54:58 -0400 Subject: [PATCH 14/17] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4c409d9..e41bfd3 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "scripts": { "lint": "eslint ./src ./tests", "test": "mocha --compilers js:babel-register ./tests/**/*.js", - "postinstall": "babel ./src --out-dir ./dist", + "postinstall": "install && babel ./src --out-dir ./dist", "build": "babel ./src --out-dir ./dist" } } From 2df4efa55561f499b6de4d53b938552a8118d3c3 Mon Sep 17 00:00:00 2001 From: Peter Richter Date: Thu, 21 Jul 2016 16:02:00 -0400 Subject: [PATCH 15/17] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e41bfd3..f11cf0d 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "scripts": { "lint": "eslint ./src ./tests", "test": "mocha --compilers js:babel-register ./tests/**/*.js", - "postinstall": "install && babel ./src --out-dir ./dist", + "postinstall": "npm install && babel ./src --out-dir ./dist", "build": "babel ./src --out-dir ./dist" } } From fd93a27a232d9cc247f7e4e1a82538d27c06ffe3 Mon Sep 17 00:00:00 2001 From: Peter Richter Date: Thu, 21 Jul 2016 16:10:06 -0400 Subject: [PATCH 16/17] Update package.json --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index f11cf0d..7d555b5 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,8 @@ "scripts": { "lint": "eslint ./src ./tests", "test": "mocha --compilers js:babel-register ./tests/**/*.js", - "postinstall": "npm install && babel ./src --out-dir ./dist", + "install": "npm install", + "postinstall": "babel ./src --out-dir ./dist", "build": "babel ./src --out-dir ./dist" } } From 99d3d87bb6fea8d9bb0ca8b0468365f18b3f3bd3 Mon Sep 17 00:00:00 2001 From: Peter Richter Date: Thu, 21 Jul 2016 16:44:31 -0400 Subject: [PATCH 17/17] Update package.json --- package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/package.json b/package.json index 7d555b5..3cb7bf1 100644 --- a/package.json +++ b/package.json @@ -45,8 +45,7 @@ "scripts": { "lint": "eslint ./src ./tests", "test": "mocha --compilers js:babel-register ./tests/**/*.js", - "install": "npm install", - "postinstall": "babel ./src --out-dir ./dist", + "postinstall": "npm install --ignore-scripts && babel ./src --out-dir ./dist", "build": "babel ./src --out-dir ./dist" } }