1
0
mirror of https://github.com/deuill/fawkss.git synced 2024-09-27 19:52:43 +00:00
Fawkss is a CSS preprocessor for people who dislike CSS preprocessors
Go to file
Alex Palaistras 984c36cc2d Add initial version of @include declaration support
This adds support for SASS-style `@import` declarations, for transparently
including external `.scss` files in the resulting markup. File names are
resolved as per the rules set by SASS (i.e. importing a file named
"include/common" will search for "_common.scss" as well as "common.scss").

The entire source code had to be restructured around the idea of having to
switch the file context transparently, and is now based around double `while`
loops, one for checking the current context and the other for checking the
current line via `getline`.

The included test-suite may need some cleaning up, and the source code most
definitely will. More to come.
2016-03-17 00:10:24 +00:00
tests Add initial version of @include declaration support 2016-03-17 00:10:24 +00:00
.editorconfig Change tagline, fix comments 2016-03-09 22:36:57 +00:00
fawkss Add initial version of @include declaration support 2016-03-17 00:10:24 +00:00
LICENSE Add LICENSE and README files 2016-02-28 19:31:00 +00:00
Makefile Makefile: Simplify make help command. 2016-03-16 21:43:17 +00:00
README.md Change tagline, fix comments 2016-03-09 22:36:57 +00:00

Fawkss — The [ig]noble CSS preprocessor MIT License

Fawkss [fɔːks] is a simple CSS preprocessor built as a single AWK (nawk/gawk/mawk) script. Syntactically, it borrows as much as possible from the SASS language, for convenience and familiarity.

This is more of a fun project than a production-ready piece of software, though it may find some use for people needing simple additions to CSS without pulling in the massive ecosystem that comes with Less.js/SASS etc.

Status

Currently, the following features are implemented:

  • C99/C++-style comments (i.e. // This is a comment)
  • Variables

A full test-suite is provided (depending only on make and awk), which should serve as a good example of the existing feature-set.

Roadmap

It is intended that the script never balloons to more than ~1000 lines of code. I'm trying to tackle the most important features yet and see how well they fit within the AWK mindset.

That being said, I do not plan to implement any context-sensitive functionality (such as nesting etc.), which may be nigh-impossible in AWK anyways. Consider it a feature.

Testing & Documentation

A Makefile is provided for running tests and producing documentation for Fawkss. Run make help in the project root for more information.

Are you kidding me?

Nope. I wouldn't suggest you actually use this for anything, though.

License

All code in this repository is covered by the terms of the MIT License, the full text of which can be found in the LICENSE file.