From e34f7caed91cff89d2930ffbf72bfcb55fb96013 Mon Sep 17 00:00:00 2001 From: Bogdan Chadkin Date: Sat, 20 May 2017 22:58:18 +0300 Subject: [PATCH 1/3] Upgrade postcss6 --- .travis.yml | 5 ++--- package.json | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index e3f74af..7a4a137 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,8 @@ -sudo: false language: node_js node_js: - - "0.12" - "4" - - "5" + - "6" + - "node" script: npm run travis before_install: diff --git a/package.json b/package.json index 3ae4c3c..2ddd81f 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ }, "dependencies": { "icss-replace-symbols": "^1.0.2", - "postcss": "^5.0.14" + "postcss": "^6.0.1" }, "babel": { "presets": [ From b47db661674c22068713ec751386252446637f81 Mon Sep 17 00:00:00 2001 From: Bogdan Chadkin Date: Sat, 20 May 2017 22:59:55 +0300 Subject: [PATCH 2/3] Fix package.json links --- package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 2ddd81f..67f07de 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "postcss-modules-values", "version": "1.2.2", - "description": "PostCSS plugin for CSS Modules to pass arbitrary constants between your module files", + "description": "PostCSS plugin for CSS Modules to pass arbitrary values between your module files", "main": "lib/index.js", "scripts": { "lint": "standard src test", @@ -14,7 +14,7 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/css-modules/postcss-modules-constants.git" + "url": "git+https://github.com/css-modules/postcss-modules-values.git" }, "keywords": [ "css", @@ -24,9 +24,9 @@ "author": "Glen Maddern", "license": "ISC", "bugs": { - "url": "https://github.com/css-modules/postcss-modules-constants/issues" + "url": "https://github.com/css-modules/postcss-modules-values/issues" }, - "homepage": "https://github.com/css-modules/postcss-modules-constants#readme", + "homepage": "https://github.com/css-modules/postcss-modules-values#readme", "devDependencies": { "babel-cli": "^6.5.2", "babel-core": "^6.5.2", From 5e5a4ac0dcb22fea7cd0a4feba9aadc37a422a99 Mon Sep 17 00:00:00 2001 From: Bogdan Chadkin Date: Sat, 20 May 2017 23:01:40 +0300 Subject: [PATCH 3/3] Wrap plugin with postcss.plugin API --- src/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index c84c221..3ca6195 100644 --- a/src/index.js +++ b/src/index.js @@ -8,7 +8,7 @@ let options = {} let importIndex = 0 let createImportedName = options && options.createImportedName || ((importName/*, path*/) => `i__const_${importName.replace(/\W/g, '_')}_${importIndex++}`) -export default (css, result) => { +export default postcss.plugin('postcss-modules-values', () => (css, result) => { let importAliases = [] let definitions = {} @@ -97,4 +97,4 @@ export default (css, result) => { css.prepend(importRule) }) -} +})