npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

sdb-dd-styles

v0.0.31

Published

CSS Styles

Downloads

8

Readme

Styles

Styling rules for Aura Design System with SCSS.

Setup

Installation

Install dependencies :

~ npm i

Start

Initiate watcher:

~ npm run start

attention: Make sure your node version is between 14 and 16.

Folder structure

  • settings/variables: files with global $variables.
  • helpers: files with constructors of classes and placeholders.
  • generic: files with generic rules, including definition of custom properties in :root.
  • elements: files with html elements styling.
  • tools: files with additional utilities like @functions.

New files should be prefixed with _[name].scss. New files should be listed on index.scss inside the corresponding folder.

Development

Use the provided index.html to test the results in the browser. Open the file and refresh when making any changes, as livereload is not available.

When adding new styles, ideally, each class should have a correspoding placeholder:

.flex,
%flex {
  display: flex;
}

This assures the system can be use with both.scss, .html and .jsx files.

Transforming

PostCss is set to transform .scss files during build process. To add more plugins and options, check postcss.config.js file.

Commands

Others available commands are:

  • linter: runs the linter.
~ npm run lint
  • fixer: runs linter and fixs possible issues.
~ npm run lint:fix
  • builder: builds the compiled .css files via node-sass.
~ npm run build

For more information about other commands, check the scripts section in package.json file.

Git Committs

When committing any changes, linter runs to make sure code is formatted correctly, via husky and lint-staged. If it throws an error, check the output and make sure to fix the issues.

Distribution

Release

Distribution is done with bitbucket pipelines.

When merging into master branch, the following processes occurr:

  • Installation of dependencies
  • Linting of files
  • Building of compiled files
  • Release of package in npm.js

When pushing into the repository, the first two processes occur.

When creating a pull-request, the first three processes occurr.

It's possible to make a release without bickbucket pipelines by running:

~ npm run release:manual

For more information of all processes check bitbucket-pipelines.yml file.

attention: Make sure to keep all unwanted files from distribution listed on .npmignore file.

attention: When Creating a pull-request, pipelines will trigger two times:

  • branch pipe
  • pull-request pipe

This is a limitation, so the branch pipe can be stopped manually to avoid two pipes running at same time.

Cache

In order to increase the speed of bitbucket pipelines, a cache for node is setup. In case of installating new packages it's good to clean it beforehand, otherwise the install process will not contains the new packages, and the process might fail.

Versioning

It's automaticaly done by standard-version.

After updating package.json inside the pipelines with the [new-version-number], a new commit is created in master branch:

chore(release): 0.0.[new-version-number]

Publishing

It's done with Bitbucket's deploy-to-npm pipe.

Because it's pushing back to the repository it always creates an empty commit to trigger the publish.

After each publish, a new commit is created in master branch:

[skip ci] Trigger from pipelines release step.

attention: Make sure always pull master after each release so the two new commits are available locally.

Usage

Package

Install as a package:

~ npm install sdb-dd-styles --save

Import in your application:

/* styles.scss */

@import 'sdb-dd-styles';

CDN

Compiled version are accessible via the following links:

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/sdb-dd-styles/dist/styles.min.css">

Implementation

Use as an .scss extend:

/** styles.scss */

div {
  @extends %flex;
}

Or CSS class in .html or .jsx:

<!-- index.html -->

<div class="flex"></div>
// index.jsx

<div class="flex"></div>