Created
December 31, 2015 19:11
-
-
Save ponko2/21347634bc8466c77a89 to your computer and use it in GitHub Desktop.
atom-csscombが.csscomb.jsonでおこなった設定の一部を無視する問題への応急処置
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git index.js index.js | |
index 9fc06ec..68e81c4 100644 | |
--- index.js | |
+++ index.js | |
@@ -74,10 +74,8 @@ const getCombConfig = () => { | |
let config; | |
- if (configureWithJSON()) { | |
- if (fs.existsSync(configPath)) { | |
- config = require(configPath); | |
- } | |
+ if (configureWithJSON() && fs.existsSync(configPath)) { | |
+ config = CSSComb.getCustomConfig(configPath); | |
} | |
if (!config) { | |
@@ -90,9 +88,11 @@ const getCombConfig = () => { | |
const comb = (css = '', syntax = 'css') => { | |
let csscomb = new CSSComb(getCombConfig()); | |
- let combed = csscomb.processString(css, { | |
- syntax: syntax | |
- }); | |
+ let combed = csscomb.processString(css, {syntax}); | |
+ | |
+ if (configureWithJSON() && fs.existsSync(configPath)) { | |
+ return combed; | |
+ } | |
return postcss([perfectionist({ | |
syntax: syntax, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment