Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Additional options

08 Jan 21:15
@mightyaleksey mightyaleksey
Compare
Choose a tag to compare
Loading
  • Added the resolve option to provide possibility to adjust the way the ICSS imports are resolved. The resolve algorithm became stricter (closer to nodejs), but it doesn't affect the require paths. You may now omit the extension and provide custom module paths to for composes and @value paths.
  • Fixed double-dashes for camelCase option: #108
  • Updated deps in demo
Assets 2
Loading

Internals update

10 Sep 17:39
@mightyaleksey mightyaleksey
Compare
Choose a tag to compare
Loading
  • postcss-modules-parser was replaced with postcss-modules-resolve-imports.
  • fixes issue with nodejs 4 support.
Loading

Extended the camelCase option

20 Mar 08:25
@mightyaleksey mightyaleksey
Compare
Choose a tag to compare
Loading

For now, it accepts the similar to css-loader options: true|'dashes'|'dashesOnly'|'only'.
https://github.com/webpack-contrib/css-loader#camelcase

Loading

Totally removed demo folder from the published module

03 Oct 05:27
@mightyaleksey mightyaleksey
Compare
Choose a tag to compare
Loading
Loading

Removed test folder from the published module

03 Oct 05:22
@mightyaleksey mightyaleksey
Compare
Choose a tag to compare
Loading
4.0.4
added test folder to the .npmignore
Loading

Possibility to pass hashPrefix option

20 Sep 14:02
@mightyaleksey mightyaleksey
Compare
Choose a tag to compare
Loading

Added support for the scoped modules

18 Aug 14:09
@mightyaleksey mightyaleksey
Compare
Choose a tag to compare
Loading
Loading

Added camelCase option

29 May 09:47
@mightyaleksey mightyaleksey
Compare
Choose a tag to compare
Loading
4.0.1
version and publish scripts update
Loading

The API update

07 Mar 09:08
@mightyaleksey mightyaleksey
Compare
Choose a tag to compare
Loading

Since I removed the to option, so I decided to make a major release.

Anyways, now you can provide all the processor options to the postcss instance via processorOpts. For example:

const hook = require('css-modules-require-hook');
const lessParser = require('postcss-less').parse;
hook({
 extensions: '.less',
 processorOpts: {parser: lessParser},
});

Also, if you need to provide the to options, you may use processorOpts for that:

hook({
 processorOpts: {to: '..'},
});
Loading

The new API

24 Feb 21:50
@mightyaleksey mightyaleksey
Compare
Choose a tag to compare
Loading

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.

Loading
Previous 1 3 4
Previous

AltStyle によって変換されたページ (->オリジナル) /