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

parata

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

parata

Component based style guide for the web.

  • 0.0.1
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Parata

Component based styles for the web.

Getting Started

Parata is packaged as a grunt plugin. So, make sure you install GruntJS. Parata lets you build re-usable components for the web and generates a component wise styleguide.

Once grunt is installed, follow the steps listed below:

Initialize an empty npm project

$ npm init

Install Parata

$ npm install parata --save

Add Parata to Gruntfile.js

  grunt.initConfig({
    parata: {
      options: {
        stylePreProcessor: 'scss'
      }
    }
  });
  
grunt.loadNpmTasks('parata');

Configure sass / less

  grunt.initConfig({
  parata: {
    options: {
      stylePreProcessor: 'scss'
    }
  },
  sass: {
    dist: {
      files: {
        'dist/app.dist.css': 'components/app.scss'
      }
    }
  }
});

// Load the plugin that provides the "uglify" task.
grunt.loadNpmTasks('parata');

grunt.loadNpmTasks('grunt-contrib-sass');

Initialize Parata

$ grunt parata --init

Create a component

$ grunt parata --component button

Compile sass / less

$ grunt sass

Build components

$ grunt parata --build

Preview your component

$ grunt parata --serve

Navigate to: http://localhost:8888/test/button

Quick example

Open components/button/ in your editor.

Add some styling
/**
  * @component button
  * @description Button.
  * @variants primary | secondary | default
  */

button {
  color: #F5F5F5;
  padding: 10px;
  &:hover {
    cursor: pointer;
  }
  &.primary {
    background: blue;
  }
  &.secondary {
    background: red;
  }
  &.default {
    background: yellow;
  }
}
Import the component to components/app.scss
/**
  * Bootstrap file for all styles
  */

  @import 'button/style'
Create an HTML sample / example for the component in example.html
<example for="button">
<button class="{{ variant }}">{{ variant }}</button>
</example>
Create a javascript snippet for the component in example.html
<script for="button">
alert("Hello I'm a component!");
</script>

FAQs

Package last updated on 19 Jun 2015

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