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

embedit.framework.ui

v1.1.10

Published

Main Embedit Application ========================

Downloads

3

Readme

Main Embedit Application

Coding Conventions and Guidelines

Project Structure

All component modules are defined in:

 -- /src
    -- /components
       -- /<component folder>
          -- <component>.js          
          -- <component>.less
          -- <component>.html
 -- /test
    -- /components
       -- /<component folder>
          -- <component>Spec.js          

Coding Rules

Coding conventions:

The best guidance is a coding approach that implements both code and comments in a clear, understandable, concise, and DRY fashion.

Below is a sample code that demonstrates some of our rules and conventions:

(function( angular, window, undefined ) {

  'use strict';
  
  /**
   * @ngdoc module
   * @name embedit.framework.ui.slider
   */
  angular.module( 'embedit.framework.ui.slider', [
    'embedit.framework.ui.core'
  ])
    .directive( 'emSlider', emSlider );
  
  /**
   * @ngdoc directive
   * @name emSlider
   * @module embedit.framework.ui.slider
   * @restrict E
   * @description
   * The `<em-slider>` component allows the user to choose from a range of values.
   *
   * It has two modes: 'normal' mode, where the user slides between a wide range of values, and
   * 'discrete' mode, where the user slides between only a few select values.
   *
   * To enable discrete mode, add the `em-discrete` attribute to a slider, and use the `step`
   * attribute to change the distance between values the user is allowed to pick.
   *
   * @usage
   * <h4>Normal Mode</h4>
   * <hljs lang="html">
   *   <em-slider ng-model="myValue"
   *              min="5"
   *              max="500">
   *   </em-slider>
   * </hljs>
   *
   * <h4>Discrete Mode</h4>
   * <hljs lang="html">
   *   <em-slider md-discrete
   *              ng-model="myDiscreteValue"
   *              step="10"
   *              min="10"
   *              max="130">
   *   </em-slider>
   * </hljs>
   *
   * @param {boolean=} mdDiscrete Whether to enable discrete mode.
   * @param {number=} step The distance between values the user is allowed to pick. Default 1.
   * @param {number=} min The minimum value the user is allowed to pick. Default 0.
   * @param {number=} max The maximum value the user is allowed to pick. Default 10.
   */
   
  function emSlider( emCoreSvc ) {
    //...
  }

})( window.angular, window );
  • All components must have unique, understandable module names; prefixed with 'embedit.framework.ui.'.
  • All components must/can depend upon the 'embedit.framework.ui.core' module.
  • Do not use $inject to annotate arguments. ngAnnotate is used as part of the build process to automatically create the annotations.
  • All public API methods must be documented with ngdoc, an extended version of jsdoc. To see how we document our APIs, please check out the existing ngdocs and see this wiki page.
  • All directives must use the em- prefix for both the directive name and any directive attributes. Directive templates should be defined in external html file.

Testing

  • All components must have valid, passing unit tests.
  • All features or bug fixes must be tested by one or more specs.

Coding

  • Use jscs with settings applied from existing jscs.json
  • Use jshint with settings applied from existing .jshintrc
  • Use *editorconfig with settings applied from existing .editorconfig
  • Use provided IDE settings ( also some live templates macros included )
  • Wrap all code at 120 characters.
  • Do not use tabs. Use two (2) spaces to represent a tab or indent.
  • Constructors are PascalCase, closures and variables are lowerCamelCase.
  • When enhancing or fixing existing code
    • Do not reformat the author's code
    • Conform to standards and practices used within that code; unless overridden by best practices or patterns.
    • Provide jsDocs for functions and single-line comments for code blocks
    • Be careful of regression errors introduce by your changes
    • Always test your changes with unit tests and manual user testing.

Patterns

  • All components should be wrapped in an anonymous closure using the Module Pattern.

  • Use the Revealing Pattern as a coding style.

  • Do not use the global variable namespace, export our API explicitly via Angular DI.

  • Instead of complex inheritance hierarchies, use simple objects.

  • Avoid prototypal inheritance unless warranted by performance or other considerations.

  • We love functions and closures and, whenever possible, prefer them over objects.

    Do not use anonymous functions. All closures should be named.

Documentation

  • All non-trivial functions should have a jsdoc description.

i18n

  • Always register static strings to api/i18n/:langCode file and use it in templates via translate filter or directive

Detailed Guidelines

After you read and applied above recommendations to codebase please follow these guides: