New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

responsive-components

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

responsive-components

Organised responsive components system in less

latest
Source
npmnpm
Version
1.1.5
Version published
Maintainers
1
Created
Source

responsive-components

Organised responsive components system in less for node.

Installation

  npm install responsive-components

Usage

using an configuration object

var responsive = require('responsive-components');
var config = {
    path:"Styles",
    output:"components.less",
    components : [
        "base",
        "button"
    ],
    pattern : "Views/**/Components/*/",
    platforms : {
        base:{},
        mobile:{max:"600px"},
        tablet:{min:"601px", max:"1000px"},
        tabletVertical:{min:"601px", max:"1000px",query:"orientation:vertical"},
        big:{min:"1001px"},
        print:{media:"print"}
    }
}

responsive.update(config);

using an external file

responsive.update("Styles/mycomponents.json"); // using custom path
responsive.update(); // will try to find "components.config.json" in the current directory

Configuration

Config Reference

NameRequiredTypeDescriptionDefaultExample
pathfalsestringthe relative path.Styles"Styles"
outputfalsestringthe final output file name.components.less"output.less"
componentstruestring[]the list of component names.[ ]["base", "button" ]
patterntruestringfolder pattern to discover components"Views/**/Components/*/"
platformstrue{key:string, platform:object}the list of platforms as described bellow.{ base:{}, tablet:{min:"601px", max:"1000px"}}

Platform Reference

The platform object supports the following attributes :

NameTypeDescriptionExample
minstringthe minimum width"700px"
maxstringthe maximum width"1024px"
orientationstringthe platform orientation"vertical"
querystringadditional query"-webkit-min-device-pixel-ratio:2"
mediastringthe platform's media. Defaults to "screen"."print"

Release History

  • 1.0.0 Initial release
  • 1.0.1 Cleanup debugging functions
  • 1.0.2 Proper module exports
  • 1.0.3 Fix function naming and namespace in less
  • 1.0.4 Add dependencies in package
  • 1.0.5 Add media for platform
  • 1.0.6 Now accepts path and defaults to components.config.json

Keywords

less

FAQs

Package last updated on 15 Dec 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