Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Philipp Partosch 46a936d7de added all files to project 2 years ago
..
LICENSE added all files to project 2 years ago
README.md added all files to project 2 years ago
document.js added all files to project 2 years ago
get-lang.js added all files to project 2 years ago
get-syntax.js added all files to project 2 years ago
index.js added all files to project 2 years ago
load-syntax.js added all files to project 2 years ago
normal-opts.js added all files to project 2 years ago
package.json added all files to project 2 years ago
parse-style.js added all files to project 2 years ago
parse.js added all files to project 2 years ago
parser.js added all files to project 2 years ago
patch-postcss.js added all files to project 2 years ago
processor.js added all files to project 2 years ago
stringify.js added all files to project 2 years ago
syntax.js added all files to project 2 years ago

README.md

PostCSS Syntax

NPM version Travis Travis Codecov David

<img align=“right” width=“95” height=“95”

title="Philosopher’s stone, logo of PostCSS"
src="http://postcss.github.io/postcss/logo.svg">

postcss-syntax can automatically switch the required PostCSS syntax by file extension/source

Getting Started

First thing’s first, install the module:

npm install postcss-syntax --save-dev

If you want support SCSS/SASS/LESS/SugarSS syntax, you need to install these module:

If you want support HTML (and HTML-like)/Markdown/CSS-in-JS file format, you need to install these module:

Use Cases

const postcss = require('postcss');
const syntax = require('postcss-syntax')({
	rules: [
		{
			test: /\.(?:[sx]?html?|[sx]ht|vue|ux|php)$/i,
			extract: 'html',
		},
		{
			test: /\.(?:markdown|md)$/i,
			extract: 'markdown',
		},
		{
			test: /\.(?:m?[jt]sx?|es\d*|pac)$/i,
			extract: 'jsx',
		},
		{
			// custom language for file extension
			test: /\.postcss$/i,
			lang: 'scss'
		},
		{
			// custom language for file extension
			test: /\.customcss$/i,
			lang: 'custom'
		},
	],

	// custom parser for CSS (using `postcss-safe-parser`)
	css: 'postcss-safe-parser',
	// custom parser for SASS (PostCSS-compatible syntax.)
	sass: require('postcss-sass'),
	// custom parser for SCSS (by module name)
	scss: 'postcss-scss',
	// custom parser for LESS (by module path)
	less: './node_modules/postcss-less',
	// custom parser for SugarSS
	sugarss: require('sugarss'),
	// custom parser for custom language
	custom: require('postcss-custom-syntax'),

});
postcss(plugins).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
});