All Projects → bananacss → Bananacss

bananacss / Bananacss

Licence: mit
🍌 The brazilian CSS preprocessor writen in NodeJS.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Bananacss

I8086.js
16bit Intel 8086 / 80186 + X87 emulator written in TypeScript with REPL assembly compiler and tiny C compiler
Stars: ✭ 54 (-70.33%)
Mutual labels:  preprocessor
Jus
🍉 An opinionated tool for making static websites with browserify
Stars: ✭ 107 (-41.21%)
Mutual labels:  preprocessor
Video2tfrecord
Easily convert RGB video data (e.g. .avi) to the TensorFlow tfrecords file format for training e.g. a NN in TensorFlow. This implementation allows to limit the number of frames per video to be stored in the tfrecords.
Stars: ✭ 137 (-24.73%)
Mutual labels:  preprocessor
Stylable
Stylable - CSS for components
Stars: ✭ 1,109 (+509.34%)
Mutual labels:  preprocessor
Fypp
Python powered Fortran preprocessor
Stars: ✭ 95 (-47.8%)
Mutual labels:  preprocessor
Surelog
SystemVerilog 2017 Pre-processor, Parser, Elaborator, UHDM Compiler. Provides IEEE Design/TB C/C++ VPI and Python AST API.
Stars: ✭ 116 (-36.26%)
Mutual labels:  preprocessor
Manifold
Manifold plugs into Java to supplement it with powerful features, from Type-safe Metaprogramming (direct access to GraphQL, JSON, XML, etc.), Extension Methods, Operator Overloading, and Unit Expressions to an integrated Template Engine and a Preprocessor. All fully supported in IntelliJ IDEA and Android Studio. Simply add Manifold to your project and begin taking advantage of it.
Stars: ✭ 993 (+445.6%)
Mutual labels:  preprocessor
Kirby Webpack
💪 A Kirby CMS starter-kit with modern frontend tools
Stars: ✭ 150 (-17.58%)
Mutual labels:  preprocessor
Pypreprocessor
A c-style macro preprocessor written in Python
Stars: ✭ 98 (-46.15%)
Mutual labels:  preprocessor
Stylus
Expressive, robust, feature-rich CSS language built for nodejs
Stars: ✭ 10,817 (+5843.41%)
Mutual labels:  preprocessor
Immutable Styles
A library for styling web interfaces with a focus on predictability and robustness. It uses immutability to remove side effects often tied to CSS, allowing UI bugs to be caught ahead of time!
Stars: ✭ 69 (-62.09%)
Mutual labels:  preprocessor
Cessie
Transpile your CSS bundle to support CSS variables, calc, and future CSS for legacy browsers.
Stars: ✭ 81 (-55.49%)
Mutual labels:  preprocessor
Preprocessor
A future-facing CSS preprocessor (used by SUIT CSS)
Stars: ✭ 132 (-27.47%)
Mutual labels:  preprocessor
Cxxctp
DEPRECATED. USE INSTEAD github.com/blockspacer/flextool
Stars: ✭ 58 (-68.13%)
Mutual labels:  preprocessor
Ecsharp
Home of LoycCore, the LES language of Loyc trees, the Enhanced C# parser, the LeMP macro preprocessor, and the LLLPG parser generator.
Stars: ✭ 141 (-22.53%)
Mutual labels:  preprocessor
Solpp
A solidity preprocessor and flattener CLI and library
Stars: ✭ 44 (-75.82%)
Mutual labels:  preprocessor
Java Comment Preprocessor
The Most Powerful Multi-Pass Java Preprocessor
Stars: ✭ 111 (-39.01%)
Mutual labels:  preprocessor
Nymph
🧚 A slightly different version of C.
Stars: ✭ 168 (-7.69%)
Mutual labels:  preprocessor
Stylecow
Modern CSS to all browsers
Stars: ✭ 147 (-19.23%)
Mutual labels:  preprocessor
Jest Vue Preprocessor
Preprocessor that allows importing of .vue files in jest tests
Stars: ✭ 133 (-26.92%)
Mutual labels:  preprocessor

Banana CSS

🍌 The Brazilian CSS superset.

Build Status Coverage Status Dependency Status devDependency Status npm npm

What is?

  • Syntax abstractions for complex native CSS features.
  • If you can, compile native CSS features like a pre-processor (ex: Custom properties and @import).
  • Provide a simple abstraction for a Semantic Grid System with calc().
  • Extra features (ex: @function).

How it works?

Write your style with banana syntax and compile for pure CSS.

Table of contents


How to install

Verify if you have node and npm installed.

Command Line

$ npm install -g bananacss

Module

$ npm install bananacss --save

Command Line Usage

Compile you .bnn file to .css

$ banana <input_path>

Watch for changes.

$ banana <input_path> -w

Output to dir when passing files.

$ banana <input_path> -o <out_path>

Show the project version.

$ banana --version

Show all available commands.

$ banana --help

The bananafile

Create a file called bananafile.json in the directory where you will run the command $ banana and configure as need.

{
	"bnnSize" : true,
	"bnnPosition" : true,
	"bnnGradient" : true,
	"bnnVariable" : true,
	"bnnImport" : true,
	"bnnAlign" : true,
	"bnnWidth" : true,
	"bnnHeight" : true,
	"bnnCol" : true,
	"bnnRow" : true,
	"bnnBox" : true,
	"bnnFunction" : true,
	"compress" : false
}

All features have true as default value, except the compress.


Module Usage

const inputBananaCode = '.a {bnn-size: 50px;}';

// Features injection
const config = {};
config.bnnSize = true;
config.bnnPosition = true;
config.bnnGradient = true;
config.bnnVariable = true;
config.bnnImport = true;
config.bnnAlign = true;
config.bnnWidth = true;
config.bnnHeight = true;
config.bnnCol = true;
config.bnnRow = true;
config.bnnBox = true;
config.bnnFunction = true;
config.compress = true;

const Banana = require('banana')(config);

// Output the css
const output = Banana.render(inputBananaCode);

console.log(output); // .a {width: 50px; height: 50px;}

Features

View all features docs here.


Example

Simple example


Development

Code Style

Follow the Banana NodeJS style guide.

Validate the code style with ESLint:

$ npm run eslint

Code Docs

Generate code docs with JSDocs

$ npm run jsdocs

View code docs in out/index.html

Tests

Run the unit tests with mocha:

$ npm test

Calculate the coverage with Istanbul:

$ npm run cover

Versioning

To keep better organization of releases we follow the Semantic Versioning 2.0.0 guidelines.

Contributing

Find on our issues the next steps of the project ;)
Want to contribute? Follow these recommendations.

History

See Releases for detailed changelog.

License

MIT License © Afonso Pacifer

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].