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

stylus-import-tree

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stylus-import-tree

This plugin allows you to recursively import entire directories instead of writing bunch of `@import` statements in your stylus file:

  • 0.1.6
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

stylus-import-tree

This plugin allows you to recursively import entire directories instead of writing bunch of @import statements in your stylus file:

import_tree('./foobar')

// insted of:
// @import 'foobar/a'
// @import 'foobar/b'
// @import 'foobar/c/d'

Import order

Files will be imported in alphabetical order based on filename. To import the files in a specific order you can either name them accordingly, use this plugin in conjunction with a build tool such as Grunt, or import them separately:

@import 'variables'
@import 'base'

import_tree('./modules')

Setup

You can setup this plugin using define

Standalone

importTree = require 'stylus-import-tree'

stylus(str)
.define("import_tree", importTree)
.render (err, css) ->
  throw err if err
  console.log css

Grunt

grunt.initConfig
  stylus:
    dist:
      options:
        define:
          import_tree: require 'stylus-import-tree'
      files:
        'tmp/assets/styles/app.css': ['app/styles/app.styl']

Credit

This is a fork of Style import_tree Proof of Concept by Aleksey V. Zapparov.

License

MIT

Keywords

FAQs

Package last updated on 16 Aug 2013

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