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

hyvejs-components

v1.49.0-rc2

Published

_A mostly reasonable approach to JavaScript from [airbnb](https://github.com/airbnb/javascript)_ ## Linting We use [ESLint](https://eslint.org/) to ensure our code is [idiomatic](https://github.com/necolas/idiomatic-js) and conforms with globally recogniz

Downloads

791

Readme

Hyve Javascript Style Guide and Discussion Board

A mostly reasonable approach to JavaScript from airbnb

Linting

We use ESLint to ensure our code is idiomatic and conforms with globally recognized standards

After initializing each app, first install the required packages locally.

yarn add -D [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]

That will populate the package.json with the following development dependencies:

"devDependencies": {
  "babel-eslint": "7.2.3",
  "eslint": "4.5.0",
  "eslint-config-airbnb": "15.1.0",
  "eslint-plugin-babel": "4.1.2",
  "eslint-plugin-import": "2.7.0",
  "eslint-plugin-jsx-a11y": "5.1.1",
  "eslint-plugin-react": "7.1.0"
}

Finally download the .eslintrc file to the root for the latest agreed upon custom rules by Hyve's JS team.

wget https://bitbucket.org/onnet/javascript/raw/626ae7ca1cf8240dc771f1f7c7145e1e5831285d/.eslintrc

Standards

Topics tabled for discussion

Security

JWT Token Storage. What's the best method?

  • https://stormpath.com/blog/where-to-store-your-jwts-cookies-vs-html5-web-storage

Version Control

As a standard Hyve extends Vincent Driessen's GitFlow, with additions. GitFlow and Hyve's additions are explained briefly below:

Smart Commits

If your commit relates to a particular JIRA task, then add the task ID into the commit for tracking purposes. eg:

$ git commit -m "[SRM-98]: This is my commit message"

Group Tokens

Use pre-defined "grouping" tokens in front of your branch names. eg:

feature/api-authentication
hotfix/user-control-dropdown
release/rc-4.2
suggestion/model-user

Branch Naming

Feature Branch

eg: feature/branch-name

Contains a large, fully spec'd, addition to the codebase. Always merge through a Pull Request.

Suggestion Branch

eg: suggestion/branch-name

Useful when making suggestions as to a better/more efficient way to adapt the architecture of a particular piece of code in the application. Use the PR as a place to discuss the suggestion. Always merge through a Pull Request.

Hotfix Branch

eg: hotfix/branch-name

Used when making emergency changes to the codebase while ensuring that only the master branch will be effected. Important to rebase master into your local feature and suggestion branches after a hotfix was deployed. [version tag]

Develop Branch

Always: develop

contains the latest accepted but untested features or suggestions as spec'd by the team for a particular version.

Release Branch

eg: release/rc-1.4

The release candidate branch to be deployed on staging for testing and scrutiny before merging into master. This should contain the untested code in develop and always append the version number being tested. [version tag]

Master Branch

Always: master

The latest tested, stable and deployable code. Only hotfixes are merged directly into master. [version tag]

Dependencies

Webpack

We use Webpack and Babel to bundle and compile our code. (In order for us to use modern Javascript syntax, we need to convert it to an old version of Javascript that can be executed in the browser.) The following dependencies are needed for minimal configuration.

webpack
webpack-dev-server
html-webpack-plugin - simplifies creation of HTML files to serve webpack bundles
babel-core
babel-loader
babel-preset-env - improvement upon babel-preset-es2015
babel-preset-react

For any additional styling (css and sass) imports additional loaders are required:
css-loader
extract-text-webpack-plugin
sass-loader
style-loader
node-sass

React

The following packages are required for React:
react
react-dom

Scripts

npm start - launch the webpack dev server npm run build - transpile src code

Publishing to NPM

When publishing to NPM we only want to publish our lib folder. Usually, Node will look for a main file within the
module folder called index.js, therefor it is necessary to override this behaviour. To specify an alternative path,
update package.json to contain a key named main that specifies the path to the main file.

Versions