From 867686580ae5d00b33efbbde567371d431c20c5c Mon Sep 17 00:00:00 2001 From: Vadym Borodin Date: Sun, 31 Jan 2016 00:58:50 +0200 Subject: [PATCH 1/5] Add the list of contributors --- package.json | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/package.json b/package.json index be6ae1c..45d7637 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,13 @@ ], "license": "MIT", "author": "Vadym Borodin ", + "contributors": [ + "Alexey Plutalov (https://twitter.com/demiazz)", + "Andrey Sitnik (http://sitnik.ru)", + "Dave Clayton (http://www.dave78.com)", + "Ivan Vlasenko (https://github.com/avanes)", + "Pascal Duez (http://pascalduez.me)" + ], "repository": "assetsjs/postcss-assets", "scripts": { "coveralls": "nyc report --reporter=text-lcov | coveralls", From 5fb01fe791099d0e884c0f56cabe910393ddfedc Mon Sep 17 00:00:00 2001 From: Vadym Borodin Date: Sun, 31 Jan 2016 00:59:02 +0200 Subject: [PATCH 2/5] Add author's homepage --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 45d7637..dedf1c5 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "url" ], "license": "MIT", - "author": "Vadym Borodin ", + "author": "Vadym Borodin (http://borodean.com)", "contributors": [ "Alexey Plutalov (https://twitter.com/demiazz)", "Andrey Sitnik (http://sitnik.ru)", From b68f32e3d5b9fef3664c22e76e55d7826e0d00d0 Mon Sep 17 00:00:00 2001 From: Vadym Borodin Date: Mon, 1 Feb 2016 15:53:57 +0200 Subject: [PATCH 3/5] Set `from` option for every test --- test/assets.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/test/assets.js b/test/assets.js index d9bce6f..06a436d 100644 --- a/test/assets.js +++ b/test/assets.js @@ -6,8 +6,10 @@ var plugin = require('..'); var postcss = require('postcss'); var test = require('ava'); -function process(css, options, postcssOptions) { - return postcss().use(plugin(options)).process(css, postcssOptions); +function process(css, options) { + return postcss().use(plugin(options)).process(css, { + from: path.resolve('fixtures/images/style.css') + }); } test('resolves urls', function (t) { @@ -25,8 +27,6 @@ test('resolves urls from the current path', function (t) { return process("a { b: resolve('picture.png') }", { basePath: 'fixtures', baseUrl: 'http://example.com/wp-content/themes' - }, { - from: path.resolve('fixtures/images/style.css') }) .then(function (result) { t.is(result.css, "a { b: url('http://example.com/wp-content/themes/images/picture.png') }"); @@ -37,8 +37,6 @@ test('resolves relative urls from the current path', function (t) { return process("a { b: resolve('fonts/empty-sans.woff') }", { basePath: 'fixtures', relative: true - }, { - from: path.resolve('fixtures/images/style.css') }) .then(function (result) { t.is(result.css, "a { b: url('../fonts/empty-sans.woff') }"); From b349ed26c4f27b9d882e78c5965fd06af4e27f95 Mon Sep 17 00:00:00 2001 From: Vadym Borodin Date: Mon, 1 Feb 2016 15:54:04 +0200 Subject: [PATCH 4/5] Set default options --- index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/index.js b/index.js index d398208..38be7e8 100644 --- a/index.js +++ b/index.js @@ -8,6 +8,12 @@ var unquote = require('./lib/unquote'); var util = require('util'); module.exports = postcss.plugin('postcss-assets', function (options) { + options = options || {}; + + if (options.relative === undefined) { + options.relative = false; + } + var resolver = Assets(options); function measure(path, density) { From 89eaeb8fc790b92987981f0943b47056d46ec32d Mon Sep 17 00:00:00 2001 From: Vadym Borodin Date: Mon, 1 Feb 2016 15:54:36 +0200 Subject: [PATCH 5/5] Bump to 4.0.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index dedf1c5..269a415 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "postcss-assets", - "version": "4.0.0", + "version": "4.0.1", "description": "PostCSS plugin to manage assets", "keywords": [ "assets",