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

postcss-import

Package Overview
Dependencies
Maintainers
1
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-import - npm Package Compare versions

Comparing version 3.1.0 to 3.2.0

4

CHANGELOG.md

@@ -0,1 +1,5 @@

# 3.2.0 - 2014-11-24
- Add `onImport` callback that offer a way to get list of imported files ([ref](https://github.com/postcss/postcss-import/issues/9))
# 3.1.0 - 2014-11-24

@@ -2,0 +6,0 @@

22

index.js

@@ -47,3 +47,16 @@ "use strict";

parseStyles(styles, options, insertRules)
var importedFiles = {}
if (options.from) {
importedFiles[options.from] = {
"": true
}
}
var ignoredAtRules = []
parseStyles(styles, options, insertRules, importedFiles, ignoredAtRules)
addIgnoredAtRulesOnTop(styles, ignoredAtRules)
if (typeof options.onImport === "function") {
options.onImport(Object.keys(importedFiles))
}
}

@@ -59,5 +72,2 @@ }

function parseStyles(styles, options, cb, importedFiles, ignoredAtRules, media) {
var isRoot = ignoredAtRules === undefined
importedFiles = importedFiles || {}
ignoredAtRules = ignoredAtRules || []
styles.eachAtRule(function checkAtRule(atRule) {

@@ -72,6 +82,2 @@ if (atRule.name !== "import") {

})
if (isRoot) {
addIgnoredAtRulesOnTop(styles, ignoredAtRules)
}
}

@@ -78,0 +84,0 @@

{
"name": "postcss-import",
"version": "3.1.0",
"version": "3.2.0",
"description": "PostCSS plugin to import CSS files",

@@ -5,0 +5,0 @@ "keywords": [

@@ -71,3 +71,3 @@ # postcss-import [![Build Status](https://travis-ci.org/postcss/postcss-import.png)](https://travis-ci.org/postcss/postcss-import)

#### encoding
#### `encoding`

@@ -79,3 +79,3 @@ Type: `String`

#### path
#### `path`

@@ -88,3 +88,3 @@ Type: `String|Array`

#### transform
#### `transform`

@@ -96,2 +96,9 @@ Type: `Function`

#### `onImport`
Type: `Function`
Default: `null`
Function called after the import process. Take one argument (array of imported files).
#### Example with some options

@@ -98,0 +105,0 @@

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