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

lvl99

v1.4.6

Published

Nothing to see here, just another frontend framework

Downloads

33

Readme

LVL99

GitHub package version: v1.4.6 Package dependencies by David MIT License Tested with Jest JavaScript Style Guide

My own personal frontend framework. Primarily uses jQuery, mildly inspired by Bootstrap and Ember.js and also has nothing to do with React. I also use it as a self-learning and development exercise experiment.

  • JavaScript is written in Node.js compatible ES6
  • I use StandardJS for coding style
  • I like how simple LESS is; I dislike how bloated SCSS is

Install

Include the lvl99 npm package in your npm project:

  npm install --save-dev lvl99

Use within JavaScript

ES6

Import the lvl99 module in your JavaScript:

  const lvl99 = require('lvl99')

You can also import single files if you don't want the whole JS framework:

  // Require whatever part of the framework you desire
  // Breakpoints needs to be initialised with defined sizes
  import Breakpoints from 'lvl99/es6/tools/breakpoints'
  const breakpoints = Breakpoints({
    'desktop': [1024, 99999],
    'tablet':  [600, 1024],
    'mobile':  [0, 600]
  })

Note: ES6 files have the .es6 extension to enable you to target these files using a transpiler like Babel.

Note: I've had some issues with transpiling from a node_modules folder. Ensure to put /node_modules\/lvl99\/es6\// in your babel-loader module rules and also include the babel-plugin-add-module-exports to your project and within your .babelrc.

Note: The ES6 files use the import/export method for modules, not require (CommonJS). Use the ES5 files if you want to use CommonJS like functionality.

ES5

If you are using ES5 JavaScript (aka, you're not transpiling, or you don't want to transpile) you can reference the same files within the es5 folder:

  // Require the whole LVL99 library
  var lvl99 = require('lvl99/es5')
  
  // Require a single file
  var Breakpoints = require('lvl99/es5/tools/breakpoints')({
    'desktop': [1024, 99999],
    'tablet':  [600, 1024],
    'mobile':  [0, 600]
  })

Note: These files are pre-transpiled from the ES6 ones for your convenience. ES5 files will have the .js extension.

HTML

If you want to include the whole framework outside of your build/bundle, then you can use the prebuilt dist/lvl99.js version (you'll need to copy it somewhere on your server to reference it). It should then be available as the global variable lvl99.

Note: The dist/lvl99.js version does not come with jQuery bundled, so please ensure it is included in your app somewhere before you load the lvl99.js file.

  <script type="text/javascript" src="jquery.min.js"></script>
  <script type="text/javascript" src="/js/lvl99.js"></script>
  <script type="text/javascript">
    console.log(lvl99)
  </script>

Use within LESS

Import the lvl99.less file in your LESS:

  @import 'path/to/node_modules/lvl99/less/lvl99.less';

You can also require/import single files if you don't want the whole LESS framework:

  // Import all the mixins
  @import 'path/to/node_modules/lvl99/less/mixins.less';
  
  // Or you can import each mixin file that you want
  @import 'path/to/node_modules/lvl99/less/mixins/inline-svg-code.less';

Architecture

@TODO!

Folder structure

  # Javascript (ES5 or ES6 flavours available)
  {es5,es6}/
    core/
      app.{js,es6}            # The app class 
      component.{js,es6}      # The component class that all other components inherit
      entity.{js,es6}         # The base entity class that all other classes inherit from
      index.{js,es6}          # All core modules in one
    components/
      accordion.{js,es6}
      index.{js,es6}          # All component modules in one
      modal.{js,es6}
      spinner.{js,es6} 
      toggleable.{js,es6}
    tools/
      breakpoints.{js,es6}    # Test for breakpoints in JS
      form-state.{js,es6}     # Enable saving form data to browser storage 
      index.{js,es6}          # All tools modules in one
      queue.{js,es6}          # Basic debounce queue for actions
      trackevent.{js,es6}     # Cache GA event tracking until GA object loaded
      smooth-scroll.{js,es6}  # Enable smooth scrolling when clicking anchor links
      storage.{js,es6}        # Convenience wrapper when using local/session storage
    utils/
      index.{js,es6}          # All utils modules in one
      inheritance.{js,es6}    # Some inheritance functions
      parse.{js,es6}          # Some parsing functions like type coercion, etc.
      super.{js,es6}          # Ember implementation of super behaviour
    common.{js,es6}           # Basic common used dependencies and variables
    index.{js,es6}            # All modules in one
    
  # LESS
  less/
    components/               # Component mixins
      accordion.less 
      modal.less
      spinner.less
      toggleable.less
    mixins/                   # Generic mixins
      align.less              # Margin, text, float alignment
      clearfix.less
      flex.less               # Some flex bits like columns, grid, alignment, etc.
      gradients.less
      grid.less               # Scaffolding
      inline-svg-code.less    # Quick way to embed SVG code directly in CSS
      inputs.less             # Form inputs like custom checkbox, radio, switch
      lists.less
      overflow.less
      position.less         
      responsive.less         # Size images to max width/height, plus show/hide elements based on breakpoints
      screen-reader.less
      spacing.less            # Remove top/bottom spacing within elements
    components.less           # All components in one
    lvl99.less                # All modules in one
    mixins.less               # All mixins in one

Dependencies

  • jQuery: Browser events, cross-browser implementations, etc.
  • object-path: Good for working with deep-nested objects
  • lodash.merge: Deep object extend
  • uuid: Unique ID generation

Dev Dependencies

  • Jest: Unit testing
  • Babel: Transpile ES6 to ES5
  • Webpack: Create lvl99.js distribution
  • Gulp: Task runner

TODO

  • Complete the README
  • Write more unit tests
  • Write more documentation throughout source
  • ~Create minified version of dist/lvl99.js~

Contribute

What? Really? Are you sure? Aren't there other frameworks more worth your time?

Changelog

License

MIT