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

@afiniti/design-system

v1.1.2

Published

To test our package locally in any project please follow these steps.

Downloads

64

Readme

@afiniti/design-system

Test Package Locally

To test our package locally in any project please follow these steps.

  1. navigate to root directory of design-system
  2. run compile command: run npm compile
  3. run link command: npm link this will create a symlink to our node_modules
  4. navigate to desire project and run npm link "@afiniti/design-system" this will connect with symlink node_module

Now you are able to test the package into any npm project available locally

  • simply navigate to any component and import components from library

For Example:

  import {BackCta} from '@afiniti/afiniti-design-system/dist/Buttons'

  <BackCta path="/" theme={theme} text="Global Leaders" />

SCSS Classes and Variables

The documentation for the exported SCSS variables and global classes are available here:

Publish Package

Note: to publish private package you are required to login with paid account / or set the appropriate access token.

  1. rename package.json to package.json.web
  2. rename package.json.lib to package.json
  3. increment version number in package.json
  4. run command npm run compile from project root to ensure successful build
  5. run command npm publish to release new package version to npm

Project setup with design-system

  • npm install @afiniti/design-system

  • Setup scss structure with partials and globals using the styles located in @afiniti/design-system/dist/styles

    • Each partial file in your scss structure should import its corresponding file from the design system.
    • Your base.scss file should import all your partials.
    • Your app.scss file should then import all global scss and base.scss
    • A sample of these files would look like this:
    • _colors.scss:
          @import '~@afiniti/design-system/dist/styles/partials/colors.scss';
          // your project specific variables here
          $textColorSecondary: $secondaryColor;
          $backgroundColorSecondary: $secondaryColor;
    • _base.scss:
        @import '~@afiniti/design-system/dist/styles/base/base';
        @import '../partials/colors';
        @import '../partials/variables';
        @import '../partials/_mixins';
        @import '../partials/extends';
    • default.scss:
        @import './base';
        @import '~@afiniti/design-system/dist/styles/base/default.scss';
    • app.scss:
        @import 'styles/base/base';
        @import 'styles/base/reset';
        @import 'styles/base/default';
        @import 'styles/base/global';
    • Your final scss structure should look like this:
      • /styles
        • /base
          • base.scss
          • default.scss
          • global.scss
          • reset.scss
        • /partials
          • _colors.scss
          • _extends.scss
          • _mixins.scss
          • _variables.scss
        • /utilities
          • utility1.scss
          • utility2.scss
        • app.scss
  • Add AppContext for header and navigation

    • The header and navigation components require an AppContext with a reducer to receive actions to function correctly. You may copy and modify the context file used in this project here.