Git Product home page Git Product logo

rules_postcss's Introduction

Build status

PostCSS Rules for Bazel

Rules

  • postcss_binary
  • postcss_multi_binary
  • postcss_plugin
  • autoprefixer

Overview

These build rules are used for post-processing CSS files via PostCSS with Bazel.

Setup

Using npm and Node.js rules

We recommend you use npm to install the PostCSS build rules if you use the Node.js build rules, and strongly recommend using npm if you also depend or plan to depend on PostCSS in your local package.json. (For example, if PostCSS plugin(s) will form part of your repository's build pipeline.)

Installing the PostCSS build rules via npm allows you to rely on its native package management functionality. If you depend on PostCSS in your local package.json, using npm also helps avoid version skew between PostCSS in your repository and these build rules.

Add the @bazel/postcss npm package to your devDependencies in package.json.

Your WORKSPACE should declare a yarn_install or npm_install rule named npm. See https://github.com/bazelbuild/rules_nodejs/#quickstart

This causes the build rules to be made available under @npm//@bazel/postcss:index.bzl.

TODO: Compare to using PostCSS directly using rules_nodejs.

Using repository rules

Add the following to your WORKSPACE file to add the external repositories for PostCSS, making sure to use the latest published versions:

http_archive(
    name = "build_bazel_rules_postcss",
    # Make sure to check for the latest version when you install
    url = "https://github.com/bazelbuild/rules_postcss/archive/0.5.0.tar.gz",
    strip_prefix = "rules_postcss-0.5.0",
    sha256 = "3f0c754f97e3940ea90f4d6408bfb2aefb3850e7941572b22b1b88579c428ff9",
)

This causes the build rules to be made available under @build_bazel_rules_postcss//:index.bzl.

Basic Example

To be documented.

rules_postcss's People

Contributors

davidmorgan avatar dependabot[bot] avatar nex3 avatar rzhw avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.