postcss-js
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -0,1 +1,4 @@ | ||
## 0.1.2 | ||
* Add `cssFloat` alias support. | ||
## 0.1.1 | ||
@@ -2,0 +5,0 @@ * Fix loosing rules in parser on same selector (by Bogdan Chadkin). |
{ | ||
"name": "postcss-js", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "PostCSS for React Inline Styles, Radium, Free Style and other CSS-in-JS", | ||
@@ -17,12 +17,16 @@ "keywords": [ | ||
"dependencies": { | ||
"camelcase-css": "^1.0.0", | ||
"postcss": "^5.0.12" | ||
"camelcase-css": "^1.0.1", | ||
"postcss": "^5.0.17" | ||
}, | ||
"devDependencies": { | ||
"eslint": "1.10.3", | ||
"ava": "0.7.0" | ||
"eslint-config-postcss": "2.0.0", | ||
"eslint": "2.2.0", | ||
"ava": "0.12.0" | ||
}, | ||
"scripts": { | ||
"test": "ava && eslint *.js test/*.js" | ||
}, | ||
"eslintConfig": { | ||
"extends": "eslint-config-postcss/es5" | ||
} | ||
} |
@@ -46,2 +46,4 @@ var postcss = require('postcss'); | ||
if ( name === 'css-float' ) name = 'float'; | ||
parent.push(postcss.decl({ prop: name, value: value })); | ||
@@ -48,0 +50,0 @@ } |
@@ -100,1 +100,34 @@ # PostCSS JS [![Build Status][ci-img]][ci] | ||
Convert PostCSS `Root` instance to CSS-in-JS style object. | ||
## Troubleshoot | ||
Webpack may need some extra config for some PostCSS plugins. | ||
### `Module parse failed` | ||
Autoprefixer and some other plugins | ||
need a [json-loader](https://github.com/webpack/json-loader) to import data. | ||
So, please install this loader and add to webpack config: | ||
```js | ||
loaders: [ | ||
{ | ||
test: /\.json$/, | ||
loader: "json-loader" | ||
} | ||
] | ||
``` | ||
### `Cannot resolve module 'fs'` | ||
By default, webpack resolve system node.js modules to empty file. | ||
But `node` option in webpack config can disable it. | ||
If it is your case, please add to webpack config: | ||
```js | ||
node: { | ||
fs: "empty" | ||
} | ||
``` |
@@ -46,2 +46,7 @@ import postcss from 'postcss'; | ||
test('supports cssFloat', t => { | ||
let root = postcssJS.parse({ cssFloat: 'left' }); | ||
t.same(root.toString(), 'float: left'); | ||
}); | ||
test('adds pixels', t => { | ||
@@ -48,0 +53,0 @@ let root = postcssJS.parse({ a: 2 }); |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
334
133
0
15871
3
15
Updatedcamelcase-css@^1.0.1
Updatedpostcss@^5.0.17