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

grunt-dependent-styles

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-dependent-styles

Get all nested imported files from passed SCSS

  • 0.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

grunt-dependent-styles Build Status

Get all nested imported files from passed SCSS

Getting Started

This plugin requires Grunt ~0.4.0

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-dependent-styles --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-dependent-styles');

Usage

The result, which contains dependent style files, will be placed into grunt.config at dependentStyles.result section. If namespace is provided - it will be appended to path string: dependentStyles.result.theNamespace.

You can pass found style files to the next grunt task, using Grunt template string <%= dependentStyles.result %>.

Useful, when you need to

grunt.initConfig({
  dependentStyles: {
    all: {
      options: {
        namespace: 'custom' // provide custom namespace        
      },
      src: './**/*.scss'
    },
    your_target: {
      src: './target.scss' // here will be default namespace called the same like task - your_target
    }
  },
  
  postcss: {
    all: {
      src: ['<%= dependentStyles.result.all %>'],
      options: {
        processors: [
          stylelint()
        ]
      } 
    },
    your_target: {
      src: ['<%= dependentStyles.result.your_target %>'],
      options: {
        processors: [
          stylelint()
        ]
      }
    }
  }
});

grunt.registerTask('css', ['dependentStyles:your_target', 'postcss:your_target']);

Options

options.namespace

Type: String Default value: name of the task (target)

Dependent styles result object namespace.

options.skipPartials

Type: Boolean Default value: true

Skip styles which name starts with leading underscore.

options.styleOpts

Type: Object Default value: {}

Options for sass-graph plugin.

Keywords

FAQs

Package last updated on 22 Jun 2017

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