Meteor + CSS-Modules + SugarSS

  • Tutorial

Cotans!


Do you know about Meteor ? Well, yes - a strange question.


Do you know about CSS-Modules ? Goodbye BEM.


Do you know about SugarSS ? Goodbye SASS.


Pepper from Texas accepted my pull-request today . And all this happiness can now be used. CoffeeScript, Jade, SugarSS - a complete set for kosher code.


And I stuck after a lecture by Andrei Sitnik (thanks):



But that is not all. I screwed up postcss-initial and postcss-autoreset - I got full isolation, which I did not even dream about in BEM.


METEOR@1.3.2.4 - package.json


{
  "dependencies": {
    "meteor-node-stubs": "~0.2.0"
  },
  "devDependencies": {
    "sugarss": "0.1.3",
    "postcss-initial": "1.5.1",
    "postcss-autoreset": "1.1.5",
    "autoprefixer": "^6.3.6",
    "postcss-modules-extract-imports": "1.0.0",
    "postcss-modules-local-by-default": "1.0.0",
    "postcss-modules-scope": "1.0.0",
    "postcss-modules-values": "1.1.1",
    "postcss-nested": "1.0.0",
    "postcss-simple-vars": "1.1.0"
  },
  "cssModules": {
    "enableSassCompilation": false,
    "enableStylusCompilation": false,
    "extensions": [
      "sss"
    ],
    "parser": "sugarss",
    "postcssPlugins": {
      "postcss-simple-vars": {
        "inlineOptions": {
          "variables": {
            "orange": "orange"
          }
        },
        "fileOptions": [
          "client/colors.txt",
          "client/fonts.json"
        ]
      },
      "postcss-initial": {"reset": "inherited"},
      "postcss-autoreset": {"reset": "initial"},
      "postcss-modules-values": {},
      "postcss-nested": {},
      "postcss-modules-local-by-default": {},
      "postcss-modules-extract-imports": {},
      "postcss-modules-scope": {},
      "autoprefixer": {"browsers": ["last 2 versions"]}
    }
  }
}

Also popular now: