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

styled-jsx-plugin-postcss

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

styled-jsx-plugin-postcss - npm Package Compare versions

Comparing version 0.1.3 to 1.0.0

postcss.config.js

13

package.json
{
"name": "styled-jsx-plugin-postcss",
"version": "0.1.3",
"version": "1.0.0",
"description": "Plugin to add PostCSS support to styled-jsx",

@@ -25,12 +25,13 @@ "main": "index.js",

"dependencies": {
"deasync": "^0.1.12",
"postcss": "^6.0.13",
"deasync": "^0.1.13",
"postcss": "^7.0.2",
"postcss-load-plugins": "^2.3.0"
},
"devDependencies": {
"mocha": "^4.0.1",
"postcss-cssnext": "^3.0.2",
"mocha": "^5.2.0",
"postcss-easy-import": "^3.0.0",
"postcss-nested": "^2.1.2"
"postcss-nested": "^4.1.0",
"postcss-preset-env": "^6.0.10",
"postcss-spiffing": "^0.1.0"
}
}

@@ -5,13 +5,16 @@ const assert = require('assert')

describe('styled-jsx-plugin-postcss', () => {
it('applies plugins', () => {
it('applies browser list and preset-env features', () => {
assert.equal(
plugin('p { img { display: block} color: color(red a(90%)) }'),
'p { color: rgba(255, 0, 0, 0.9); } p img { display: block}'
plugin('p { color: color-mod(red alpha(90%)); & img { display: block } }'),
'p { color: rgba(255, 0, 0, 0.9) }\np img { display: block }'
)
})
it('applies plugins', () => {
assert.equal(plugin('p { background-colour: grey; }'), 'p { background-color: gray; }')
})
it('works with placeholders', () => {
assert.equal(
plugin('p { img { display: block } color: %%styled-jsx-placeholder-0%%; } %%styled-jsx-placeholder-1%%'),
'p { color: %%styled-jsx-placeholder-0%%; } p img { display: block } %%styled-jsx-placeholder-1%%'
plugin('p { color: %%styled-jsx-placeholder-0%%; & img { display: block; } } %%styled-jsx-placeholder-1%%'), 'p { color: %%styled-jsx-placeholder-0%% } p img { display: block; } %%styled-jsx-placeholder-1%%'
)

@@ -18,0 +21,0 @@ })

Sorry, the diff of this file is not supported yet

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