Skip to content

Instantly share code, notes, and snippets.

@ponko2
Created December 31, 2015 19:11
Show Gist options
  • Save ponko2/21347634bc8466c77a89 to your computer and use it in GitHub Desktop.
Save ponko2/21347634bc8466c77a89 to your computer and use it in GitHub Desktop.
atom-csscombが.csscomb.jsonでおこなった設定の一部を無視する問題への応急処置
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