Gonzales PE – CSS parser with preprocessor support

Gonzales PE is a CSS parser with support for stylesheet preprocessor syntax. It recognises ordinary CSS as well as SCSS, Sass and Less, allowing applications to examine several related stylesheet languages through a common parsing interface.

The parser converts source code into a structured syntax tree containing nodes for the recognised constructs. Applications can traverse and modify these nodes before producing updated stylesheet text. This makes Gonzales PE useful for applications that need to analyse or rewrite preprocessor source without first converting it into ordinary CSS.

The library provides methods for working with individual syntax-tree nodes. Nodes can be created, inspected, inserted or removed, while the resulting structure can be converted back into source text. The parser accepts options that determine which stylesheet syntax should be recognised. It can also parse selected syntax contexts rather than requiring every input to represent a complete stylesheet.

This is free and open source software.

Key Features

  • Parses CSS, SCSS, Sass and Less source code.
  • Converts source text into structured syntax trees.
  • Provides APIs for inspecting and manipulating individual nodes.
  • Supports inserting and removing syntax-tree nodes.
  • Allows developers to create new nodes programmatically.
  • Provides configurable parsing of different stylesheet syntaxes.
  • Supports parsing selected syntax contexts.
  • Includes methods for traversing and searching syntax trees.
  • Serialises modified syntax trees back into stylesheet text.

Website: github.com/tonyganch/gonzales-pe
Support:
Developer: Sergey Kryzhanovsky and contributors
License: MIT License

Gonzales PE is written in JavaScript and CSS. Learn JavaScript with our recommended free books and free tutorials. Learn CSS with our recommended free books and free tutorials.


Related Software

CSS Parsers
PostCSSTransform styles with JavaScript plugins
Lightning CSSParser, transformer, bundler, and minifier
ReworkPlugin framework for CSS preprocessing
PHP CSS ParserPHP library for reading CSS
MenschNon-validating CSS parser
CSSTreeTool set for CSS
StylisLightweight CSS preprocessor
tinycss2CSS parser and generator
ParseGo library offering lexers, parsers, and parsing utilities
LibCSSCSS parser and selection engine
Ruby CSS ParserLoad, parse and cascade CSS rule sets
ParserLibCSS3 SAX-inspired parser
css-parserFork of the cssutils project
ph-cssParse, represent, modify, and write CSS stylesheets
StylecowModern CSS to all browsers
Gonzales PECSS parser which plays nicely with preprocessors
CSSOMCSS parser written in pure JavaScript

Read our verdict in the software roundup.


Best Free and Open Source Software LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of recommended applications, including alternatives to popular proprietary software.

We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our Linux resources to discover more.

Know a useful free and open source Linux application we haven't covered? Suggest a program for inclusion.

Has your software been featured on LinuxLinks? Display one of our Featured on LinuxLinks badges on your website or GitHub README.
Subscribe

Please read our Comment Policy before commenting.

Notify of
guest
0 Comments
Oldest
Newest Most Voted