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

ustyle

Package Overview
Dependencies
Maintainers
3
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ustyle

A living styleguide and pattern library by uSwitch.

  • 1.8.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
13
decreased by-64.86%
Maintainers
3
Weekly downloads
 
Created
Source

ustyle

ustyle unicorn

uStyle, aptly named, is the styleguide gem for uSwitch. Include it in your Rails/Sinatra/Anything project as a gem and forget about those annoying additional cloudfront includes.

This project is provided as is and is aimed at building uSwitch specific projects.

Gem Requirements

  • Sprockets
  • SASS
  • Autoprefixer

Sprockets

uStyle automagically sets itself up in a sprockets context where found. That means both Sinatra and Rails apps get configured correctly. However there are a few gotchas, as we don't want to add gem dependencies that are only required for certain set ups.

Sinatra applications

Add to your Gemfile:

gem 'sprockets'
gem 'sprockets-sass', '~> 1.2.0'
gem 'sprockets-helpers'

Then in your app file (usually named server.rb/app.rb etc), after declaring your class App < Sinatra::Base:

register Sinatra::Ustyle

You must use sprockets-sass version 1.1.0 or above, as there was a bug where the postprocessor was getting added to the preprocessor which caused autoprefixer to break

This is only for the gem, not the styleguide within this project.

Installation

Add this line to your application's Gemfile:

gem 'ustyle', git: "git@github.com:uswitch/ustyle.git"

And then run in your terminal:

$ bundle

Version locking - if you're unsure about when you're going to have the change to upgrade again.

gem 'ustyle', git: "git@github.com:uswitch/ustyle.git", tag: "VERSION"

Usage

If using rails and SASS, just import the base uSwitch styles at the start of your file

@import "ustyle";

This will import the main components. If you want more granular control of what to import, please look at the source code or the styleguide.

Development

Development is done using Grunt, but it's just a thin wrapper around the heavy lifting done by some Node.js modules.

To install development

$ npm install -g grunt-cli
$ npm install
$ bundle

To run in development, just run

grunt

This will open a http://localhost:3000 tab with the styleguide

Documentation

See JAVASCRIPT_STANDARDS.md

Contributing

See CONTRIBUTING.md

Licences

Keywords

FAQs

Package last updated on 18 Oct 2016

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