{"id":13624553,"url":"https://github.com/bananacss/bananacss","last_synced_at":"2025-04-16T00:32:39.830Z","repository":{"id":46308769,"uuid":"62778136","full_name":"bananacss/bananacss","owner":"bananacss","description":":banana: The brazilian CSS preprocessor writen in NodeJS.","archived":false,"fork":false,"pushed_at":"2021-10-31T17:21:56.000Z","size":671,"stargazers_count":180,"open_issues_count":8,"forks_count":16,"subscribers_count":17,"default_branch":"master","last_synced_at":"2024-10-02T15:37:25.602Z","etag":null,"topics":["abstractions","banana","css","hacktoberfest","hacktoberfest2021","nodejs","preprocessor","superset"],"latest_commit_sha":null,"homepage":"http://bananacss.github.io/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bananacss.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-07-07T05:42:20.000Z","updated_at":"2024-09-20T07:13:41.000Z","dependencies_parsed_at":"2022-08-28T19:00:17.820Z","dependency_job_id":null,"html_url":"https://github.com/bananacss/bananacss","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bananacss%2Fbananacss","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bananacss%2Fbananacss/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bananacss%2Fbananacss/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bananacss%2Fbananacss/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bananacss","download_url":"https://codeload.github.com/bananacss/bananacss/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223691652,"owners_count":17186862,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["abstractions","banana","css","hacktoberfest","hacktoberfest2021","nodejs","preprocessor","superset"],"created_at":"2024-08-01T21:01:43.705Z","updated_at":"2024-11-08T13:30:40.857Z","avatar_url":"https://github.com/bananacss.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","Uncategorized"],"sub_categories":["Uncategorized"],"readme":"# Banana CSS\n\n\u003e :banana: The Brazilian CSS superset.\n\n[![Build Status](https://travis-ci.org/bananacss/bananacss.svg?branch=master)](https://travis-ci.org/bananacss/bananacss)\n[![Coverage Status](https://coveralls.io/repos/github/bananacss/bananacss/badge.svg?branch=master)](https://coveralls.io/github/bananacss/bananacss?branch=master)\n[![Dependency Status](https://david-dm.org/bananacss/bananacss.svg)](https://david-dm.org/bananacss/bananacss)\n[![devDependency Status](https://david-dm.org/bananacss/bananacss/dev-status.svg)](https://david-dm.org/bananacss/bananacss#info=devDependencies)\n[![npm](https://img.shields.io/npm/v/bananacss.svg)](https://www.npmjs.com/package/bananacss)\n[![npm](https://img.shields.io/npm/dt/bananacss.svg)](https://www.npmjs.com/package/bananacss)\n\n## What is?\n\n- Syntax **abstractions** for complex native CSS features.\n- If you can, compile native CSS features like a **pre-processor** (ex: Custom properties and @import).\n- Provide a simple abstraction for a **Semantic Grid System** with calc().\n- **Extra** features (ex: **@function**).\n\n## How it works?\n\n![Write your style with banana syntax and compile for pure CSS.](docs/img/bnn-align.gif)\n\n## Table of contents\n\n- [How to install](#how-to-install)\n- [Command Line Usage](#command-line-usage)\n- [The bananafile.json](#the-bananafile)\n- [Module Usage](#module-usage)\n- [Features](#features)\n- [Example](#example)\n- [Development](#development)\n  - [Code Style](#code-style)\n  - [Code Docs](#code-docs)\n  - [Tests](#tests)\n- [Versioning](#versioning)\n- [Contributing](#contributing)\n- [History](#history)\n- [License](#license)\n\n\u003chr\u003e\n\n## How to install\n\nVerify if you have [node](http://nodejs.org/) and [npm](https://www.npmjs.org/) installed.\n\n### Command Line\n\n```sh\n$ npm install -g bananacss\n```\n\n### Module\n\n```sh\n$ npm install bananacss --save\n```\n\n\u003chr\u003e\n\n## Command Line Usage\n\n*Compile you .bnn file to .css*\n\n```sh\n$ banana \u003cinput_path\u003e\n```\n\n*Watch for changes.*\n\n```sh\n$ banana \u003cinput_path\u003e -w\n```\n\n*Output to dir when passing files.*\n\n```sh\n$ banana \u003cinput_path\u003e -o \u003cout_path\u003e\n```\n\n*Show the project version.*\n\n```sh\n$ banana --version\n```\n\n*Show all available commands.*\n\n```sh\n$ banana --help\n```\n\n\u003chr\u003e\n\n## The bananafile\n\nCreate a file called `bananafile.json` in the directory where you will run the command `$ banana` and configure as need.\n\n```json\n{\n\t\"bnnSize\" : true,\n\t\"bnnPosition\" : true,\n\t\"bnnGradient\" : true,\n\t\"bnnVariable\" : true,\n\t\"bnnImport\" : true,\n\t\"bnnAlign\" : true,\n\t\"bnnWidth\" : true,\n\t\"bnnHeight\" : true,\n\t\"bnnCol\" : true,\n\t\"bnnRow\" : true,\n\t\"bnnBox\" : true,\n\t\"bnnFunction\" : true,\n\t\"compress\" : false\n}\n```\n\n*All features have `true` as default value, except the `compress`.*\n\n\u003chr\u003e\n\n## Module Usage\n\n```js\nconst inputBananaCode = '.a {bnn-size: 50px;}';\n\n// Features injection\nconst config = {};\nconfig.bnnSize = true;\nconfig.bnnPosition = true;\nconfig.bnnGradient = true;\nconfig.bnnVariable = true;\nconfig.bnnImport = true;\nconfig.bnnAlign = true;\nconfig.bnnWidth = true;\nconfig.bnnHeight = true;\nconfig.bnnCol = true;\nconfig.bnnRow = true;\nconfig.bnnBox = true;\nconfig.bnnFunction = true;\nconfig.compress = true;\n\nconst Banana = require('banana')(config);\n\n// Output the css\nconst output = Banana.render(inputBananaCode);\n\nconsole.log(output); // .a {width: 50px; height: 50px;}\n```\n\n\u003chr\u003e\n\n## Features\n\n- [bnn-size](docs/bnn-size.md) property.\n- [bnn-position](docs/bnn-position.md) property.\n- [bnn-gradient](docs/bnn-gradient.md) property.\n- [bnn-align](docs/bnn-align.md) property.\n- [bnn-width](docs/bnn-width.md) property.\n- [bnn-height](docs/bnn-height.md) property.\n- Intuitive box model with [bnn-box](docs/bnn-box.md) property and inside/outside values.\n- Customizable [Grid System](docs/grid-system.md) with `bnn-row` and `bnn-col`.\n- [Module Bundler](docs/module-bundler.md) with native `@import` syntax.\n- Global [variables](docs/variables.md) with native custom properties syntax.\n- Create reusable functions with [@function](docs/functions.md).\n- Configure your build with [bananafile.json](the-bananafile).\n- Minify/Compress the generated CSS.\n\nView all [features docs here](docs/index.md).\n\n\u003chr\u003e\n\n## Example\n\n![Simple example](docs/img/ex.gif)\n\n\u003chr\u003e\n\n## Development\n\n### Code Style\n\nFollow the [Banana NodeJS style guide](https://github.com/bananacss/banana-style-guide).\n\n*Validate the code style with [ESLint](http://eslint.org/):*\n```sh\n$ npm run eslint\n```\n\n### Code Docs\n\n*Generate code docs with [JSDocs](http://usejsdoc.org/)*\n```sh\n$ npm run jsdocs\n```\n\nView code docs in `out/index.html`\n\n### Tests\n\n*Run the unit tests with [mocha](https://mochajs.org/):*\n```sh\n$ npm test\n```\n\n*Calculate the coverage with [Istanbul](https://gotwarlost.github.io/istanbul/):*\n```sh\n$ npm run cover\n```\n\n\u003chr\u003e\n\n## Versioning\n\nTo keep better organization of releases we follow the [Semantic Versioning 2.0.0](http://semver.org/) guidelines.\n\n## Contributing\n\nFind on our [issues](https://github.com/bananacss/bananacss/issues/) the next steps of the project ;)\n\u003cbr\u003e\nWant to contribute? [Follow these recommendations](https://github.com/bananacss/bananacss/blob/master/CONTRIBUTING.md).\n\n## History\n\nSee [Releases](https://github.com/bananacss/bananacss/releases) for detailed changelog.\n\n## License\n\n[MIT License](https://github.com/bananacss/bananacss/blob/master/LICENSE.md) © [Afonso Pacifer](http://afonsopacifer.com/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbananacss%2Fbananacss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbananacss%2Fbananacss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbananacss%2Fbananacss/lists"}