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

@sunderapps/n4v

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sunderapps/n4v

Navigation 4 Virtuosos - Accessible, Responsive Navbars

  • 0.7.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
decreased by-86.11%
Maintainers
1
Weekly downloads
 
Created
Source

n4v - An accessible, responsive navbar library

Hosting

  • www.n4v.bar
  • NPM - @sunderapps/n4v/
  • GitHub - Sunder-Apps/n4v/

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/Sunder-Apps/n4v.git ./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:

Keywords

FAQs

Package last updated on 22 Feb 2023

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