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

larvitcss

Package Overview
Dependencies
Maintainers
0
Versions
140
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

larvitcss

Used to compile, minify, autoprefix etc CSS to remove the need to precompile css

  • 0.7.119
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

Build Status

larvitcss

Compile, minify, autoprefix etc css from a folder. This module is designed to remove the need to precomile css.

Uncompiled files, like .scss, .sass, .less, .stylus etc overrides precompiled .css files with a conflicting name.

The callback is always called, and req.finished is set to true when no file is found.

Installation

npm i larvitcss;

Usage

For usage as middleware in for instance Express or larvitbase:

const larvitcss = require('larvitcss');
const { Log } = require('larvitutils');
const express = require('express');
const app = express();

app.use(larvitcss({
	log: new Log(), // Optional
	basePath: 'my_path/public', // Optional, defaults to "public/" under current process path,
	notFoundController: (req, res) => { // Optional, controller for file not found, default to setting 404 status code.
		res.statusCode = 404;
		res.end('File not found from special controller');
	},
}));

const larvitcss = require('larvitcss');
const { Log } = require('larvitutils');
const LBase = require('larvitbase');
const lBase = new LBase({middlewares: [larvitcss()]});

Development mode

Set environment variable LARVITCSS_NO_CACHE to disable cache

Changelog

0.6.0

  • Removed larvitfs functionality. basePath is not specified instead and larvitcss is used as a middleware.

Keywords

FAQs

Package last updated on 14 Oct 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