Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@18f/identity-build-sass

Package Overview
Dependencies
Maintainers
11
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@18f/identity-build-sass

Stylesheet compilation utility with reasonable defaults and fast performance.

  • 3.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
343
decreased by-58.67%
Maintainers
11
Weekly downloads
 
Created
Source

@18f/identity-build-sass

Stylesheet compilation utility with reasonable defaults and fast performance.

Why use it?

  • ⚡️ It's fast, since it uses native Dart Sass binary through sass-embedded, and the Rust-based Lightning CSS for autoprefixing and minification.
  • 💻 It includes a CLI, so it's easy to integrate with command-based build pipelines like NPM scripts or Makefile.
  • 🚀 It has relevant defaults, to work out of the box with minimal or no additional configuration.

Default behavior includes:

  • Optimizations enabled based on the NODE_ENV environment variable.
  • Autoprefixer configuration based on the current project's Browserslist configuration.
  • Automatically adds node_modules as a loaded path for Sass compilation.
  • Output filenames derived from the input filenames (main.css.scss becomes main.css).
  • Automatically adds required load paths for @18f/identity-design-system and @uswds/uswds.

Usage

CLI

Invoke the included build-sass executable with the source files and any relevant command flags.

npx build-sass path/to/sass/*.scss

Flags:

  • --out-dir: The output directory
  • --watch: Run in watch mode, recompiling files on change
  • --load-path: Include additional path in Sass path resolution
  • --verbose (-v): Output verbose debugging details

API

buildFile

Compiles a given Sass file.

function buildFile(
  file: string,
  options: {
    outDir: string,
    optimize: boolean,
    sassCompiler: SassAsyncCompiler,
    ...sassOptions: SassOptions<'sync'>,
  },
): Promise<SassCompileResult>;

License

This project is in the public domain within the United States, and copyright and related rights in the work worldwide are waived through the CC0 1.0 Universal public domain dedication.

All contributions to this project will be released under the CC0 dedication. By submitting a pull request or issue, you are agreeing to comply with this waiver of copyright interest.

FAQs

Package last updated on 24 Apr 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc