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

@prima-assicurazioni/pyxis-npm

v3.0.1

Published

Pyxis SASS provided by a simple NPM package

Downloads

520

Readme

PYXIS-NPM

Pyxis-NPM is the standard way to integrate the Pyxis Design System into your project @Prima.

To use it in your project as an npm dependency:

  1. ask the maintainers or devops to add you to the prima-assicurazioni organization on npm
  2. once your invitation is accepted, you can login on your machine by typing npm login
  3. then you can simply use pyxis-npm as dependency via npm install @prima-assicurazioni/pyxis-npm

npm npm

Pyxis:

Costellazione della bussola alt text

Project Structure

  • Pyxis is structured with BEM in mind. From a main root entry point (pyxis.scss) 4 partials _root.scss are imported: base, atoms, molecules and organisms
  • Order is important since all pyxis partials are built depending on mixins, functions and variables declared in 01_base.

How to include Pyxis in your project

Including Pyxis as pre-built CSS

Not recommended.

Copy the contents of the dist folder into your project's assets. It contains a build of the whole pyxis design system, built with a high polyfill load, with the following browserlist configuration:

> 0.05%
ie 10-11

Including Pyxis as SASS or building your Pyxis Theme

To include pyxis as sass you can simply import pyxis.scss from your application's sass entry point.

Depending on your transpiler's configuration you may first need to redefine the $fontPath variable, making it point to the pyxis-npm fonts folder. This variable is used to resolve file imports of fonts with a relative path that depends on your configuration. Remember that usually, in sass transpilers, paths are relative to the main entry point, not to specific partials.

Build your Pyxis theme

If you need to customise Pyxis, try to respect its folder structure.

E.g. if you need to tune up variables without importing the whole 01_base partials list

  • Create a folder with the same name of the part that will change (eg 01_base since variables are there)
  • Copy and paste 01_base/_root.scss partial from pyxis-npm in your project/01_base that you've created before
  • Comment partials imports that you don't want to use
  • Create a new _variables.scss file, redefine all the variables you need and at the end import the original pyxis-npm variables partial (fix relative paths to point at package partials)
  • In your 01_base/_root import your variables partial
  • In your app.scss entry point copy the import structure of pyxis.scss changing 01_base/_root with the one you've defined before (fix relative paths to point at package partials)
@import "01_base/_root",
  // Local redefinition
  "pyxis-npm/scss/02_atoms/_root", // Original pyxis-npm partials
  "pyxis-npm/scss/03_molecules/_root", "pyxis-npm/scss/04_organisms/_root";

Build Pyxis on your machine

Pyxis-NPM ships out with a fully configured transpiler, so you can build your pyxis.css and serve it locally:

yarn build:dev

Or (minified without source maps):

yarn build:prod

Testing

After installing, you can browse pyxis examples by launching a webpack dev server in watch mode on your machine:

yarn serve

Example files are stored in src/test/. Their pages are reachable @ http://localhost:8080/test/myTestFile.html .

Visual regression testing

Recently and automated visual regression testing suite has been added to Pyxis, in the playwright/ folder. Its README contains up-to-date info on how to perform automated tests on Pyxis examples, using multiple browsers at multiple screen sizes.

Copyright and license

Code copyright 2019 PrimaIT. Code released under the ICS license.