akanix42 / meteor-css-modules

MIT License
92 stars 20 forks source link

Documentation and warning message improvements #84

Open arggh opened 7 years ago

arggh commented 7 years ago

Trying to set up CSS Modules, I stumbled on these issues that I couldn't find mentioned in the docs:

.b { color: white; }

- The instructed install command for `node-sass` should specify the required version like this `meteor npm install --save-dev node-sass@3`.

Now it instructs:

To enable Sass compilation, first install the package using the following command:

meteor npm install --save-dev node-sass

and then I get this ->

Error checking npm module: node-sass@3.x (required by nathantreid:css-modules): module not found. Please ensure you have installed the module; here is the command: meteor npm install node-sass --save-dev



- Global installation of `node-sass` is not supported
- By default, after installing `node-sass`, `meteor-css-modules` will also pick up the fixtures from `node_modules/node-sass/...` and include them in the css-bundle, giving your app for example a beautiful background with color `red`. When instructing to install `node-sass`, the instructions should mention to also include `"ignorePaths": [ "node_modules"]` in the package.json config.
- If a file referenced by `composes` is not found (wrong path maybe?), it would be nice to get notified with a meaningful error message
- Links to some proper CSS Modules or PostCSS resources might be beneficial as further study material on the subject
[CSS Modules slides](https://cdn.rawgit.com/joeybaker/styleguide-css/a2a7f31c/decks/CSS-Modules.html#1)