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

@appartmint/n4v

v0.8.10

Published

Navigation 4 Virtuosos - Accessible, Responsive Navbars

Downloads

30

Readme

n4v - An accessible, responsive navbar library

Hosting

Development

Getting Started

  1. Install 7NodeJS and 8NPM here.
  2. Install 15git here or 18GitHub Desktop here.
  3. Clone the 16GitHub repository.
PS C:\proj> git clone https://github.com/App-Art-Mint/npm-n4v.git ./npm-n4v
  1. Change directory into the n4v project
PS C:\proj> cd n4v
  1. Install development dependencies.
PS C:\proj\n4v> npm install
  1. Run the development server.
PS C:\proj\n4v> npm run serve
  1. Visit http://localhost:42069/ in a browser.

Operations

Branching

  • Branch from origin/prod.
  • Name your branch either:
    • feature/descriptive-feature-name
    • bugfix/descriptive-bugfix-name
  • Create pull requests with origin/dev when it's ready for testing.
  • Create pull requests with origin/prod when it's stable.

Publishing

  • Publish from origin/prod.
  • Ensure the version number has been updated in package.json.
  • Set isDev to false in webpack.config.ts and save.
  • Build prod:
PS C:\proj\n4v> npm run build
  • Set isDev to true in webpack.config.ts and save.
  • Build dev:
PS C:\proj\n4v> npm run build
  • Publish to 8NPM.
PS C:\proj\n4v> npm publish
  • Commit the new dist files and package.json.
PS C:\proj\n4v> git add -A
PS C:\proj\n4v> git commit -m "Descriptive commit message"
PS C:\proj\n4v> git push

Guidelines

General

  • File names should be lowercase (besides README, LICENSE, etc.)

SCSS

  • CSS variables go in /src/scss/css-var.scss and should be included with @use.
  • Global styles go in /src/scss/global.scss and should be included with @use.
  • Base styles go in /src/scss/n4v.scss and should be included with @use.
  • Theme styles go in /src/scss/theme.scss and should be included with @use.
  • SCSS variables go in /src/scss/var.scss and should be included with @import.
  • Use the variables, functions, and mixins in /src/scss/var.scss to generate selectors and css variable references with a prefix.
    • To use these SCSS helpers, import the file: @import 'var';
    • Mixins:
      • @include css-var(height, 50px)--n4v-height: 50px;
      • @include css-var-ref(width, height)--n4v-width: var(--n4v-height);
    • Functions:
      • css-var(height)var(--n4v-height) // NOTE: No string interpolation
      • #{neg(something)}not(something) // NOTE: Doesn't add the prefix
      • #{class(open)}.n4v-open
      • #{id(logo)}#n4v-logo
      • #{controls(wrapper)}[controls=n4v-wrapper]
      • #{expanded(true)}[aria-expanded=true]
      • ms(100)100ms
      • px(100)100px
      • strip-unit(100px)100

TypeScript

  • Main functionality goes in /src/ts/n4vbar.ts.
  • CSS selector tools go in /src/ts/selectors.ts. Should be similar to /src/scss/var.scss.
  • Variable setting tools go in /src/ts/settings.ts.
  • Utility functions go in /src/ts/util.ts.
  • New classes should be:
    • Prefixed with 'n4v' and PascalCase after that. E.g. n4vClassName.
    • Exported as default in the file that defines them. I.e. export default n4vClassName;.
    • Imported and exported in /src/main.ts.
  • Event functions should be:
    • Prefixed with a lowercase 'e'. E.g. eHandleEvent().
    • Attached using Function.bind(this).
    • Attached using the n4vUtil.throttle() function.
      • The default timeout is n4vSettings.delay.default.
      • The default options are { leading: true, trailing: true }.
    • Casted as EventListenerOrEventListenerObject.

Usage

Getting Started

Vanilla HTML / CSS / JavaScript

HTML / SCSS / JavaScript with WebPack

HTML / SCSS / TypeScript

Angular / SCSS / TypeScript

References

The Basics:

Advanced:

Build Tools:

Testing:

Organization:

Version Control:

Software: