Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

postcss-modules

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-modules - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

12

build/index.js

@@ -7,2 +7,6 @@ 'use strict';

var _lodash = require('lodash.camelcase');
var _lodash2 = _interopRequireDefault(_lodash);
var _parser = require('css-modules-loader-core/lib/parser');

@@ -93,2 +97,10 @@

if (opts.camelCase === true) {
Object.keys(parser.exportTokens).forEach(function (token) {
const camelCaseToken = (0, _lodash2.default)(token);
parser.exportTokens[camelCaseToken] = parser.exportTokens[token];
});
}
// getJSON may return a promise

@@ -95,0 +107,0 @@ return getJSON(css.source.input.file, parser.exportTokens, result.opts.to);

4

CHANGELOG.md
# Changelog
## 1.2.0
- Added option to transform classes to camelCase by Igor Ribeiro (@igor-ribeiro) <https://github.com/css-modules/postcss-modules/pull/82>
## 1.1.0

@@ -4,0 +8,0 @@

3

package.json
{
"name": "postcss-modules",
"version": "1.1.0",
"version": "1.2.0",
"description": "PostCSS plugin to use CSS Modules everywhere",

@@ -23,2 +23,3 @@ "main": "build/index.js",

"generic-names": "^1.0.2",
"lodash.camelcase": "^4.3.0",
"postcss": "^6.0.1",

@@ -25,0 +26,0 @@ "string-hash": "^1.1.1"

@@ -173,3 +173,22 @@ # postcss-modules [![Build Status][ci-img]][ci]

### Camel cased classes
If you need, you can pass the options `{ camelCase: true }` to transform classes:
CSS:
```css
.post-title {
color: red;
}
```
JSON:
```json
{
"post-title": "._post-title_116zl_1",
"postTitle": "._post-title_116zl_1"
}
```
## Integration with templates

@@ -176,0 +195,0 @@ The plugin only transforms CSS classes to CSS modules.

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc