postcss-load-plugins
Advanced tools
Comparing version 2.0.0-alpha2 to 2.0.0-alpha3
12
index.js
@@ -7,10 +7,14 @@ // ------------------------------------ | ||
const config = require('cosmiconfig') | ||
var config = require('cosmiconfig') | ||
const loadPlugins = require('./lib/loadPlugins') | ||
var loadPlugins = require('./lib/loadPlugins') | ||
module.exports = function (options) { | ||
return config('postcss') | ||
.catch((error) => console.log(error)) | ||
.then((result) => loadPlugins(result.config, options)) | ||
.catch(function (error) { | ||
console.log(error) | ||
}) | ||
.then(function (result) { | ||
return loadPlugins(result.config, options) | ||
}) | ||
} |
@@ -7,3 +7,3 @@ // ------------------------------------ | ||
const path = require('path') | ||
var path = require('path') | ||
@@ -16,3 +16,3 @@ module.exports = function loadPlugins (config, options) { | ||
if (options) { | ||
for (let option in options) { | ||
for (var option in options) { | ||
config.plugins[option] = options.plugins[option] | ||
@@ -28,5 +28,5 @@ } | ||
let plugins = [] | ||
var plugins = [] | ||
Object.keys(options).forEach((plugin) => { | ||
Object.keys(options).forEach(function (plugin) { | ||
plugins.push(load(plugin, options[plugin])) | ||
@@ -33,0 +33,0 @@ }) |
{ | ||
"name": "postcss-load-plugins", | ||
"version": "2.0.0-alpha2", | ||
"version": "2.0.0-alpha3", | ||
"description": "Autoload Plugins for PostCSS", | ||
@@ -5,0 +5,0 @@ "engines": {"node": ">=4"}, |
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
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
8399
40