postcss-jsx

WebJar for postcss-jsx

Лицензия

Лицензия

MIT
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

postcss-jsx
Последняя версия

Последняя версия

0.35.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

postcss-jsx
WebJar for postcss-jsx
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/gucong3000/postcss-jsx

Скачать postcss-jsx

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/postcss-jsx/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>postcss-jsx</artifactId>
    <version>0.35.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/postcss-jsx/
implementation 'org.webjars.npm:postcss-jsx:0.35.0'
// https://jarcasting.com/artifacts/org.webjars.npm/postcss-jsx/
implementation ("org.webjars.npm:postcss-jsx:0.35.0")
'org.webjars.npm:postcss-jsx:jar:0.35.0'
<dependency org="org.webjars.npm" name="postcss-jsx" rev="0.35.0">
  <artifact name="postcss-jsx" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='postcss-jsx', version='0.35.0')
)
libraryDependencies += "org.webjars.npm" % "postcss-jsx" % "0.35.0"
[org.webjars.npm/postcss-jsx "0.35.0"]

Зависимости

compile (2)

Идентификатор библиотеки Тип Версия
org.webjars.npm : babel__core jar [7.1.2,8)
org.webjars.npm : postcss-styled Необязательный jar [0.34.0,)

Модули Проекта

Данный проект не имеет модулей.

PostCSS JSX Syntax

NPM version Travis Travis Codecov David

PostCSS syntax for parsing CSS in JS literals:

Getting Started

First thing's first, install the module:

npm install postcss-syntax postcss-jsx --save-dev

Use Cases

const postcss = require('postcss');
const stylelint = require('stylelint');
const syntax = require('postcss-syntax');
postcss([stylelint({ fix: true })]).process(source, { syntax: syntax }).then(function (result) {
	// An alias for the result.css property. Use it with syntaxes that generate non-CSS output.
	result.content
});

input:

import glm from 'glamorous';
const Component1 = glm.a({
	flexDirectionn: 'row',
	display: 'inline-block',
	color: '#fff',
});

output:

import glm from 'glamorous';
const Component1 = glm.a({
	color: '#fff',
	display: 'inline-block',
	flexDirectionn: 'row',
});

Advanced Use Cases

Add support for more css-in-js package:

const syntax = require('postcss-syntax')({
	"i-css": (index, namespace) => namespace[index + 1] === "addStyles",
	"styled-components": true,
});

See: postcss-syntax

Style Transformations

The main use case of this plugin is to apply PostCSS transformations to CSS code in template literals & styles as object literals.

Версии библиотеки

Версия
0.35.0