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

detective-stylus

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

detective-stylus

Get the dependencies of a Stylus file

  • 2.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.4M
decreased by-7.81%
Maintainers
2
Weekly downloads
 
Created

What is detective-stylus?

The detective-stylus npm package is designed for analyzing Stylus files to find and extract import statements. This can be particularly useful in build tools and bundlers to determine dependencies between stylesheets, allowing for more efficient builds and updates. It parses Stylus syntax to identify `@import` and `@require` statements, enabling developers to programmatically understand dependencies and relationships within their Stylus stylesheets.

What are detective-stylus's main functionalities?

Extract import statements from Stylus files

This feature allows you to pass in a string of Stylus code and returns an array of strings representing the paths of files that are imported or required within that Stylus code. It's particularly useful for build tools that need to track file dependencies.

const detective = require('detective-stylus');
const content = '@import "./mixins.styl"';
const dependencies = detective(content);
console.log(dependencies); // ['./mixins.styl']

Other packages similar to detective-stylus

Keywords

FAQs

Package last updated on 20 Feb 2022

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