Skip to content

Releases: css-modules/css-modules-require-hook

The new API, beta

23 Feb 08:49
Compare
Choose a tag to compare

To try it out, run:

$ npm install [email protected]

Features:

— Added ignore option, so you can ignore particular files from processing. Supports globs, regexp and functions.
— Hook is not attached automatically now, so you need to make a function call first to make it work.
— Added possibility to use particular files as presets. In that case hook will be attached automatically and all options should be described in the cmrh.conf.js file. To use it, you should run: require('css-modules-require-hook/preset'). I hope it will solve the babel issue.
— Some internal updates.

Development mode updated

22 Feb 13:32
Compare
Choose a tag to compare

Added possibility to control behavior, imposed by environment variable NODE_ENV. So now, there is an option devMode and it overrides NODE_ENV value, which will provide you a little bit more precise control.

Still, you can use NODE_ENV=development to drop cache as earlier.

pr: #56
thanks to @yazonnile

Development mode

28 Nov 17:58
Compare
Choose a tag to compare

Added possibility to invalidate cache in the development mode. To use it, run you code with environment variable NODE_ENV=development.

Internal update

25 Nov 16:51
Compare
Choose a tag to compare

Fallback in favor of lodash.assign instead of object.assign in order to support older nodejs versions

Internal update

24 Nov 22:24
Compare
Choose a tag to compare
2.0.3

version update

Public parser

03 Nov 22:58
Compare
Choose a tag to compare

Using the public parser-plugin now

bug fix

02 Nov 19:23
Compare
Choose a tag to compare

fix for #48

Values + Symbols + Generic names

02 Nov 00:03
Compare
Choose a tag to compare

Values added: css-modules/css-modules-loader-core#28
Also added possibility to specify string patterns similar to webpack. For example:

hook({
  generateScopedName: '[name]__[local]___[hash:base64:5]'
});

In order to use them together with webpack you should update the css-loader version to v0.21.0 or higher.

Also some major internal updates. If you provided custom functions to the generateScopedName option, then you may be affected by those changes. Now you'll get full absolute paths to the files as the second argument: generateScopedName: function (name, filepath, css) { ... }

All the shortcuts were removed: root, d, u. Use rootDir and use instead.

Generic names

01 Nov 12:10
Compare
Choose a tag to compare
Generic names Pre-release
Pre-release
2.0.0-beta2

version update

Values + Symbols

22 Oct 09:19
Compare
Choose a tag to compare
Values + Symbols Pre-release
Pre-release
Merge pull request #44 from css-modules/2.0.0

2.0.0