postcss-modules
Advanced tools
Comparing version 1.2.0 to 1.3.0
@@ -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" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
17663
9
9
128
8
+ Addedhusky@^0.14.3
+ Addedlint-staged@^7.2.0
+ Addedprettier@^1.13.7
+ Added@samverschueren/stream-to-observable@0.3.1(transitive)
+ Addedansi-escapes@3.2.0(transitive)
+ Addedansi-regex@3.0.1(transitive)
+ Addedany-observable@0.3.0(transitive)
+ Addedargparse@1.0.10(transitive)
+ Addedarr-diff@4.0.0(transitive)
+ Addedarr-flatten@1.1.0(transitive)
+ Addedarr-union@3.1.0(transitive)
+ Addedarray-unique@0.3.2(transitive)
+ Addedassign-symbols@1.0.0(transitive)
+ Addedatob@2.1.2(transitive)
+ Addedbase@0.11.2(transitive)
+ Addedbraces@2.3.2(transitive)
+ Addedcache-base@1.0.1(transitive)
+ Addedcaller-callsite@2.0.0(transitive)
+ Addedcaller-path@2.0.0(transitive)
+ Addedcallsites@2.0.0(transitive)
+ Addedci-info@1.6.0(transitive)
+ Addedclass-utils@0.3.6(transitive)
+ Addedcli-cursor@2.1.0(transitive)
+ Addedcli-truncate@0.2.1(transitive)
+ Addedcode-point-at@1.1.0(transitive)
+ Addedcollection-visit@1.0.0(transitive)
+ Addedcommander@2.20.3(transitive)
+ Addedcomponent-emitter@1.3.1(transitive)
+ Addedcopy-descriptor@0.1.1(transitive)
+ Addedcosmiconfig@5.2.1(transitive)
+ Addedcross-spawn@5.1.0(transitive)
+ Addeddate-fns@1.30.1(transitive)
+ Addeddebug@2.6.93.2.7(transitive)
+ Addeddecode-uri-component@0.2.2(transitive)
+ Addeddedent@0.7.0(transitive)
+ Addeddefine-property@0.2.51.0.02.0.2(transitive)
+ Addedelegant-spinner@1.0.1(transitive)
+ Addederror-ex@1.3.2(transitive)
+ Addedesprima@4.0.1(transitive)
+ Addedexeca@0.9.0(transitive)
+ Addedexpand-brackets@2.1.4(transitive)
+ Addedextend-shallow@2.0.13.0.2(transitive)
+ Addedextglob@2.0.4(transitive)
+ Addedfigures@1.7.02.0.0(transitive)
+ Addedfill-range@4.0.0(transitive)
+ Addedfind-parent-dir@0.3.1(transitive)
+ Addedfor-in@1.0.2(transitive)
+ Addedfragment-cache@0.2.1(transitive)
+ Addedfunction-bind@1.1.2(transitive)
+ Addedget-own-enumerable-property-symbols@3.0.2(transitive)
+ Addedget-stream@3.0.0(transitive)
+ Addedget-value@2.0.6(transitive)
+ Addedhas-value@0.3.11.0.0(transitive)
+ Addedhas-values@0.1.41.0.0(transitive)
+ Addedhasown@2.0.2(transitive)
+ Addedhusky@0.14.3(transitive)
+ Addedimport-fresh@2.0.0(transitive)
+ Addedindent-string@3.2.0(transitive)
+ Addedis-accessor-descriptor@1.0.1(transitive)
+ Addedis-arrayish@0.2.1(transitive)
+ Addedis-buffer@1.1.6(transitive)
+ Addedis-ci@1.2.1(transitive)
+ Addedis-data-descriptor@1.0.1(transitive)
+ Addedis-descriptor@0.1.71.0.3(transitive)
+ Addedis-directory@0.3.1(transitive)
+ Addedis-extendable@0.1.11.0.1(transitive)
+ Addedis-extglob@2.1.1(transitive)
+ Addedis-fullwidth-code-point@1.0.02.0.0(transitive)
+ Addedis-glob@4.0.3(transitive)
+ Addedis-number@3.0.0(transitive)
+ Addedis-obj@1.0.1(transitive)
+ Addedis-observable@1.1.0(transitive)
+ Addedis-plain-object@2.0.4(transitive)
+ Addedis-promise@2.2.2(transitive)
+ Addedis-regexp@1.0.0(transitive)
+ Addedis-stream@1.1.0(transitive)
+ Addedis-windows@1.0.2(transitive)
+ Addedisarray@1.0.0(transitive)
+ Addedisexe@2.0.0(transitive)
+ Addedisobject@2.1.03.0.1(transitive)
+ Addedjest-get-type@22.4.3(transitive)
+ Addedjest-validate@23.6.0(transitive)
+ Addedjs-yaml@3.14.1(transitive)
+ Addedjson-parse-better-errors@1.0.2(transitive)
+ Addedkind-of@3.2.24.0.06.0.3(transitive)
+ Addedleven@2.1.0(transitive)
+ Addedlint-staged@7.3.0(transitive)
+ Addedlistr@0.14.3(transitive)
+ Addedlistr-silent-renderer@1.1.1(transitive)
+ Addedlistr-update-renderer@0.5.0(transitive)
+ Addedlistr-verbose-renderer@0.5.0(transitive)
+ Addedlodash@4.17.21(transitive)
+ Addedlog-symbols@1.0.22.2.0(transitive)
+ Addedlog-update@2.3.0(transitive)
+ Addedlru-cache@4.1.5(transitive)
+ Addedmap-cache@0.2.2(transitive)
+ Addedmap-visit@1.0.0(transitive)
+ Addedmicromatch@3.1.10(transitive)
+ Addedmimic-fn@1.2.0(transitive)
+ Addedmixin-deep@1.3.2(transitive)
+ Addedms@2.0.02.1.3(transitive)
+ Addednanomatch@1.2.13(transitive)
+ Addednormalize-path@1.0.0(transitive)
+ Addednpm-path@2.0.4(transitive)
+ Addednpm-run-path@2.0.2(transitive)
+ Addednpm-which@3.0.1(transitive)
+ Addednumber-is-nan@1.0.1(transitive)
+ Addedobject-copy@0.1.0(transitive)
+ Addedobject-visit@1.0.1(transitive)
+ Addedobject.pick@1.3.0(transitive)
+ Addedonetime@2.0.1(transitive)
+ Addedp-finally@1.0.0(transitive)
+ Addedp-map@1.2.02.1.0(transitive)
+ Addedparse-json@4.0.0(transitive)
+ Addedpascalcase@0.1.1(transitive)
+ Addedpath-is-inside@1.0.2(transitive)
+ Addedpath-key@2.0.1(transitive)
+ Addedpicocolors@0.2.1(transitive)
+ Addedpify@3.0.0(transitive)
+ Addedplease-upgrade-node@3.2.0(transitive)
+ Addedposix-character-classes@0.1.1(transitive)
+ Addedpostcss@7.0.39(transitive)
+ Addedprettier@1.19.1(transitive)
+ Addedpretty-format@23.6.0(transitive)
+ Addedpseudomap@1.0.2(transitive)
+ Addedregex-not@1.0.2(transitive)
+ Addedrepeat-element@1.1.4(transitive)
+ Addedrepeat-string@1.6.1(transitive)
+ Addedresolve-from@3.0.0(transitive)
+ Addedresolve-url@0.2.1(transitive)
+ Addedrestore-cursor@2.0.0(transitive)
+ Addedret@0.1.15(transitive)
+ Addedrxjs@6.6.7(transitive)
+ Addedsafe-regex@1.1.0(transitive)
+ Addedsemver-compare@1.0.0(transitive)
+ Addedset-value@2.0.1(transitive)
+ Addedshebang-command@1.2.0(transitive)
+ Addedshebang-regex@1.0.0(transitive)
+ Addedsignal-exit@3.0.7(transitive)
+ Addedslice-ansi@0.0.4(transitive)
+ Addedsnapdragon@0.8.2(transitive)
+ Addedsnapdragon-node@2.1.1(transitive)
+ Addedsnapdragon-util@3.0.1(transitive)
+ Addedsource-map-resolve@0.5.3(transitive)
+ Addedsource-map-url@0.4.1(transitive)
+ Addedsplit-string@3.1.0(transitive)
+ Addedsprintf-js@1.0.3(transitive)
+ Addedstaged-git-files@1.1.1(transitive)
+ Addedstatic-extend@0.1.2(transitive)
+ Addedstring-argv@0.0.2(transitive)
+ Addedstring-width@1.0.22.1.1(transitive)
+ Addedstringify-object@3.3.0(transitive)
+ Addedstrip-ansi@4.0.0(transitive)
+ Addedstrip-eof@1.0.0(transitive)
+ Addedstrip-indent@2.0.0(transitive)
+ Addedsymbol-observable@1.2.0(transitive)
+ Addedto-object-path@0.3.0(transitive)
+ Addedto-regex@3.0.2(transitive)
+ Addedto-regex-range@2.1.1(transitive)
+ Addedtslib@1.14.1(transitive)
+ Addedunion-value@1.0.1(transitive)
+ Addedunset-value@1.0.0(transitive)
+ Addedurix@0.1.0(transitive)
+ Addeduse@3.1.1(transitive)
+ Addedwhich@1.3.1(transitive)
+ Addedwrap-ansi@3.0.1(transitive)
+ Addedyallist@2.1.2(transitive)
Updatedgeneric-names@^1.0.3
Updatedpostcss@^7.0.1