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.2.0 to 1.3.0

.vscode/settings.json

8

build/behaviours.js

@@ -1,2 +0,2 @@

'use strict';
"use strict";

@@ -10,3 +10,3 @@ Object.defineProperty(exports, "__esModule", {

var _cssModulesLoaderCore = require('css-modules-loader-core');
var _cssModulesLoaderCore = require("css-modules-loader-core");

@@ -18,4 +18,4 @@ var _cssModulesLoaderCore2 = _interopRequireDefault(_cssModulesLoaderCore);

const behaviours = exports.behaviours = {
LOCAL: 'local',
GLOBAL: 'global'
LOCAL: "local",
GLOBAL: "global"
};

@@ -22,0 +22,0 @@

@@ -1,2 +0,2 @@

'use strict';
"use strict";

@@ -8,3 +8,3 @@ Object.defineProperty(exports, "__esModule", {

var _stringHash = require('string-hash');
var _stringHash = require("string-hash");

@@ -11,0 +11,0 @@ var _stringHash2 = _interopRequireDefault(_stringHash);

@@ -1,32 +0,32 @@

'use strict';
"use strict";
var _postcss = require('postcss');
var _postcss = require("postcss");
var _postcss2 = _interopRequireDefault(_postcss);
var _lodash = require('lodash.camelcase');
var _lodash = require("lodash.camelcase");
var _lodash2 = _interopRequireDefault(_lodash);
var _parser = require('css-modules-loader-core/lib/parser');
var _parser = require("css-modules-loader-core/lib/parser");
var _parser2 = _interopRequireDefault(_parser);
var _fileSystemLoader = require('css-modules-loader-core/lib/file-system-loader');
var _fileSystemLoader = require("css-modules-loader-core/lib/file-system-loader");
var _fileSystemLoader2 = _interopRequireDefault(_fileSystemLoader);
var _genericNames = require('generic-names');
var _genericNames = require("generic-names");
var _genericNames2 = _interopRequireDefault(_genericNames);
var _generateScopedName = require('./generateScopedName');
var _generateScopedName = require("./generateScopedName");
var _generateScopedName2 = _interopRequireDefault(_generateScopedName);
var _saveJSON = require('./saveJSON');
var _saveJSON = require("./saveJSON");
var _saveJSON2 = _interopRequireDefault(_saveJSON);
var _behaviours = require('./behaviours');
var _behaviours = require("./behaviours");

@@ -37,3 +37,3 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

const PLUGIN_NAME = 'postcss-modules';
const PLUGIN_NAME = "postcss-modules";

@@ -51,3 +51,3 @@ function getDefaultScopeBehaviour(opts) {

if (typeof scopedNameGenerator === 'function') return scopedNameGenerator;
if (typeof scopedNameGenerator === "function") return scopedNameGenerator;
return (0, _genericNames2.default)(scopedNameGenerator, { context: process.cwd() });

@@ -57,4 +57,4 @@ }

function getLoader(opts, plugins) {
const root = typeof opts.root === 'undefined' ? '/' : opts.root;
return typeof opts.Loader === 'function' ? new opts.Loader(root, plugins) : new _fileSystemLoader2.default(root, plugins);
const root = typeof opts.root === "undefined" ? "/" : opts.root;
return typeof opts.Loader === "function" ? new opts.Loader(root, plugins) : new _fileSystemLoader2.default(root, plugins);
}

@@ -94,3 +94,5 @@

yield (0, _postcss2.default)([...plugins, parser.plugin]).process(css, { from: inputFile });
yield (0, _postcss2.default)([...plugins, parser.plugin]).process(css, {
from: inputFile
});

@@ -100,6 +102,5 @@ const out = loader.finalSource;

if (opts.camelCase === true) {
if (opts.camelCase) {
Object.keys(parser.exportTokens).forEach(function (token) {
const camelCaseToken = (0, _lodash2.default)(token);
parser.exportTokens[camelCaseToken] = parser.exportTokens[token];

@@ -106,0 +107,0 @@ });

@@ -1,2 +0,2 @@

'use strict';
"use strict";

@@ -8,3 +8,3 @@ Object.defineProperty(exports, "__esModule", {

var _fs = require('fs');
var _fs = require("fs");

@@ -11,0 +11,0 @@ function saveJSON(cssFile, json) {

# Changelog
## 1.3.0
- Updated dependecies
- Added prettier to format code
## 1.2.0

@@ -4,0 +9,0 @@

{
"name": "postcss-modules",
"version": "1.2.0",
"version": "1.3.0",
"description": "PostCSS plugin to use CSS Modules everywhere",

@@ -22,18 +22,20 @@ "main": "build/index.js",

"css-modules-loader-core": "^1.1.0",
"generic-names": "^1.0.2",
"generic-names": "^1.0.3",
"husky": "^0.14.3",
"lint-staged": "^7.2.0",
"lodash.camelcase": "^4.3.0",
"postcss": "^6.0.1",
"postcss": "^7.0.1",
"prettier": "^1.13.7",
"string-hash": "^1.1.1"
},
"devDependencies": {
"autoprefixer": "^6.6.0",
"ava": "^0.22.0",
"autoprefixer": "6.7.7",
"ava": "^0.25.0",
"babel": "^6.5.2",
"babel-cli": "^6.18.0",
"babel-core": "^6.21.0",
"babel-eslint": "^8.0.1",
"babel-preset-env": "^1.6.0",
"eslint": "^4.8.0",
"eslint-config-airbnb-base": "^12.0.2",
"eslint-plugin-import": "^2.2.0"
"babel-cli": "^6.26.0",
"babel-core": "^6.26.3",
"babel-eslint": "^8.2.6",
"babel-preset-env": "^1.7.0",
"eslint": "^5.1.0",
"eslint-plugin-import": "^2.13.0"
},

@@ -45,5 +47,17 @@ "scripts": {

"prepublish": "npm run transpile",
"postpublish": "rm -rf build && git push --follow-tags"
"postpublish": "rm -rf build && git push --follow-tags",
"precommit": "lint-staged"
},
"lint-staged": {
"*.{json,md}": [
"prettier --write",
"git add"
],
"*.js": [
"prettier --write",
"eslint --fix",
"git add"
]
},
"require": "babel-core/register"
}
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