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

postcss-js

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-js - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

3

CHANGELOG.md

@@ -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).

14

package.json
{
"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 });

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