Skip to content

rivethealth/rules_css

Repository files navigation

rules_css

Bazel rules for CSS, SASS, and related technologies.

Priorities

  1. Flexibility and extensibility
  2. Performance
  3. Bazel idioms
  4. Clear factorization

Features

  • languages
    • SASS
  • dev
    • Stardoc
    • CI

Example

package.json

{}

lib.scss

button { border: 1px solid red; }

styles.scss

@import "lib"; body { margin: 0; }

BUILD.bazel

load("@better_rules_css//sass:rules.bzl", "sass_bundle", "sass_library") load("@better_rules_javascript//commonjs:rules.bzl", "cjs_root") # SASS bundle sass_bundle( compiler = "//:sassc", dep = ":styles", main = "styles.scss", name = "css", ) # SASS library sass_library( name = "lib", root = ":root", srcs = ["lib.scss"], ) # package root cjs_root( descriptors = ["package.json"], name = "root", package_name = "example", ) # SASS library sass_library( deps = [":lib"], name = "styles", root = ":root", srcs = ["styles.scss"], out = "styles.css", )

Running

bazel build :css cat bazel-bin/styles.css

outputs

button { border: 1px solid red; } body { margin: 0; }

Documentation

Topics

SASS

Stardoc

See auto-generated Stardoc documentation.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors