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

postcss-mixins

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-mixins - npm Package Compare versions

Comparing version 0.4.0 to 1.0.0

3

CHANGELOG.md

@@ -0,1 +1,4 @@

## 1.0
* Use PostCSS 5.0 API.
## 0.4

@@ -2,0 +5,0 @@ * Add `mixinsFiles` option (by Jed Mao).

21

index.js

@@ -65,5 +65,6 @@ var postcss = require('postcss');

} else if ( mixin.name === 'define-mixin' ) {
var i;
var values = { };
for ( var i = 0; i < meta.args.length; i++ ) {
values[ meta.args[i][0] ] = params[i] || meta.args[i][1];
for ( i = 0; i < meta.args.length; i++ ) {
values[meta.args[i][0]] = params[i] || meta.args[i][1];
}

@@ -81,3 +82,3 @@

if ( meta.content ) {
proxy.eachAtRule('mixin-content', function (place) {
proxy.walkAtRules('mixin-content', function (place) {
place.replaceWith(rule.nodes);

@@ -100,3 +101,3 @@ });

if ( rule.parent ) rule.removeSelf();
if ( rule.parent ) rule.remove();
};

@@ -121,3 +122,3 @@

} else {
args = postcss.list.comma(other).map(function(str) {
args = postcss.list.comma(other).map(function (str) {
var arg = str.split(':', 1)[0];

@@ -131,3 +132,3 @@ var defaults = str.slice(arg.length + 1);

var content = false;
rule.eachAtRule('mixin-content', function () {
rule.walkAtRules('mixin-content', function () {
content = true;

@@ -138,3 +139,3 @@ return false;

mixins[name] = { mixin: rule, args: args, content: content };
rule.removeSelf();
rule.remove();
};

@@ -169,4 +170,4 @@

globs.forEach(function(pattern) {
glob.sync(pattern).forEach(function(file2) {
globs.forEach(function (pattern) {
glob.sync(pattern).forEach(function (file2) {
var name2 = path.basename(file2, path.extname(file2));

@@ -183,3 +184,3 @@ mixins[name2] = { mixin: require(file2) };

return function (css, result) {
css.eachAtRule(function (rule) {
css.walkAtRules(function (rule) {

@@ -186,0 +187,0 @@ if ( rule.name === 'mixin' ) {

{
"name": "postcss-mixins",
"version": "0.4.0",
"description": "PostCSS plugin for mixins",
"keywords": ["postcss", "css", "postcss-plugin", "mixins", "sass"],
"author": "Andrey Sitnik <andrey@sitnik.ru>",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/postcss/postcss-mixins.git"
},
"dependencies": {
"postcss-simple-vars": "^0.3.0",
"postcss": "^4.1.16",
"glob": "^5.0.14"
},
"devDependencies": {
"gulp-eslint": "0.15.0",
"gulp-mocha": "2.1.3",
"mocha": "2.2.5",
"chai": "3.1.0",
"gulp": "3.9.0"
},
"scripts": {
"test": "gulp"
}
"name": "postcss-mixins",
"version": "1.0.0",
"description": "PostCSS plugin for mixins",
"keywords": [
"postcss",
"css",
"postcss-plugin",
"mixins",
"sass"
],
"author": "Andrey Sitnik <andrey@sitnik.ru>",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/postcss/postcss-mixins.git"
},
"dependencies": {
"postcss-simple-vars": "^1.0.0",
"postcss": "^5.0.2",
"glob": "^5.0.14"
},
"devDependencies": {
"gulp-eslint": "1.0.0",
"gulp-mocha": "2.1.3",
"mocha": "2.2.5",
"chai": "3.2.0",
"gulp": "3.9.0"
},
"scripts": {
"test": "gulp"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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